Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ostree fails with: bwrap: open /proc/192/ns/ns failed: No such file or directory #2758

Closed
flaper87 opened this issue Nov 8, 2022 · 5 comments · Fixed by #2760
Closed

ostree fails with: bwrap: open /proc/192/ns/ns failed: No such file or directory #2758

flaper87 opened this issue Nov 8, 2022 · 5 comments · Fixed by #2760

Comments

@flaper87
Copy link

flaper87 commented Nov 8, 2022

I'm trying to create a live-iso using livemedia-creator. This project runs anaconda in the background, which then calls ostree

https://github.com/rhinstaller/anaconda/blob/f0df778cc43e2494fdd0fad131aa8643590510ac/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py#L511-L521

I captured the logs from ostree and this is what I got:

OT: Didn't find $sysroot/boot/loader symlink; assuming bootversion 0
OT: Didn't find $sysroot/ostree/boot.0 symlink; assuming subbootversion 0
OT: Preparing transaction in repository 0x55925a240140
OT: Pushing lock non-blocking with timeout 30
OT: Opening repo lock file
OT: Push lock: state=unlocked, depth=0
OT: Locking repo shared
OT: Using new tmpdir staging-3470f58f-7cec-4c35-b82a-a92470d1b924-gSlmOP
OT: Committing transaction in repository 0x55925a240140
OT: txn commit staging-3470f58f-7cec-4c35-b82a-a92470d1b924-gSlmOP
OT: Popping lock non-blocking with timeout 30
OT: Pop lock: state=shared, depth=1
OT: Unlocking repo
Regex version mismatch, expected: 10.37 2021-05-26 actual: 10.32 2018-09-10
Regex version mismatch, expected: 10.37 2021-05-26 actual: 10.32 2018-09-10
note: Deploying commit 031cdee1ba34753c862d3da109a6b6532540235977036865f80298dbcd0af905 which contains content in /var/lib that will be ignored.
bwrap: open /proc/192/ns/ns failed: No such file or directory

Environment

This is a rhel9 VM

[cloud-user@rhel9 ~]$ dnf info ostree
Not root, Subscription Management repositories not updated

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:00:16 ago on Tue 08 Nov 2022 03:44:30 AM EST.
Installed Packages
Name         : ostree
Version      : 2022.5
Release      : 1.el9_0
Architecture : x86_64
Size         : 578 k
Source       : ostree-2022.5-1.el9_0.src.rpm
Repository   : @System
From repo    : rhel-9-for-x86_64-appstream-rpms
Summary      : Tool for managing bootable, immutable filesystem trees
URL          : https://ostree.readthedocs.io/en/latest/
License      : LGPLv2+
Description  : libostree is a shared library designed primarily for
             : use by higher level tools to manage host systems (e.g. rpm-ostree),
             : as well as container tools like flatpak and the atomic CLI.
[cloud-user@rhel9 ~]$ getenforce 
Permissive
@cgwalters
Copy link
Member

This is probably fallout from edb4f38

I think we should stop doing that on the initial deployment, it's both unnecessary and likely to provoke bugs from trying to use potentially nested containerization in outer arbitrary setups.

@flaper87
Copy link
Author

flaper87 commented Nov 9, 2022

What's interesting is that this doesn't happen while running ostree directly on the shell. It happens when it runs under anaconda, as part of the livemedia-creator tool.

Could this be related to the use of mock/chroot?

cgwalters added a commit to cgwalters/ostree that referenced this issue Nov 9, 2022
Basically, it should not be necessary - the policy should be
up-to-date.  We don't want to force on continual policy rebuilds.

Even trying to run bwrap when we're *not* in a booted
root can cause failures in nested containerization scenarios.

Closes: ostreedev#2758
@cgwalters
Copy link
Member

Could this be related to the use of mock/chroot?

Yeah almost certainly.

PR in #2760

@flaper87
Copy link
Author

Just wanted to provide feedback. I tested the latest build and it does solve the issue I was hitting. Thanks a lot for the support

@cgwalters
Copy link
Member

Awesome, thanks for testing!

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Nov 26, 2022
Backport a patch to fix selinux policy rebuild error on first
deployment.
See: ostreedev/ostree#2758

Signed-off-by: Yi Zhao <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
halstead pushed a commit to openembedded/meta-openembedded that referenced this issue Jan 28, 2023
Backport a patch to fix selinux policy rebuild error on first
deployment.
See: ostreedev/ostree#2758

Signed-off-by: Yi Zhao <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit 290166c)
Signed-off-by: Armin Kuster <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
…st deployment

Backport a patch to fix selinux policy rebuild error on first
deployment.
See: ostreedev/ostree#2758

Signed-off-by: Yi Zhao <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants