Uploaded image for project: 'CoreOS OCP'
  1. CoreOS OCP
  2. COS-4005

[coreos/rhel-coreos-config] DESCRIPTION contains period (.) which breaks OpenShift CVO label validation

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected

      [4015979983] Upstream Reporter: Clement Verna
      Upstream issue status: Open
      Upstream description:

        1. Summary

      The `DESCRIPTION` value in `build-args-rhel-9.8.conf` contains a period (`.`) in the version number "9.8", which causes OpenShift release image validation to fail.

        1. Error

      ```
      error: unable to check whether to include image quay-proxy.ci.openshift.org/openshift/ci@sha256:800e57dce493a5785335000053e881476c6fbfda6492304a3ab7c1117f5d6279: tag "rhel-coreos" has an invalid io.openshift.build.versions or io.openshift.build.version-display-names label: the display name "Red Hat Enterprise Linux CoreOS 9.8" must only be alphanumerics, spaces, and symbols in [():-]
      ```

        1. Root Cause

      Commit e84448ce ("build-args-rhel-*: adjust DESCRIPTION for openshift labels") set:

      ```
      DESCRIPTION=Red Hat Enterprise Linux CoreOS 9.8
      ```

      This value is used via PR https://github.com/coreos/fedora-coreos-config/pull/4001 to set the label:

      ```
      --label io.openshift.build.version-display-names=machine-os="${DESCRIPTION}"
      ```

      However, the validation in `openshift/oc` (`pkg/cli/admin/release/image_mapper.go`) uses a regex that does *not* allow periods:

      ```go
      reAllowedDisplayNameKey = regexp.MustCompile(`^[a-zA-Z0-9-:s()]+$`)
      ```

      Allowed characters: `a-z`, `A-Z`, `0-9`, `-`, `:`, spaces, `(`, `)` ? but *not `.`*

        1. Affected Files
      • `build-args-rhel-9.8.conf`
      • `build-args-rhel-10.2.conf` (likely has same issue)
        1. Suggested Fix

      Remove the period from the `DESCRIPTION` value. Options:

      1. `DESCRIPTION=Red Hat Enterprise Linux CoreOS 9` (drop minor version)
      2. `DESCRIPTION=Red Hat Enterprise Linux CoreOS 9-8` (use hyphen instead)
      3. `DESCRIPTION=Red Hat Enterprise Linux CoreOS` (match previous label format)

      Option 3 matches what was used before this change according to the commit message.

              rhn-engineering-dgoodwin Devan Goodwin
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: