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
Backport: Fix subctl diagnose hostname mismatch issue #1508
Backport: Fix subctl diagnose hostname mismatch issue #1508
Conversation
🤖 Created branch: z_pr1508/sridhargaddam/bp-diagnose-active-gw |
pkg/subctl/cmd/validate_tunnel.go
Outdated
@@ -191,7 +191,15 @@ func getGatewayIP(remoteCfg *rest.Config, localClusterID string) string { | |||
|
|||
for _, conn := range gw.Status.Connections { | |||
if conn.Endpoint.ClusterID == localClusterID { | |||
return conn.UsingIP | |||
if conn.UsingIP != "" { |
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.
Isn't this part a leak of the above PR ?
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.
Oh yes. As you might have noticed the directory structure and file-names are changed between release-0.9 and devel. So I could not do a clean cherry-pick and had to do manual changes.
Just to be sure that changes are not causing regression, I manually built subctl and verified it locally on a KIND cluster. In that process, I was getting this error, so included it and test-cases passed. I forgot to remove it ;-)
I'll update this PR and will remove this change.
Thanks for reviewing @mangelajo
Submariner Endpoint stores the hostname info as part of the endpoint object. In most of the K8s clusters, the hostname matches with the nodeName, but on some clusters, it was seen that nodeName does not match. This PR fixes this issue. Also, when more than a single node is labelled as Gateway node, the current code was not handling it properly, this PR fixes it. Fixes issue: submariner-io#1471 Signed-Off-by: Sridhar Gaddam <sgaddam@redhat.com> (cherry picked from commit 9d125f0)
6c069a7
to
44b4734
Compare
🤖 Closed branches: [z_pr1508/sridhargaddam/bp-diagnose-active-gw] |
Submariner Endpoint stores the hostname info as part of the endpoint object.
In most of the K8s clusters, the hostname matches with the nodeName, but on
some clusters, it was seen that nodeName does not match. This PR fixes this
issue.
Also, when more than a single node is labelled as Gateway node, the current
code was not handling it properly, this PR fixes it.
Fixes issue: #1471
Signed-Off-by: Sridhar Gaddam sgaddam@redhat.com
(cherry picked from commit 9d125f0)