Skip to content

cosa build with override/rootfs failed with PermissionError #4096

@HuijingHei

Description

@HuijingHei

Do cosa build with override/rootfs on remote debug-pod s390x failed

cosa init --yumrepos https://gitlab.cee.redhat.com/coreos/redhat-coreos.git --variant c9s https://github.com/coreos/rhel-coreos-config
cosa build / <cosa osbuild qemu>
ostree container image deploy --imgref=ostree-unverified-image:oci-archive:/tmp/tmpdzr8of7v/image --stateroot=scos --target-imgref=ostree-image-signed:oci-archive:/scos-9.0.20250508-0-ostree.s390x.ociarchive --karg=rw --karg= --sysroot=/run/osbuild/tree


Traceback (most recent call last):
  File "/run/osbuild/bin/org.osbuild.ostree.deploy.container", line 72, in <module>
    r = main(stage_args["tree"],
  File "/run/osbuild/bin/org.osbuild.ostree.deploy.container", line 67, in main
    ostree_container_deploy(tree, inputs, osname, target_imgref, kopts)
  File "/run/osbuild/bin/org.osbuild.ostree.deploy.container", line 41, in ostree_container_deploy
    ostree.cli("container", "image", "deploy",
  File "/run/osbuild/lib/osbuild/util/ostree.py", line 226, in cli
    return subprocess.run(["ostree"] + args,
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ostree', 'container', 'image', 'deploy', '--imgref=ostree-unverified-image:oci-archive:/tmp/tmpdzr8of7v/image', '--stateroot=scos', '--target-imgref=ostree-image-signed:oci-archive:/scos-9.0.20250508-0-ostree.s390x.ociarchive', '--karg=rw', '--karg=', '--sysroot=/run/osbuild/tree']' died with <Signals.SIGSEGV: 11>.

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdc1        40G  6.6G   34G  17% /srv/rhcos/cache


⏱  Duration: 1098s
manifest /tmp/osbuild-AYaa.json failed
Failed
Traceback (most recent call last):
  File "/usr/lib64/python3.13/shutil.py", line 696, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 1] Operation not permitted: 'bin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.13/shutil.py", line 700, in _rmtree_safe_fd
    onexc(os.unlink, fullname, err)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/shutil.py", line 754, in onexc
    return onerror(func, path, exc_info)
  File "/usr/lib/python3.13/site-packages/osbuild/util/rmrf.py", line 105, in on_error
    unlink(p)
    ~~~~~~^^^
  File "/usr/lib/python3.13/site-packages/osbuild/util/rmrf.py", line 91, in unlink
    os.unlink(p)
    ~~~~~~~~~^^^
PermissionError: [Errno 1] Operation not permitted: '/srv/rhcos/cache/osbuild/store/stage/uuid-07785db37f174b229708f3020796caf2/data/tree/ostree/deploy/scos/deploy/1e810464e56f72ea426eadee4170de23507e8800b73ed1d6b7048d7876465137.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/osbuild", line 33, in <module>
    sys.exit(load_entry_point('osbuild==147', 'console_scripts', 'osbuild')())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/osbuild/main_cli.py", line 171, in osbuild_cli
    with ObjectStore(args.cache) as object_store:
         ~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/osbuild/objectstore.py", line 458, in __exit__
    self.cleanup()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/osbuild/objectstore.py", line 445, in cleanup
    self._stack.close()
    ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/contextlib.py", line 627, in close
    self.__exit__(None, None, None)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/contextlib.py", line 619, in __exit__
    raise exc
  File "/usr/lib64/python3.13/contextlib.py", line 604, in __exit__
    if cb(*exc_details):
       ~~^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/osbuild/objectstore.py", line 155, in __exit__
    self.cleanup()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/osbuild/objectstore.py", line 239, in cleanup
    self._stack.close()
    ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/contextlib.py", line 627, in close
    self.__exit__(None, None, None)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/contextlib.py", line 619, in __exit__
    raise exc
  File "/usr/lib64/python3.13/contextlib.py", line 604, in __exit__
    if cb(*exc_details):
       ~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/osbuild/util/fscache.py", line 876, in stage
    self._rm_r_object(os.path.join(self._dirname_stage, uuidname))
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/osbuild/util/fscache.py", line 827, in _rm_r_object
    rmrf.rmtree(entry.path)
    ~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/osbuild/util/rmrf.py", line 110, in rmtree
    shutil.rmtree(path, onerror=on_error)  # pylint: disable=deprecated-argument
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/shutil.py", line 763, in rmtree
    _rmtree_safe_fd(stack, onexc)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/shutil.py", line 707, in _rmtree_safe_fd
    onexc(func, path, err)
    ~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/shutil.py", line 754, in onexc
    return onerror(func, path, exc_info)
  File "/usr/lib/python3.13/site-packages/osbuild/util/rmrf.py", line 105, in on_error
    unlink(p)
    ~~~~~~^^^
  File "/usr/lib/python3.13/site-packages/osbuild/util/rmrf.py", line 91, in unlink
    os.unlink(p)
    ~~~~~~~~~^^^
PermissionError: [Errno 1] Operation not permitted: '/srv/rhcos/cache/osbuild/store/stage/uuid-07785db37f174b229708f3020796caf2/data/tree/ostree/deploy/scos/deploy/1e810464e56f72ea426eadee4170de23507e8800b73ed1d6b7048d7876465137.0'
failed to execute cmd-osbuild: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions