-
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
[deployments-k8s#2003] Add discover close for expired NSE #1013
[deployments-k8s#2003] Add discover close for expired NSE #1013
Conversation
} | ||
|
||
return next.Server(ctx).Close(clienturlctx.WithClientURL(ctx, u), conn) |
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.
Am I get it correctly that in case if endpoint is unreachable we will call next with expired ctx?
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.
Missed this, thank you.
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 have ctx.Deadline() / 10
timeout for discoverNetworkServiceEndpoint
, so it wouldn't be expired.
7835ba9
to
8abe6be
Compare
7d72de1
to
c0176e8
Compare
@@ -1,4 +1,4 @@ | |||
// Copyright (c) 2020 Cisco Systems, Inc. | |||
// Copyright (c) 2020-2021 Cisco Systems, Inc. |
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.
// Copyright (c) 2020-2021 Cisco Systems, Inc. | |
// Copyright (c) 2020 Cisco Systems, Inc. | |
// | |
// Copyright (c) 2021 Doc.ai and/or its affiliates. |
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.
Yep, fixed.
touchServer.touched = false | ||
|
||
_, err = client.Close(context.TODO(), conn) | ||
_, err = client.Request(context.TODO(), request) |
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.
Can we change TODO context?
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.
Removed commit modifying interpose, guess it is no more part of the PR.
var crossCTX context.Context | ||
if conn.GetId() == connInfo.clientConnID { | ||
crossCTX = clienturlctx.WithClientURL(ctx, connInfo.interposeNSEURL) |
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.
Why we don't need more to pass clienturl to interposeNSE?
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.
Removed commit modifying interpose, guess it is no more part of the PR.
} | ||
return next.Server(ctx).Close(clienturlctx.WithClientURL(ctx, u), conn) | ||
|
||
// Connect server already has a client URL for the conn.Id, so we don't need to set it here. |
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 think that discover server should know about connect server.
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.
Removed this commit.
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.
Added a few comments
f5c8bc7
to
d42b11c
Compare
Signed-off-by: Vladimir Popov <[email protected]>
d42b11c
to
34f33d7
Compare
Description
Adds
Close
propagation fordiscover
for not existing (probably expired) NSE case.Issue link
networkservicemesh/deployments-k8s#2003
How Has This Been Tested?
Types of changes