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

Backport: Fix subctl diagnose hostname mismatch issue #1508

Merged

Conversation

sridhargaddam
Copy link
Member

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)

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr1508/sridhargaddam/bp-diagnose-active-gw

@sridhargaddam sridhargaddam changed the title Fix subctl diagnose hostname mismatch issue Backport: Fix subctl diagnose hostname mismatch issue Jul 21, 2021
@@ -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 != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1507 (review)

Isn't this part a leak of the above PR ?

Copy link
Member Author

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)
@dfarrell07 dfarrell07 added this to the 0.9.1 milestone Jul 27, 2021
@dfarrell07 dfarrell07 added this to In review in Submariner Project v0.9 Jul 27, 2021
@dfarrell07 dfarrell07 removed this from In review in Submariner Project v0.9 Jul 27, 2021
@dfarrell07 dfarrell07 added this to In review in Submariner Project 0.10 Jul 27, 2021
@dfarrell07 dfarrell07 modified the milestones: 0.9.1, 0.10.0-rc1 Jul 27, 2021
@dfarrell07 dfarrell07 enabled auto-merge (rebase) July 27, 2021 15:10
@dfarrell07 dfarrell07 merged commit 80e1a96 into submariner-io:release-0.9 Jul 27, 2021
Submariner Project 0.10 automation moved this from In review to Done Jul 27, 2021
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr1508/sridhargaddam/bp-diagnose-active-gw]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants