Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upstreamrefresh chain element #1324

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

glazychev-art
Copy link
Contributor

@glazychev-art glazychev-art commented Jul 12, 2022

Signed-off-by: Artem Glazychev artem.glazychev@xored.com

Description

This chain element waits for REFRESH_REQUESTED event from the upstream and triggers refresh when received.

It also has "Local Notification" option to trigger refresh for different connections belonging to the same client.
Example:
Screenshot from 2022-07-14 14-59-55

To trigger conn1-3 to refresh the connection, we can use local notification

Issue link

networkservicemesh/cmd-nse-vl3-vpp#77

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@glazychev-art glazychev-art marked this pull request as ready for review July 14, 2022 09:55
@edwarnicke
Copy link
Member

@glazychev-art Local notifier is an interesting idea... how do you see using it?

@glazychev-art
Copy link
Contributor Author

@edwarnicke
Common NSC will not use it - is enough to receive only upstream monitor events with REFRESH_REQUESTED state.
But for the vl3-client, we can also set an option WithLocalNotification():

...
upstreamrefresh.NewClient(ctx, upstreamrefresh.WithLocalNotifications()),
...

All outgoing requests are subscribed to events (created a new simple chan struct{}). And if one of the already created connections receives REFRESH_REQUESTED state from its upstream - it notifies others to also refresh their connections (to other vl3 endpoints). It calls notify function which sends a notification to each subscriber. For these subscribers, this will mean the same as REFRESH_REQUESTED.

@edwarnicke
Copy link
Member

@glazychev-art Ah yes... of course :) Makes total sense.

@edwarnicke edwarnicke merged commit 27296ed into networkservicemesh:main Jul 14, 2022
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Jul 14, 2022
…k@main

PR link: networkservicemesh/sdk#1324

Commit: 27296ed
Author: Artem Glazychev
Date: 2022-07-14 20:37:27 +0700
Message:
  - Add upstreamrefresh chain element (#1324)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
anastasia-malysheva pushed a commit to anastasia-malysheva/sdk that referenced this pull request Jul 27, 2022
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants