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
Bug 1839694: [vSphere] Add ability to read port from provider config #596
Bug 1839694: [vSphere] Add ability to read port from provider config #596
Conversation
/retest |
@alexander-demichev: This pull request references Bugzilla bug 1839694, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
||
server := fmt.Sprintf("%s:%s", providerSpec.Workspace.Server, getPortFromConfig(vSphereConfig)) | ||
authSession, err := session.GetOrCreate(params.Context, | ||
server, providerSpec.Workspace.Datacenter, |
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.
if no port is set, this would pass 1.1.1.1:
and use that to create the session key. Probably not harmful, but odd at least.
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.
Yes, having :
at the end of URL is not harmful and that's I left it as it is.
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/bugzilla refresh |
@enxebre: This pull request references Bugzilla bug 1839694, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -971,6 +980,29 @@ func TestDelete(t *testing.T) { | |||
}, | |||
} | |||
|
|||
testConfig := fmt.Sprintf(testConfigFmt, url[1]) |
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.
Should probably check the length of URL before taking the second element out of it?
@@ -952,14 +959,16 @@ func TestDelete(t *testing.T) { | |||
model, _, server := initSimulator(t) | |||
defer model.Remove() | |||
defer server.Close() | |||
credentialsSecretUsername := fmt.Sprintf("%s.username", server.URL.Host) | |||
credentialsSecretPassword := fmt.Sprintf("%s.password", server.URL.Host) | |||
url := strings.Split(server.URL.Host, ":") |
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 wonder if it's better to split this so we have host
, port
variables? Might be more readable for future iterations on these tests?
Could use net.SplitHostPort for this.
} | ||
|
||
type Global struct { | ||
Port string `gcfg:"port"` |
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'm guessing port is better as a string, even though it will be a number in a string, might be worth a comment as to why it's a string?
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.
Port is a string because we need an empty string value here by defaultfmt.Sprintf("%s:%s", providerSpec.Workspace.Server, getPortFromConfig(vSphereConfig))
and it seems like it's the cleanest way to do it
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@alexander-demichev: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@alexander-demichev: All pull requests linked via external trackers have merged: openshift/machine-api-operator#596. Bugzilla bug 1839694 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR adds the ability to read port from provider config. We should be able to append port to the server's address.
https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/k8s-secret.html#create-a-k8s-secret.
https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html