Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-59331

Nutanix preloadedOSImageName requires special name format

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 4.20.0
    • Installer / Nutanix
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 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

      https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html-single/installing_on_nutanix/index#installation-configuration-parameters-additional-nutanix_installation-config-parameters-nutanix

      Therefore, I did the following (steps to reproduce):

      > https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.18/4.18.1/rhcos-nutanix.x86_64.qcow2

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

       

              aaggrawa Abhay Aggrawal
              rh-ee-jhensche Jack Henschel
              None
              None
              None
              None
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: