-
Bug
-
Resolution: Done
-
Undefined
-
None
-
4.20.0
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
Customer Facing, Customer Reported
-
None
-
None
-
None
-
None
-
None
-
None
-
None
For a recent customer project, I had to upload the cluster OS Image to a particular Nutanix Prism Element cluster. For this purpose, I wanted to use the "platform.nutanix.preloadedOSImageName" installation parameter, which is documented as follows:
> Instead of creating and uploading a RHCOS image object for each OpenShift Container Platform cluster, this parameter uses the named, preloaded RHCOS image object from the Prism Elements to which the OpenShift Container Platform cluster is deployed.
> Type: String
Therefore, I did the following (steps to reproduce):
- Download the latest Nutanix OS image from https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.18/4.18.1/
- Upload the disk image to Nutanix Prism Element named "rhcos-nutanix.x86_64.qcow2"
- Set the configuration parameter as follows:
platform: nutanix: preloadedOSImageName: "rhcos-nutanix.x86_64.qcow2"
- Initiate the installation.
Expected behavior: the installation succeeds and uses the preloaded OS image.
Actual behavior: the installer complains with the following error message:
> level=fatal msg=failed to fetch Cluster Infrastructure Variables: failed to fetch dependency of "Cluster Infrastructure Variables": failed to generate asset "Platform Provisioning Check": platform.nutanix.preloadedOSImageName: Invalid value: "usphoocp01-rhcos-nutanix.x86_64": fail to validate the preloaded rhcos image: failed to get the rhcos image version number from the version string nutanix: strconv.Atoi: parsing "nutanix": invalid syntax
After some troubleshooting I figured out that the installer expects the name of the preloaded OS image to be in a particular format:
https://github.com/openshift/installer/blob/fe225d16eef71880ba4cd8027f6f9e5b2b0d3063/pkg/asset/installconfig/nutanix/validation.go#L158
Workaround: upload an OS image with a name following this logic:
> coreos_release=$(openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.nutanix.release')
> preloadedOSImageName="rhcos-${coreos_release}.qcow2"
For example:
> mycluster-rhcos-418.94.202501221327-0.qcow2
In my opinion, we should not rely on the name of the OS image.
Customers may want to name this image according to their own needs.
The IPI installer itself does not follow this naming convention either (it names the image simply "${infrastructureName}-rhcos").
If we must use such a format, it should at least be documented clearly.