Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-63021

[c10s] RHEL for Edge build with image is failing - error: Writing commit: While writing rootfs to mtree: Not a regular file or symlink: zero

    • rpm-ostree-2024.8-2.el10
    • No
    • Important
    • ZStream
    • Customer Escalated
    • 1
    • rhel-sst-rhcos
    • 3
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Core Packages - 261
    • Approved Blocker
    • None

      ​Description of problem:

      The build for Red Hat Device Edge with the composer-cli is failing when image "docker.io/bitnami/mongodb:7.0.12-debian-12-r4" is included.

      The error is:

       

      error: Writing commit: While writing rootfs to mtree: Not a regular file or symlink: urandom
      Traceback (most recent call last):
        File "/run/osbuild/bin/org.osbuild.ostree.commit", line 124, in <module>
          r = main(args["inputs"],
        File "/run/osbuild/bin/org.osbuild.ostree.commit", line 111, in main
          subprocess.run(argv,
        File "/usr/lib64/python3.9/subprocess.py", line 528, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['rpm-ostree', 'compose', 'commit', '--repo=/run/osbuild/tree/repo', '--add-metadata-string=version=9.4', '--add-metadata-string=rpmostree.inputhash=6717b2cd1099b130c0b7501d5659dbeebb42761eba2782f831eecdcd3b537d26', '--write-composejson-to=/run/osbuild/tree/compose.json', '/tmp/tmpchuyuk4w.json', '/run/osbuild/tree/tmpyrvs_hg1']' returned non-zero exit status 1.

       

      I was able to reproduce the issue.

      Check the reproducer below.

       

      Environment and component:

      Stage - build of RHDE for disconnected install.

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

      RHEL 9.4

      How reproducible?

      Followed those steps.

       

      name = "microshift_blueprint" 
      description = ""
      version = "0.0.1"
      modules = []
      groups = []
      
      [[packages]]
      name = "microshift"
      version = "4.16.7"
      
      [customizations.services]
      enabled = ["microshift"]
      
      [customizations.firewall]
      ports = ["22:tcp", "80:tcp", "443:tcp", "5353:udp", "6443:tcp", "30000-32767:tcp", "30000-32767:udp"]
      
      [[containers]]
      source = "registry.redhat.io/rhel9/support-tools@sha256:7c28b6942dd968c28a5ef3d11f5d2826da12de3b44cbce71f092bcfc8326af40"#
      
      [[containers]] 
      source = "docker.io/bitnami/mongodb@sha256:18b71e3d502594371aeada35421eb80385a2cb209548dc728cdb1867b54b0e2a"
      

      nning the following commands

       

      # composer-cli blueprints push microshift_blueprint.toml 
      
      # BUILDID=$(sudo composer-cli compose start-ostree --ref "rhel/9/x86_64/edge" microshift_blueprint edge-container | awk '{print $2}')

      Results:

       

      # composer-cli compose status
      ID                                     Status     Time                       Blueprint              Version   Type               Size
      f2b5d9ef-c08e-4985-aa70-784382783cbb   FINISHED   Wed Sep 18 19:52:42 2024   microshift_blueprint   0.0.1     edge-container     
      
      587c08aa-069e-4e9c-b113-c442a4f330e6   FAILED     Wed Sep 18 19:40:24 2024   microshift_blueprint   0.0.2     edge-container     
      

      Where the:

      • 587c08aa-069e-4e9c-b113-c442a4f330e6 - failed build with the docker.io/bitnami/mongodb image included in the toml build
      • f2b5d9ef-c08e-4985-aa70-784382783cbb - is composer build when the docker.io/bitnami... image is commented out

       

       

       

      Actual results:

      The build fails with

       

      error: Writing commit: While writing rootfs to mtree: Not a regular file or symlink: urandom 

      Expected results:

       

      Successful build.

      Additional info:

      I was running the reproducer on 9.3 and got similar error

       

      error: Writing commit: While writing rootfs to mtree: Not a regular file or symlink: zero 

      Could be the issue that the image from the docker.io only contains 1 layer:

       

       

      #podman pull bitnami/mongodb:7.0.12-debian-12-r4
      
      Trying to pull docker.io/bitnami/mongodb:7.0.12-debian-12-r4...
      Getting image source signatures
      Copying blob 8a12b7ff2e3e done   | 
      Copying config ed0bb13cff done   | 
      Writing manifest to image destination
      ed0bb13cff5dee811e2b0a9a038cbd7fad977cdf14a4822205083e3c739af36f

      When investigated the image, we see that the only layer is rootfs:

       

       

      skopeo --debug --override-arch amd64 --override-os linux inspect docker://docker.io/bitnami/mongodb:7.0.12-debian-12-r4 2>&1 | less
      
      [...]
          "LayersData": [
              {
                  "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                  "Digest": "sha256:8a12b7ff2e3ea7217fa0ea7c2cfb001196aa2a00ab2cfb322eaf38d391423f1d",
                  "Size": 243175963,
                  "Annotations": null
              }
          ],
       

       

       

      However, looking at the "support-tools" image, it also has rootfs layers. So most likely it is not caused by the layer type.

              rhn-support-jmarrero Joseph Marrero Corchado
              rhn-support-vwalek Vladislav Walek
              CoreOS Bot CoreOS Bot
              Huijing Hei Huijing Hei
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: