-
Notifications
You must be signed in to change notification settings - Fork 416
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
dnf always fails when used with ostree based systems instead of warning. #2108
Comments
Adding some detail... It looks like the CliError causes the command to return a non-zero exit status, which breaks An akmods log snippet for quick reference:
|
@dcantrell, can you explain whether your commit intended an error or just a warning? If it were an error, how should users override the error to perform a temporary change which will be lost on next ostree-based update? |
Initially it was supposed to be an error, but now consensus is that it should be a warning. I also need to update is_container() based on changes that came along later. I will get a patch for this so it is fixed up. |
Is there really no way to disable this for now? It completely breaks the workflow of temporarily installing packages with dnf for development/testing into a |
We have #2110 in progress |
Is the idea that even if we stop the operation on read-only systems we should exit with 0? |
To be clear these reports seem to me like they are all happening in CI using a ostree/bootc container or with ostree admin unlock. If so the patch in #2110 should fix this without needing to change the exit code and message to a warning. When we find a bootc host we will exit with an error. However when running on a container or on a unlocked system, dnf should run just like before because it is not a bootc host at that point it's just another container running a build. On a read-only system dnf never has been able to modify the system, so the exit code 1 in that case makes sense to me. |
I'm also affected by this. I was using dnf with --installroot as a debootstrap-ish tool, so the system installed was never affecting the "host" system. I'm not sure how to fix it properly, but maybe looking at whether we affect the ostree system or not would work (like, anything under /mnt or /media would work, but /usr obviously wouldn't). |
We could change the check to take --installroot path into account:
I would probably place the extending conditions out of _is_bootc_host() function, or wrap the function into a new _is_bootc_installroot() function. Another approach would be adding new tri-state option, e.g. |
Bootc people, Is root filesystem (/) never writable on bootc systems? I'm deliberating whether it is necessary to check that installroot differs from /. Currently bootc system has / read-only even if usr-overlay is writable. That of course does not play well when installing packages that write out of /usr. |
Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for a writable installroot being different from /. The comparison for / is there to deal with bootc systems with a writeable /. Currently it's uncerain whether systems like that exist. Resolves: rpm-software-management#2108
Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for a writable installroot being different from /. The comparison for / is there to deal with bootc systems with a writeable /. Currently it's uncerain whether systems like that exist. Resolves: rpm-software-management#2108
Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49671
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108 Resolves: https://issues.redhat.com/browse/RHEL-49671
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: #2108 Resolves: https://issues.redhat.com/browse/RHEL-49670
Upstream commit: a1aa8d0 Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: #2108 Resolves: https://issues.redhat.com/browse/RHEL-49671
#2053 has landed in Fedora 40.
This ends up breaking dnf completely when being used in a CI pipeline with an ostree system. We currently use dnf for building akmods in CI.
Note, that it says it should warn a user but exits with an operation aborted. From the docstring it does not sound like the intended behavior?
The text was updated successfully, but these errors were encountered: