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

[v2] oc-mirror v2 needs to inform user of bad umask settings on disk2mirror

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • CLID Sprint 271, CLID Sprint 272, CLID Sprint 273, CLID Sprint 274
    • 4
    • Done
    • Bug Fix
    • Hide
      Before this update, setting the system umask was set to 0077 for STIG compliance caused disk2mirror to skip uploading release images. As a consequence, users could not upload OCP release images due to the umask restriction. With this release, oc-mirror now handles the bad umask or alerts the user.
      Show
      Before this update, setting the system umask was set to 0077 for STIG compliance caused disk2mirror to skip uploading release images. As a consequence, users could not upload OCP release images due to the umask restriction. With this release, oc-mirror now handles the bad umask or alerts the user.
    • None
    • None
    • None
    • None

      Description of problem:

          When the system umask is set to 0077 for STIG compliance, disk2mirror skips uploading of OCP release images

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

          oc-mirror 4.18.9 v2

      How reproducible:

          100%

      Steps to Reproduce:

          1.Mirror 2 disk with umask 0077
          2.Disk 2 mirror with umask 0077
          3.
          

      Actual results:

          oc-mirror skips pushing the OpenShift release images

      Expected results:

          oc mirror handles the bad umask or alerts the user that the umask setting is invalid

      Additional info:

          The RHEL STIGs require that the system umask be 0077.
      
      In oc-mirror v1, a umask of 0077 would cause the operator index and graph images to have bad file permissions inside the containers that would then fail to run in OpenShift.
      
      oc-mirror v2 skips the release image push when the umask is 0077 with this output
      
      
      
      2025/04/25 09:38:54 ^[[1;94m [INFO] ^[[0m  : 🔀 workflow mode: mirrorToDisk
      2025/04/25 09:38:55 ^[[1;94m [INFO] ^[[0m  : 🕵   going to discover the necessary images...
      2025/04/25 09:38:55 ^[[1;94m [INFO] ^[[0m  : 🔍 collecting release images...
      2025/04/25 09:39:14 ^[[1;94m [INFO] ^[[0m  : 🔍 collecting operator images...
      2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m  : 🔍 collecting additional images...
      2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m  : 🔍 collecting helm images...
      2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m  : 🔂 rebuilding catalogs
      2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m  : 🚀 Start copying the images...
      2025/04/25 09:40:06 ^[[1;94m [INFO] ^[[0m  : 📌 images to copy 194
      2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m  : === Results ===
      2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m  : ^[[1;92m ✓ ^[[0m 190 / 190 release images mirrored successfully
      2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m  : ^[[1;92m ✓ ^[[0m 4 / 4 operator images mirrored successfully
      2025/04/25 09:41:36 ^[[1;94m [INFO] ^[[0m  : 📦 Preparing the tarball archive...
      2025/04/25 09:44:49 ^[[1;94m [INFO] ^[[0m  : mirror time     : 5m53.611617929s
      2025/04/25 09:44:49 ^[[1;94m [INFO] ^[[0m  : 👋 Goodbye, thank you for using oc-mirror

              luzuccar@redhat.com Luigi Mario Zuccarelli
              dan5179 Dan Clark
              None
              None
              May Xu May Xu
              None
              Votes:
              94 Vote for this issue
              Watchers:
              38 Start watching this issue

                Created:
                Updated: