skupper icon indicating copy to clipboard operation
skupper copied to clipboard

Show link status for links from remote sites

Open ssorj opened this issue 9 months ago • 5 comments

Users care about links coming from the outside.

https://skupperproject.github.io/refdog/commands/link/status.html

The "Links from remote sites" part:

$ skupper link status
NAME          STATUS   COST
west-6bfn6    Ready    1
south-ac619   Error    10

Links from remote sites:

<none>

If there are incomining links, <none> is replaced with details from Site.status.network.*.

ssorj avatar Mar 17 '25 11:03 ssorj

this needs changes in the controller given that the remote link information is not yet added in the network status inside the site status.

nluaces avatar Apr 01 '25 16:04 nluaces

Since I'm pulling remote information from the site.status.network I only have a couple of parameters that I can fetch. I'm getting linkname, site where the link is being initiated from and operational state. There is not cost or message field.

network: - id: 0ad46f4d-d9f5-402f-979c-e2231b74f6d5 links: - name: public2-3480d026-9eaf-496f-b93f-819b7ffa0442 operational: true remoteSiteId: 103baee3-7928-4ca2-bcb3-779df0f7cf7f remoteSiteName: public2 - name: public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a operational: true remoteSiteId: 6eeb8a2a-ff0e-4abd-bd39-afdaead62c7d remoteSiteName: public1 name: private1 namespace: private1 platform: kubernetes version: 2.0.0 - id: 103baee3-7928-4ca2-bcb3-779df0f7cf7f links: - name: public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a operational: true remoteSiteId: 6eeb8a2a-ff0e-4abd-bd39-afdaead62c7d remoteSiteName: public1 name: public2 namespace: public2 platform: kubernetes version: 2.0.0

$skupper link status -n public2
Outgoing link from this site:
NAME						STATUS	COST	MESSAGE
public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a	Ready	1	OK

Incoming Links from remote sites: 
NAME						STATUS	REMOTE SITE
public2-103baee3-7928-4ca2-bcb3-779df0f7cf7f	Ready	private1

lynnemorrison avatar Apr 08 '25 15:04 lynnemorrison

@nluaces since I'm using the site.status.network to get the remote links, this is what I have with the -o option. Is this what you would expect?

skupper link status There are no outgoing link resources in the namespace

Incoming Links from remote sites: NAME STATUS REMOTE SITE public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a Ready private1 public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a Ready public2

lynne@lynne-VirtualBox:~$ skupper link status public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a

Incoming Links from remote sites: Name : public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a Status : Ready Remote : private1 Name : public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a Status : Ready Remote : public2

lynne@lynne-VirtualBox:~$ skupper link status public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a -o yaml

id: 0ad46f4d-d9f5-402f-979c-e2231b74f6d5 links:

  • name: public2-3480d026-9eaf-496f-b93f-819b7ffa0442 operational: true remoteSiteId: 103baee3-7928-4ca2-bcb3-779df0f7cf7f remoteSiteName: public2
  • name: public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a operational: true remoteSiteId: 6eeb8a2a-ff0e-4abd-bd39-afdaead62c7d remoteSiteName: public1 name: private1 namespace: private1 platform: kubernetes version: 2.0.0

id: 103baee3-7928-4ca2-bcb3-779df0f7cf7f links:

  • name: public1-e2ba30ed-6cdd-440a-9bc7-f1bb8c1f829a operational: true remoteSiteId: 6eeb8a2a-ff0e-4abd-bd39-afdaead62c7d remoteSiteName: public1 name: public2 namespace: public2 platform: kubernetes version: 2.0.0

lynnemorrison avatar Apr 08 '25 15:04 lynnemorrison

@lynnemorrison regarding the expected output, we need to check with @ssorj, in order to know what pieces of information are missing.

Once we have those requirements, there is another piece of work included in this issue that is to investigate which parts are not currently provided by the controller (if any) and how to include them.

nluaces avatar Apr 08 '25 16:04 nluaces

@grs Testing this CLI addition, I had a three router setup. I deleted one of the links on private1. I was expecting the link to be removed from the site resource on public1, but when I look at the site resource the links are never removed. Is this expected behavior?

skupper link status -n private1
Outgoing link from this site:
NAME						STATUS	COST	MESSAGE
public1-d72cbb23-d98d-4cf7-a943-a56d0d447498	Ready	1	OK
public2-d00e1a17-cee5-43f3-9872-edbabc3b7b3c	Ready	1	OK

Incoming Links from remote sites: 
There are no incoming link resources in the namespace
kubectl delete link public1-d72cbb23-d98d-4cf7-a943-a56d0d447498
link.skupper.io "public1-d72cbb23-d98d-4cf7-a943-a56d0d447498" deleted

lynne@lynne-VirtualBox:~/skupper-example-prom$ skupper link status -n private1
Outgoing link from this site:
NAME						STATUS	COST	MESSAGE
public2-d00e1a17-cee5-43f3-9872-edbabc3b7b3c	Ready	1	OK

Incoming Links from remote sites: 
There are no incoming link resources in the namespace

I waited 10 minutes and I still see the link from private1 to public1

skupper link status -n public1
There are no outgoing link resources in the namespace

Incoming Links from remote sites: 
NAME						STATUS	REMOTE SITE
public1-d72cbb23-d98d-4cf7-a943-a56d0d447498	Ready	public2    
public1-d72cbb23-d98d-4cf7-a943-a56d0d447498	Ready	private1   <---- I deleted this link on private1

If I delete the site private1 the links do go away.

skupper site delete --all
Waiting for deletion to complete...
Site "private1" is deleted

It took about 5 minutes but link from private1 to public1 is removed

skupper link status -n public1
There are no outgoing link resources in the namespace

Incoming Links from remote sites: 
NAME						STATUS	REMOTE SITE
public1-d72cbb23-d98d-4cf7-a943-a56d0d447498	Ready	public2

lynnemorrison avatar Apr 10 '25 12:04 lynnemorrison