-
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
[qfix] Add WithEndpointChange heal option #1082
[qfix] Add WithEndpointChange heal option #1082
Conversation
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
f5a30dd
to
fda8076
Compare
@@ -67,8 +67,16 @@ func WithRestoreTimeout(restoreTimeout time.Duration) Option { | |||
} | |||
} | |||
|
|||
// WithEndpointChange sets if Connection.EndpointName can be changed with monitor updates | |||
func WithEndpointChange() Option { |
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.
@Bolodya1997 Could you please explain in what cases we plan do not use this option?
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.
It is NSC-only option. Do you mean adding such comment in code?
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.
I don't quite follow why do we need the option only for nscs.
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.
We currently have the following on the Request:
- NSC -> NSMgr :
endpointName == ""
- NSMgr -> Forwarder -> NSMgr -> Passthrough :
endpointName == "Passthrough"
- Passthrough -> NSMgr :
endpointName == ""
- NSMgr -> Forwarder -> NSMgr -> NSE :
endpointName == "NSE"
- Passthrough <- NSMgr <- Forwarder <- NSMgr <- NSE :
endpointName == "NSE"
- NSC <- NSMgr <- Forwarder <- NSMgr <- Passthrough :
endpointName == "Passthrough"
On refresh Request we should have the following:
- NSC -> NSMgr -> Forwarder -> NSMgr -> Passthrough :
endpointName == "Passthrough"
- Passthrough -> NSMgr :
endpointName == ""
- NSMgr -> Forwarder -> NSMgr -> NSE :
endpointName == "NSE"
- Passthrough <- NSMgr <- Forwarder <- NSMgr <- NSE :
endpointName == "NSE"
- NSC <- NSMgr <- Forwarder <- NSMgr <- Passthrough :
endpointName == "Passthrough"
But because of heal
client standing in the chain before the replacelabels
client after refresh happen in NSMgr (Passthrough -> NSMgr) we will have the following:
- NSC -> NSMgr -> Forwarder -> NSMgr -> Passthrough :
endpointName == "Passthrough"
- Passthrough -> NSMgr -> Forwarder -> NSMgr -> NSE :
endpointName == "NSE"
- NSC <- NSMgr <- Forwarder <- NSMgr <- Passthrough <- NSMgr <- Forwarder <- NSMgr <- NSE :
endpointName == "NSE"
And so subsequent refresh Request will fail because of invalid Endpoint name.
We cannot move heal
client after additionalFunctionality
clients, because it will lead to problems with mechanismtranslation
client. So we can just disable endpointName
update for all applications except NSC.
I don't like adding more complexity into heal, but we are planning to remove and replace exist heal logic. Motviation
So merging this as a part of solution for networkservicemesh/deployments-k8s#2381 |
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1082 Commit: 55adc08 Author: Vladimir Popov Date: 2021-09-23 16:54:20 +0700 Message: - Add WithEndpointChange heal option (#1082) Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Description
Adds
WithEndpointChange
heal option to be enabled only on NSC.How Has This Been Tested?
Types of changes