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

Fix connection initialization flow for joined node #1078

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Jan 8, 2024

When a connector is initialized for the sake of joining the manager cluster, the endpoint is different from main provider endpoint, thus global connection init flows such as NSX Version retrieval and licenses should not be triggered by such connection.

@annakhm annakhm force-pushed the connection-init-flow branch from 773a8ee to 9f358c2 Compare January 8, 2024 23:05
@annakhm
Copy link
Collaborator Author

annakhm commented Jan 8, 2024

/test-all

@@ -168,7 +168,7 @@ func waitForNodeStatus(d *schema.ResourceData, m interface{}, nodes []NsxCluster
log.Printf("[DEBUG]: API probing for NSX is disabled")
return nil
}
connector := getPolicyConnectorForInit(m, false)
connector := getStandalonePolicyConnector(m, false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I still see the same failure with the PR applied.
I've tried to change this line to

connector := getPolicyConnector(m)

Which worked - I think that as with getStandalonePolicyConnector we skip license assignment, this is where we want to assign the license and therefore use the regular getPolicyConnector

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This connection just waits for node status, it should not require license, but we don't want it to initialize the version for the main NSX connection and thus skip license assignment for it..

@annakhm annakhm force-pushed the connection-init-flow branch from 9f358c2 to 4b57dd4 Compare January 10, 2024 00:36
When a connector is initialized for the sake of joining the manager
cluster, the endpoint is different from main provider endpoint, thus
global connection init flows such as NSX Version retrieval and licenses
should not be triggered by such connection.

Signed-off-by: Anna Khmelnitsky <[email protected]>
@annakhm annakhm force-pushed the connection-init-flow branch from 4b57dd4 to ad7230e Compare January 10, 2024 17:43
@annakhm
Copy link
Collaborator Author

annakhm commented Jan 10, 2024

/test-all

Copy link
Collaborator

@ksamoray ksamoray left a comment

Choose a reason for hiding this comment

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

LGTM!

@ksamoray ksamoray merged commit 1bbe543 into master Jan 11, 2024
6 checks passed
@ksamoray ksamoray deleted the connection-init-flow branch January 11, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants