Bug 2090182
Summary: | [Nutanix]Create a machineset with invalid image, machine stuck in "Provisioning" phase | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Huali Liu <huliu> |
Component: | Cloud Compute | Assignee: | Yanhua Li <yanhli> |
Cloud Compute sub component: | Other Providers | QA Contact: | Huali Liu <huliu> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | low | ||
Version: | 4.11 | ||
Target Milestone: | --- | ||
Target Release: | 4.11.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-08-10 11:14:09 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Huali Liu
2022-05-25 10:21:56 UTC
The fix is to add validation of the VM configuration fields in the machine.spec.providerSpec before calling the prism API to create a VM. If the validation fails, an InvalidMachineConfiguration error will return with all the VM configuration errors. Verified on 4.11.0-0.nightly-2022-06-15-161625 Steps: 1.Create a machineset with invalid image liuhuali@Lius-MacBook-Pro huali-test % oc create -f ms1.yaml machineset.machine.openshift.io/huliu-n19-xtt9d-1 created 2.Check the machine go into Failed phase, and shows InvalidConfiguration error liuhuali@Lius-MacBook-Pro huali-test % oc get machine NAME PHASE TYPE REGION ZONE AGE huliu-n19-xtt9d-1-ppvpf Failed 4s huliu-n19-xtt9d-master-0 Running 62m huliu-n19-xtt9d-master-1 Running 62m huliu-n19-xtt9d-master-2 Running 62m huliu-n19-xtt9d-worker-96w2l Running 57m huliu-n19-xtt9d-worker-x44fk Running 57m liuhuali@Lius-MacBook-Pro huali-test % oc get machine huliu-n19-xtt9d-1-ppvpf -o yaml ... status: conditions: - lastTransitionTime: "2022-06-16T02:38:37Z" status: "True" type: Drainable - lastTransitionTime: "2022-06-16T02:38:37Z" message: Instance has not been created reason: InstanceNotCreated severity: Warning status: "False" type: InstanceExists - lastTransitionTime: "2022-06-16T02:38:37Z" status: "True" type: Terminable errorMessage: 'huliu-n19-xtt9d-1-ppvpf: failed in validating machine providerSpec: spec.providerSpec.value.image.name: Invalid value: "huliu-n19-xtt9d-rhcosqqq": Failed to find image with name "huliu-n19-xtt9d-rhcosqqq". error: Failed to find image by name "huliu-n19-xtt9d-rhcosqqq". error: %!w(<nil>)' errorReason: InvalidConfiguration lastUpdated: "2022-06-16T02:38:38Z" phase: Failed providerStatus: conditions: - message: 'huliu-n19-xtt9d-1-ppvpf: failed in validating machine providerSpec: spec.providerSpec.value.image.name: Invalid value: "huliu-n19-xtt9d-rhcosqqq": Failed to find image with name "huliu-n19-xtt9d-rhcosqqq". error: Failed to find image by name "huliu-n19-xtt9d-rhcosqqq". error: %!w(<nil>)' reason: MachineCreationFailed status: "False" type: MachineCreation - message: Machine instance is not ready reason: Machine instance is not ready status: "False" type: MachineInstanceReady Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069 |