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

oc-mirror should not GenerateSignatureConfigMap when not mirror the release images

XMLWordPrintable

    • Moderate
    • None
    • CLID Sprint 260
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • In Progress

      Description of problem:

      oc-mirror failed with error : [ERROR]  : [GenerateSignatureConfigMap] signature files not found, could not generate signature configmap 
      when only mirror catalogsource images

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

      ./oc-mirror.18latest version 
      WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.18.0-202409231040.p0.ga5a32fa.assembly.stream.el9-a5a32fa", GitCommit:"a5a32fa3a01f3601f845b649c05e85ce84cbe618", GitTreeState:"clean", BuildDate:"2024-09-23T11:14:37Z", GoVersion:"go1.22.5 (Red Hat 1.22.5-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      100%

      Steps to Reproduce:

      1. will imagesetconfig like : 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16
          packages:
          - name: multiarch-tuning-operator
            minVersion: 0.9.0
            maxVersion: 0.9.0
      
      2) run command : 
      `./oc-mirror.18latest  -c config-37867.yaml --workspace file://41608 docker://localhost:5000 --v2 --dest-tls-verify=false`

      Actual results:

      2)  command failed with error: 
      ./oc-mirror.18latest  -c config-37867.yaml --workspace file://41608 docker://localhost:5000 --v2 --dest-tls-verify=false2024/09/25 04:59:59  [WARN]   : ⚠️  --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready.
      2024/09/25 04:59:59  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/09/25 04:59:59  [INFO]   : ⚙️  setting up the environment for you...
      2024/09/25 04:59:59  [INFO]   : 🔀 workflow mode: mirrorToMirror 
      2024/09/25 04:59:59  [INFO]   : 🕵️  going to discover the necessary images...
      2024/09/25 04:59:59  [INFO]   : 🔍 collecting release images...
      2024/09/25 04:59:59  [INFO]   : 🔍 collecting operator images...
      2024/09/25 05:00:35  [WARN]   : [OperatorImageCollector] gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 has both tag and digest : using digest to pull, but tag only for mirroring
      2024/09/25 05:00:35  [INFO]   : 🔍 collecting additional images...
      2024/09/25 05:00:35  [INFO]   : 🚀 Start copying the images...
      2024/09/25 05:00:35  [INFO]   : images to copy 5 
       ✓   1/5 : (7s) docker://gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 
       ✓ 2/5 : (12s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-rhel9-operator@sha256:118500bb10296469335b260ba28fb67785d05b1f9d0aab7db…
       ✓ 3/5 : (8s) docker://registry.redhat.io/multiarch-tuning/multiarch-tuning-operator-bundle@sha256:b7c0e2ac16ea027d5af85e3ee10556e2f4cb5cbda956e432b…
       ✓   4/5 : (15s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 
       ✓   5/5 : (4s) docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 
      2024/09/25 05:00:51  [INFO]   : === Results ===
      2024/09/25 05:00:51  [INFO]   : ✅ 5 / 5 operator images mirrored successfully
      2024/09/25 05:00:51  [INFO]   : 📄 Generating IDMS file...
      2024/09/25 05:00:51  [INFO]   : 41608/working-dir/cluster-resources/idms-oc-mirror.yaml file created
      2024/09/25 05:00:51  [INFO]   : 📄 Generating ITMS file...
      2024/09/25 05:00:51  [INFO]   : 41608/working-dir/cluster-resources/itms-oc-mirror.yaml file created
      2024/09/25 05:00:51  [INFO]   : 📄 Generating CatalogSource file...
      2024/09/25 05:00:51  [INFO]   : 41608/working-dir/cluster-resources/cs-redhat-operator-index-v4-16.yaml file created
      2024/09/25 05:00:51  [INFO]   : 📄 Generating Signature Configmap...
      2024/09/25 05:00:51  [WARN]   : [GenerateSignatureConfigMap] signature files not found, could not generate signature configmap
      2024/09/25 05:00:51  [INFO]   : mirror time     : 51.816725542s
      2024/09/25 05:00:51  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      2024/09/25 05:00:51  [ERROR]  : [GenerateSignatureConfigMap] signature files not found, could not generate signature configmap 
      [fedora@preserve-fedora-yinzhou yinzhou]$ echo $?
      1

       

       

      Expected results:

      Should not try to generate signature when without mirror release . 

       

            luzuccar@redhat.com Luigi Mario Zuccarelli
            yinzhou@redhat.com ying zhou
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: