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

Image Builder fails when vfat is blacklisted by some standards

    • Minor
    • sst_image_builder
    • ssg_front_door
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      The worker fails with a python traceback with a very limited track to investigate why it failed. In short we only know this:
      osbuild.host.RemoteError: CalledProcessError: Command '['mount', '-t', 'vfat', '--source', '/run/osbuild/osbuild-dev-1c3snfrw/loop0', '--target', '/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi']' returned non-zero exit status 32.

      Version-Release number of selected component (if applicable):
      osbuild-composer-62-3.el8_7.x86_64
      osbuild-composer-worker-62-3.el8_7.x86_64
      osbuild-65-1.el8.noarch

      How reproducible:
      Always

      Steps to Reproduce:
      1. Implement CIS security standards (https://www.cisecurity.org/benchmark/red_hat_linux)

      1. grep vfat /etc/modprobe.d/cis.conf
        install vfat /bin/true

      2. Try to create a VMDK image

      Actual results:
      Feb 23 13:41:34 localhost osbuild-worker[1878946]: time="2023-02-23T13:41:34-05:00" level=info msg="Running job 'af7e404b-8be1-4136-b9ff-8e1eb757ecb8' (osbuild)\n"
      Feb 23 14:00:38 localhost platform-python[3853757]: detected unhandled Python exception in '/usr/bin/osbuild'
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: Traceback (most recent call last):
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/bin/osbuild", line 11, in <module>
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: load_entry_point('osbuild==65', 'console_scripts', 'osbuild')()
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/main_cli.py", line 169, in osbuild_cli
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: stage_timeout=stage_timeout
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/pipeline.py", line 452, in build
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: res = pl.run(store, monitor, libdir, stage_timeout)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/pipeline.py", line 363, in run
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: stage_timeout)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/pipeline.py", line 337, in build_stages
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: stage_timeout)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/pipeline.py", line 221, in run
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: data = mntmgr.mount(mount)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/mounts.py", line 77, in mount
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: path = client.call("mount", args)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/host.py", line 348, in call
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: ret, _ = self.call_with_fds(method, args)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/host.py", line 384, in call_with_fds
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: raise error
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: osbuild.host.RemoteError: CalledProcessError: Command '['mount', '-t', 'vfat', '--source', '/run/osbuild/osbuild-dev-1c3snfrw/loop0', '--target', '/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi']' returned non-zero exit status 32.
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/host.py", line 268, in serve
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: reply, reply_fds = self._handle_message(msg, fds)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/host.py", line 301, in _handle_message
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: ret, fds = self.dispatch(name, args, fds)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/mounts.py", line 110, in dispatch
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: r = self.mount(args)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib/python3.6/site-packages/osbuild/mounts.py", line 149, in mount
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: check=True)
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: File "/usr/lib64/python3.6/subprocess.py", line 438, in run
      Feb 23 14:00:38 localhost osbuild-worker[3853757]: output=stdout, stderr=stderr)
      Feb 23 14:00:38 localhost osbuild-worker[1878946]: time="2023-02-23T14:00:38-05:00" level=error msg="osbuild job failed: osbuild build failed" jobId=af7e404b-8be1-4136-b9ff-8e1eb757ecb8
      Feb 23 14:00:38 localhost osbuild-worker[1878946]: time="2023-02-23T14:00:38-05:00" level=warning msg="Job 'af7e404b-8be1-4136-b9ff-8e1eb757ecb8' (osbuild) failed: error decoding osbuild output: unexpected end of JSON input\nthe raw output:\n"

      Expected results:
      The compose log is not empty and/or the fatal error causing the issue is reported somehow: "/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi: unknown filesystem type 'vfat'."

      Additional info:
      3892727 14:00:10.625710 execve("/usr/bin/mount", ["mount", "-t", "vfat", "--source", "/run/osbuild/osbuild-dev-1c3snfrw/loop0", "--target", "/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi"], ["LANG=en_US.UTF-8", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", "INVOCATION_ID=66f1bd1e8cd041659d889f15d8c947e5", "JOURNAL_STREAM=9:46845814", "CACHE_DIRECTORY=/var/cache/osbuild-worker", "PYTHONPATH=/usr/lib/python3.6/site-packages", "PYTHONUNBUFFERED=1"] <unfinished ...>
      :
      3892727 14:00:10.640515 lstat("/run/osbuild/osbuild-dev-1c3snfrw/loop0",

      {st_dev=makedev(0, 0x30), st_ino=52376612, st_mode=S_IFBLK|0600, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_rdev=makedev(0x7, 0), st_atime=1677178809 /* 2023-02-23T14:00:09.086059538-0500 */, st_atime_nsec=86059538, st_mtime=1677178809 /* 2023-02-23T14:00:09.086059538-0500 */, st_mtime_nsec=86059538, st_ctime=1677178809 /* 2023-02-23T14:00:09.086059538-0500 */, st_ctime_nsec=86059538}

      ) = 0 <0.000096>
      ;
      3892727 14:00:10.641429 lstat("/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi",

      {st_dev=makedev(0x7, 0x1), st_ino=2097280, st_mode=S_IFDIR|0755, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=6, st_atime=1677178810 /* 2023-02-23T14:00:10.622097056-0500 */, st_atime_nsec=622097056, st_mtime=1677178810 /* 2023-02-23T14:00:10.622097056-0500 */, st_mtime_nsec=622097056, st_ctime=1677178810 /* 2023-02-23T14:00:10.622097056-0500 */, st_ctime_nsec=622097056}

      ) = 0 <0.000015>
      3892727 14:00:10.641521 stat("/sbin/mount.vfat", 0x7ffe060ce850) = -1 ENOENT (No such file or directory) <0.000022>
      :
      3892727 14:00:10.642403 mount("/run/osbuild/osbuild-dev-1c3snfrw/loop0", "/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi", "vfat", MS_MGC_VAL, NULL) = -1 ENODEV (No such device) <0.030853>
      :
      3892727 14:00:10.673777 write(2<pipe:[52375186]>, "mount: ", 7) = 7 <0.000021>
      3892727 14:00:10.673854 write(2<pipe:[52375186]>, "/var/cache/osbuild-worker/osbuild-store/tmp/buildroot-tmp-61r3d8fr/mounts/boot/efi: unknown filesystem type 'vfat'.", 115) = 115 <0.000014>
      :
      3892727 14:00:10.674144 exit_group(32) = ?
      3892727 14:00:10.674371 +++ exited with 32 +++

            osbuilders Osbuilders Bot Account
            rhn-support-cbesson Christophe Besson
            Osbuilders Bot Account Osbuilders Bot Account
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: