OCPBUGS-77219: vsphere - fix Get-VM null error in multi-vCenter thread jobs#10334
OCPBUGS-77219: vsphere - fix Get-VM null error in multi-vCenter thread jobs#10334jcpowermac wants to merge 2 commits intoopenshift:mainfrom
Conversation
In multi-vCenter environments, the thread job in New-OpenshiftVMs passes a string for -Location to Get-Folder and Get-VM. When multiple vCenters are connected, the implicit string-to-Datacenter conversion fails to scope to the correct server, causing "Value cannot be null" errors for VMs on the non-default vCenter. Explicitly resolve the datacenter string to a Datacenter object via Get-Datacenter before passing it to Get-Folder and Get-VM. Fixes OCPBUGS-77219 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@jcpowermac: This pull request references Jira Issue OCPBUGS-77219, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold needs to be tested, wish I created as draft |
|
/test e2e-vsphere-multi-vcenter-ovn |
|
/test ? |
|
/test e2e-vsphere-ovn-upi |
|
/test ? |
1 similar comment
|
/test ? |
|
/test e2e-vsphere-ovn-upi-multi-vcenter |
|
@jcpowermac: 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. |
In multi-vCenter environments, the thread job in New-OpenshiftVMs passes a string for -Location to Get-Folder and Get-VM. When multiple vCenters are connected, the implicit string-to-Datacenter conversion fails to scope to the correct server, causing "Value cannot be null" errors for VMs on the non-default vCenter.
Explicitly resolve the datacenter string to a Datacenter object via Get-Datacenter before passing it to Get-Folder and Get-VM.
Fixes OCPBUGS-77219