Skip to content

HIVE-2391: vsphere zonal - #2851

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
2uasimojo:HIVE-2391/vsphere-zonal
Apr 30, 2026
Merged

openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
2uasimojo:HIVE-2391/vsphere-zonal

Conversation

@2uasimojo

@2uasimojo 2uasimojo commented Feb 10, 2026 •

Copy link
Copy Markdown
Member

Co-Authored-By: @dlom

Summary by CodeRabbit

  • New Features

    • Multi-vCenter support and new Infrastructure-based vSphere platform (including richer failure-domain/topology and machine-pool disk/zone options).
    • CLI: support for an installer platform JSON input and multi-vCenter flags.
  • Deprecations

    • Legacy per-field vSphere settings (vCenter, datacenter, datastore, folder, cluster, network, etc.) deprecated in favor of Infrastructure/VCenters.
  • Documentation

    • Updated docs and examples, secret format now supports a vcenters list and migration guidance included.

@openshift-ci
openshift-ci Bot requested review from dlom and suhanime February 10, 2026 22:10
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2026
@2uasimojo 2uasimojo changed the title Hive 2391: vsphere zonal HIVE2391: vsphere zonal Feb 10, 2026
@2uasimojo 2uasimojo changed the title HIVE2391: vsphere zonal HIVE-2391: vsphere zonal Feb 10, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 10, 2026
@openshift-ci-robot

openshift-ci-robot commented Feb 10, 2026 •

Copy link
Copy Markdown

@2uasimojo: This pull request references HIVE-2391 which is a valid jira issue.

Details

In response to this:

Co-Authored-By: @dlom

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.

@codecov

codecov Bot commented Feb 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.81159% with 202 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.42%. Comparing base (bd520da) to head (a1e2bdd).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
contrib/pkg/createcluster/create.go 0.00% 77 Missing ⚠️
pkg/controller/utils/credentials.go 0.00% 33 Missing ⚠️
.../clusterdeployment/clusterdeployment_controller.go 0.00% 20 Missing and 1 partial ⚠️
contrib/pkg/deprovision/vsphere.go 0.00% 15 Missing ⚠️
pkg/creds/vsphere/vsphere.go 0.00% 15 Missing ⚠️
pkg/installmanager/installmanager.go 0.00% 13 Missing ⚠️
...g/controller/clusterpool/clusterpool_controller.go 0.00% 11 Missing and 1 partial ⚠️
pkg/install/generate.go 0.00% 6 Missing ⚠️
pkg/clusterresource/vsphere.go 83.33% 4 Missing ⚠️
pkg/controller/utils/vsphereutils/vsphere.go 77.77% 2 Missing and 2 partials ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2851      +/-   ##
==========================================
- Coverage   50.49%   50.42%   -0.07%     
==========================================
  Files         280      281       +1     
  Lines       34313    34345      +32     
==========================================
- Hits        17326    17320       -6     
- Misses      15630    15673      +43     
+ Partials     1357     1352       -5     
Files with missing lines Coverage Δ
pkg/constants/constants.go 100.00% <ø> (ø)
...oller/clusterdeployment/installconfigvalidation.go 100.00% <100.00%> (ø)
...g/controller/machinepool/machinepool_controller.go 64.33% <100.00%> (+0.52%) ⬆️
pkg/controller/machinepool/vsphereactuator.go 77.14% <100.00%> (+3.57%) ⬆️
...hift/hive/apis/hive/v1/clusterdeprovision_types.go 0.00% <ø> (ø)
.../v1/clusterdeployment_validating_admission_hook.go 86.29% <87.50%> (+1.56%) ⬆️
pkg/clusterresource/vsphere.go 92.95% <83.33%> (+2.83%) ⬆️
pkg/controller/utils/vsphereutils/vsphere.go 77.77% <77.77%> (ø)
pkg/install/generate.go 45.56% <0.00%> (-0.29%) ⬇️
...g/controller/clusterpool/clusterpool_controller.go 58.83% <0.00%> (-0.22%) ⬇️
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 29af27f to 5249404 Compare February 11, 2026 18:20
@2uasimojo

Copy link
Copy Markdown
Member Author

@jianping-shu this passed e2e-vsphere, so I reckon it's probably ready for you to take another stab at it!

@2uasimojo

Copy link
Copy Markdown
Member Author

/hold

Looks like I missed refactoring the preflight auth check for the new creds shape.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2026
@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 5249404 to 39cf13e Compare February 13, 2026 20:21
@2uasimojo

Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2026
Comment thread apis/hive/v1/vsphere/machinepools.go Resolved
Comment thread apis/hive/v1/vsphere/machinepools.go Resolved
Comment thread apis/hive/v1/vsphere/machinepools.go Resolved
@dlom

dlom commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

The new multi-creds changes LGTM. My only concern (as noted in review comments) is that there are some additional fields (at least Folder, potentially more) on the machinepool that end users may want to use

@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 39cf13e to 896e851 Compare February 19, 2026 22:49
@2uasimojo

Copy link
Copy Markdown
Member Author

/hold for QE

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2026
@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 896e851 to 7996e22 Compare February 26, 2026 15:21
@2uasimojo

2uasimojo commented Feb 26, 2026 •

Copy link
Copy Markdown
Member Author

/test e2e security

e2e: infra flake
security: upstream bug with the packageURL check again (though possibly slightly different this time).

@2uasimojo

Copy link
Copy Markdown
Member Author

Allowable to override security job (buggy upstream tool) if necessary when ready to merge.

@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 7996e22 to 066a4e4 Compare February 27, 2026 16:46
Comment thread docs/hiveutil.md Resolved
@jcpowermac

Copy link
Copy Markdown

/test e2e-vsphere

@2uasimojo

Copy link
Copy Markdown
Member Author

/test e2e-vsphere

...since openshift/release#77981

/test periodic-images

(flake)

/override ci/prow/security

Known, to be dealt with elsewhere.

@openshift-ci

openshift-ci Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security

Details

In response to this:

/test e2e-vsphere

...since openshift/release#77981

/test periodic-images

(flake)

/override ci/prow/security

Known, to be dealt with elsewhere.

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

Copy link
Copy Markdown
Member Author

/test e2e-vsphere

Gonna hope this was a temporary DNS flake...

@2uasimojo

Copy link
Copy Markdown
Member Author

/assign @suhanime

@2uasimojo

Copy link
Copy Markdown
Member Author

/hold cancel

This should be ready to go now.

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 22, 2026
@2uasimojo

Copy link
Copy Markdown
Member Author

/test e2e-vsphere

Trying to confirm this test infra fix: we want to see a successful run that uses vcenter-120.ci.ibmc.devcluster.openshift.com.

Comment thread contrib/pkg/createcluster/create.go Outdated
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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this i shadows the top level loop's i, is that intentional?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and they loop over the same thing

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@coderabbitai Do you agree that removing LL842 and 849 will yield the same functional result?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@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.

Comment thread contrib/pkg/createcluster/create.go Outdated
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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo ("marhsal")

@dlom

dlom commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@2uasimojo the shadowed i on those identical loops is the only thing that caught my eye. Other than that LGTM

@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 5e671cb to be5631a Compare April 30, 2026 15:25
@2uasimojo

Copy link
Copy Markdown
Member Author

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.
@2uasimojo
2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from be5631a to a1e2bdd Compare April 30, 2026 15:36
@dlom

dlom commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@dlom

dlom commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

:shipit:

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2026
@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD bd520da and 2 for PR HEAD a1e2bdd in total

@2uasimojo

Copy link
Copy Markdown
Member Author

/override ci/prow/security

@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security

Details

In response to this:

/override ci/prow/security

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.

@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 52fd62d into openshift:master Apr 30, 2026
19 checks passed
@2uasimojo
2uasimojo deleted the HIVE-2391/vsphere-zonal branch April 30, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants