-
Notifications
You must be signed in to change notification settings - Fork 36
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
IPContext merged in begin chain element (#1231) #1234
Conversation
f147325
to
e01c38c
Compare
@LionelJouin Could you resolve the linter issue and also sign the commit to fix DCO? |
Also, I feel we need to add a unit test for this case. See at unit tests for begin pkg https://github.com/networkservicemesh/sdk/blob/main/pkg/networkservice/common/begin/serialize_both_test.go |
aa1e171
to
f054762
Compare
Using the Client chain, the network service client cannot update the IPContext without the mergeConnectionContext function implemented. A NSC might want to update it if it needs to add, update or delete routes, src IP addresses (VIPs...), policies... Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
@@ -36,7 +37,8 @@ func mergeConnection(returnedConnection, requestedConnection, connection *networ | |||
func mergeConnectionContext(returnedConnectionContext, requestedConnectionContext, connectioncontext *networkservice.ConnectionContext) *networkservice.ConnectionContext { | |||
rv := proto.Clone(connectioncontext).(*networkservice.ConnectionContext) | |||
if !proto.Equal(returnedConnectionContext, requestedConnectionContext) { | |||
// TODO: IPContext, DNSContext, EthernetContext, do we need to do MTU? | |||
// TODO: DNSContext, EthernetContext, do we need to do MTU? | |||
rv.IpContext = requestedConnectionContext.IpContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think we also need to do it for other contexts as you pointed in the comment.
@edwarnicke Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LionelJouin Apologies for this taking so long to get back to you on. The net net is that what you did here was fine. I also realized why it took me so long to sort it out, and produced a better documented version here in #1238 that handles the merge more or less correctly (which you were doing) and also in a way that's hopefully clearer. I also provided testing. Could you have a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, I will try it today, thank you
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
This is a simplification and rework in response to networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Also improved greatly documentation in various places Should resolve networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Also improved greatly documentation in various places Should resolve networkservicemesh#1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Also improved greatly documentation in various places Should resolve #1234 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1238 Commit: 7296982 Author: Ed Warnicke Date: 2022-03-13 20:33:48 -0500 Message: - Improve merge of ConnectionContext with external requests (#1238) Also improved greatly documentation in various places Should resolve networkservicemesh/sdk#1234 Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Description
Using the Client chain, the network service client cannot update the IPContext without the
mergeConnectionContext
function implemented. A NSC might want to update it if it needs to add, update or delete routes, src IP addresses (VIPs...), policies...Issue link
#1231
How Has This Been Tested?
I am not sure what would be the full impact in NSM, but in my environment, I managed to update IPs and policies without any issue.
Types of changes