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

Should print out an error if single arch image specified with non-expected arch by filter-by-os

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.16.0
    • 4.16.0
    • oc
    • None
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • Done

      Description of problem:

      Should print out an error if single arch image specified with non-expected arch by filter-by-os

      Version-Release number of selected component (if applicable):

       oc version Client Version: 4.16.0-202403121314.p0.gc92b507.assembly.stream-c92b507

      How reproducible:

          Always 

      Steps to Reproduce:

      1)  Use `filter-by-os linux/amd64` for the image only with arch : arm64 
      `oc image info  quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64  --filter-by-os linux/amd64
      
      2) Use invalid `--filter-by-os linux/invalid` for the image 
      `oc image info  quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64  --filter-by-os linux/invalid`     

      Actual results:

         1) Succeed with no error or warning
      oc image info  quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64  --filter-by-os linux/amd64
      Name:        quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64
      Digest:      sha256:0c13de057d9f75c40999778bb924f654be1d0def980acbe8a00096e6bf18cc2a
      Media Type:  application/vnd.docker.distribution.manifest.v2+json
      Created:     16d ago
      Image Size:  155.5MB in 5 layers
      Layers:      75.95MB sha256:f90c4920e095dc91c490dd9ed7920d18e0327ddedcf5e10d2887e80ccae94fd7
                   42.16MB sha256:a974fa00e888c491ab67f8d63456937bbaffbebb530db5ee2f9f5193fc5bb910
                   10.2MB  sha256:c391a61f467f437cf6a0ba00c394aa4dbc107ecf56edd91a018de97ca4cd16bc
                   26.07MB sha256:0e78634759d2f9c988dbf5ee73a7ed9a5d3b4ec28dcad5dd9086544826bbde05
                   1.115MB sha256:277f2a9ba38386db697a1cbde875c1ec79988a632d006c6d697d0a79911d9955
      OS:          linux
      Arch:        arm64
      Entrypoint:  /usr/bin/cluster-version-operator
      Environment: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                   container=oci
                   GODEBUG=x509ignoreCN=0,madvdontneed=1
                   __doozer=merge
                   BUILD_RELEASE=202403070215.p0.g6a76ba9.assembly.stream.el9
                   BUILD_VERSION=v4.16.0
                   OS_GIT_MAJOR=4
                   OS_GIT_MINOR=16
                   OS_GIT_PATCH=0
                   OS_GIT_TREE_STATE=clean
                   OS_GIT_VERSION=4.16.0-202403070215.p0.g6a76ba9.assembly.stream.el9-6a76ba9
                   SOURCE_GIT_TREE_STATE=clean
                   __doozer_group=openshift-4.16
                   __doozer_key=cluster-version-operator
                   __doozer_version=v4.16.0
                   OS_GIT_COMMIT=6a76ba9
                   SOURCE_DATE_EPOCH=1709342193
                   SOURCE_GIT_COMMIT=6a76ba95ed441893e1bdf6616c47701c0464b7f4
                   SOURCE_GIT_TAG=v1.0.0-1176-g6a76ba95
                   SOURCE_GIT_URL=https://github.com/openshift/cluster-version-operator
      Labels:      io.openshift.release=4.16.0-ec.4
                   io.openshift.release.base-image-digest=sha256:fa1b36be29e72ca5c180ce8cc599a1f0871fa5aacd3153ed4cefc84038cd439a 
      
      2) succeed with no error or warning:
      oc image info  quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64  --filter-by-os linux/invalid
      Name:        quay.io/openshift-release-dev/ocp-release:4.16.0-ec.4-aarch64
      Digest:      sha256:0c13de057d9f75c40999778bb924f654be1d0def980acbe8a00096e6bf18cc2a
      Media Type:  application/vnd.docker.distribution.manifest.v2+json
      Created:     16d ago
      Image Size:  155.5MB in 5 layers
      Layers:      75.95MB sha256:f90c4920e095dc91c490dd9ed7920d18e0327ddedcf5e10d2887e80ccae94fd7
                   42.16MB sha256:a974fa00e888c491ab67f8d63456937bbaffbebb530db5ee2f9f5193fc5bb910
                   10.2MB  sha256:c391a61f467f437cf6a0ba00c394aa4dbc107ecf56edd91a018de97ca4cd16bc
                   26.07MB sha256:0e78634759d2f9c988dbf5ee73a7ed9a5d3b4ec28dcad5dd9086544826bbde05
                   1.115MB sha256:277f2a9ba38386db697a1cbde875c1ec79988a632d006c6d697d0a79911d9955
      OS:          linux
      Arch:        arm64
      Entrypoint:  /usr/bin/cluster-version-operator
      Environment: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                   container=oci
                   GODEBUG=x509ignoreCN=0,madvdontneed=1
                   __doozer=merge
                   BUILD_RELEASE=202403070215.p0.g6a76ba9.assembly.stream.el9
                   BUILD_VERSION=v4.16.0
                   OS_GIT_MAJOR=4
                   OS_GIT_MINOR=16
                   OS_GIT_PATCH=0
                   OS_GIT_TREE_STATE=clean
                   OS_GIT_VERSION=4.16.0-202403070215.p0.g6a76ba9.assembly.stream.el9-6a76ba9
                   SOURCE_GIT_TREE_STATE=clean
                   __doozer_group=openshift-4.16
                   __doozer_key=cluster-version-operator
                   __doozer_version=v4.16.0
                   OS_GIT_COMMIT=6a76ba9
                   SOURCE_DATE_EPOCH=1709342193
                   SOURCE_GIT_COMMIT=6a76ba95ed441893e1bdf6616c47701c0464b7f4
                   SOURCE_GIT_TAG=v1.0.0-1176-g6a76ba95
                   SOURCE_GIT_URL=https://github.com/openshift/cluster-version-operator
      Labels:      io.openshift.release=4.16.0-ec.4
                   io.openshift.release.base-image-digest=sha256:fa1b36be29e72ca5c180ce8cc599a1f0871fa5aacd3153ed4cefc84038cd439a
      
      [root@localhost Doc]# echo $?
      0

      Expected results:

      1) If the image is not a manifest list , we’d better to print out an error as these is nothing to filter Or have a warning this is not at manifest-list image;
      
      2) Better to print out with error for the invalid arch.

      Additional info:

          

              aguclu@redhat.com Arda Guclu
              yinzhou@redhat.com ying zhou
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: