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

composer-cli compose fails in CentOS Stream 8 when executed as root user

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • osbuild
    • None
    • None
    • rhel-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:

      When the composer-cli compose start-ostree command is executed as root user in CentOS Stream 8 VM fails showing the following error:
      FileNotFoundError: [Errno 2] No such file or directory: '/run/osbuild/bin/org.osbuild.rpm': '/run/osbuild/bin/org.osbuild.rpm'

      Version-Release number of selected component (if applicable):
      + source /etc/os-release
      ++ NAME='CentOS Stream'
      ++ VERSION=8
      ++ ID=centos
      ++ ID_LIKE='rhel fedora'
      ++ VERSION_ID=8
      ++ PLATFORM_ID=platform:el8
      ++ PRETTY_NAME='CentOS Stream 8'
      ++ ANSI_COLOR='0;31'
      ++ CPE_NAME=cpe:/o:centos:centos:8
      ++ HOME_URL=https://centos.org/
      ++ BUG_REPORT_URL=https://bugzilla.redhat.com/
      ++ REDHAT_SUPPORT_PRODUCT='Red Hat Enterprise Linux 8'
      ++ REDHAT_SUPPORT_PRODUCT_VERSION='CentOS Stream'

      ------------------------------------------------------------------------------
      CI MACHINE SPECS
      ------------------------------------------------------------------------------
      Hostname: mcattamo-cs8-test-3
      User: centos
      CPUs: 4
      RAM: 7763 MB
      DISK: 60 GB
      ARCH: x86_64
      KERNEL: 4.18.0-358.el8.x86_64
      ------------------------------------------------------------------------------

      How reproducible:
      100%

      Steps to Reproduce:
      1.Execute as root
      + sudo composer-cli --json compose start-ostree --ref centos/8/x86_64/edge container edge-container
      2.
      3.

      Actual results:
      Compose fails showing this output log
      [centos@mcattamo-cs8-test-3 rhel-edge]$ cat osbuild-centos-8-ng-b8234117-a09c-4bbf-b818-57c8dbdc207b.log
      Pipeline build
      Stage org.osbuild.rpm
      Output:
      [/usr/lib/tmpfiles.d/httpd.conf:1] Unknown group 'apache'.
      [/usr/lib/tmpfiles.d/httpd.conf:2] Unknown user 'apache'.
      [/usr/lib/tmpfiles.d/journal-nocow.conf:26] Failed to resolve specifier: uninitialized /etc detected, skipping
      All rules containing unresolvable specifiers will be skipped.
      [/usr/lib/tmpfiles.d/rpcbind.conf:2] Unknown user 'rpc'.
      [/usr/lib/tmpfiles.d/setroubleshoot.conf:1] Unknown user 'setroubleshoot'.
      Failed to create file /sys/fs/selinux/checkreqprot: Read-only file system
      Traceback (most recent call last):
      File "/run/osbuild/lib/osbuild/api.py", line 190, in exception_handler
      yield
      File "/run/osbuild/lib/runners/org.osbuild.centos8", line 78, in main
      check=False)
      File "/usr/lib64/python3.6/subprocess.py", line 423, in run
      with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib64/python3.6/subprocess.py", line 729, in _init_
      restore_signals, start_new_session)
      File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '/run/osbuild/bin/org.osbuild.rpm': '/run/osbuild/bin/org.osbuild.rpm'

      Expected results:
      Compose successfully built

      Additional info:

              akoutsou@redhat.com Achilleas Koutsou
              rh-ee-mcattamo Mario Cattamo
              Achilleas Koutsou Achilleas Koutsou
              Mario Cattamo Mario Cattamo
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: