Repository navigation
HIVE-2391: vsphere zonal - #2851
openshift-merge-bot[bot] merged 2 commits into
Conversation
|
@2uasimojo: This pull request references HIVE-2391 which is a valid jira issue. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
29af27f to
5249404
Compare
|
@jianping-shu this passed e2e-vsphere, so I reckon it's probably ready for you to take another stab at it! |
|
/hold Looks like I missed refactoring the preflight auth check for the new creds shape. |
5249404 to
39cf13e
Compare
|
/hold cancel |
|
The new multi-creds changes LGTM. My only concern (as noted in review comments) is that there are some additional fields (at least |
39cf13e to
896e851
Compare
|
/hold for QE |
896e851 to
7996e22
Compare
|
/test e2e security e2e: infra flake |
|
Allowable to override |
7996e22 to
066a4e4
Compare
|
/test e2e-vsphere |
|
/test e2e-vsphere ...since openshift/release#77981 /test periodic-images (flake) /override ci/prow/security Known, to be dealt with elsewhere. |
|
@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security DetailsIn 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-sigs/prow repository. |
|
/test e2e-vsphere Gonna hope this was a temporary DNS flake... |
|
/assign @suhanime |
|
/hold cancel This should be ready to go now. |
|
/test e2e-vsphere Trying to confirm this test infra fix: we want to see a successful run that uses |
| for i := range platform.VCenters { | ||
| // Allow a hybrid input style: creds can be included in the json blob OR individually | ||
| // via env vars. The former takes precedence. | ||
| for i := range platform.VCenters { |
There was a problem hiding this comment.
this i shadows the top level loop's i, is that intentional?
There was a problem hiding this comment.
and they loop over the same thing
There was a problem hiding this comment.
I can't see any value in the inner loop, can you? AFAICS just removing the inner for (but leaving its contents) will result in the same structure, just O(N) rather than O(N²), right? So Imma do that.
I remember refactoring this chunk quite a bit, though I don't recall the details. I must have just missed the redundant loop when I was busy looking at the trees.
There was a problem hiding this comment.
@coderabbitai Do you agree that removing LL842 and 849 will yield the same functional result?
There was a problem hiding this comment.
@2uasimojo Yes, removing lines 842 and 849 (the inner for i := range platform.VCenters { and its closing }) yields identical functional results.
Here's why:
Current O(N²) behavior: For each outer iteration k, the inner loop walks all N vCenters and calls setCredValue on each. After the inner loop, the outer i (= k) is back in scope for the append. So across all outer iterations, credentials get set N times per entry (redundantly), and all N entries are appended in order.
After the fix (O(N)): Each outer iteration k calls setCredValue only for VCenters[k], then appends that entry. The net result — all VCenters have credentials set, vcenterCreds has all N entries in order — is the same.
The key insight is that setCredValue is idempotent (it's a no-op if the receiver is already set), so calling it multiple times per entry vs. once makes no difference. The redundant inner loop is just dead weight.
| return nil, fmt.Errorf("must provide --vsphere-vcenter or set %s env var", constants.VSphereVCenterEnvVar) | ||
| vcenterCredsb, err := json.Marshal(vcenterCreds) | ||
| if err != nil { | ||
| return nil, errors.Wrap(err, "failed to marhsal vcenter creds list") |
|
@2uasimojo the shadowed |
5e671cb to
be5631a
Compare
|
Rebase only. Updates forthcoming. |
Followon addressing review from openshift#2731. MachinePool: - Removed `Topology` override - Restored ResourcePool and TagIDs overrides - Removed `osImage` detected from arbitrary master; using whatever's passed through from FD Topology (which defaults sanely if unset). Deprovision: - Changed `--vsphere-vcenter` StringVar to `--vsphere-vcenters` StringSliceVar Platform Creds: - Redesigned to take `vcenters`, a list of vcenter server/username/password, matching (and unmarshaling into) the corresponding chunk of metadata.json. Docs: - Updated install-config sample to zonal shape. - Documented new creds shape.
be5631a to
a1e2bdd
Compare
|
/lgtm |
|
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, dlom The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override ci/prow/security |
|
@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security DetailsIn 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-sigs/prow repository. |
|
@2uasimojo: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Co-Authored-By: @dlom
Summary by CodeRabbit
New Features
Deprecations
Documentation