forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
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
dusty chattr #15
Open
dustymabe
wants to merge
5
commits into
main
Choose a base branch
from
dusty-chattr-upload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
dusty chattr #15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This unwinds part of a25ae2b. The way the code ended up both self.tree and self.mountpoint ended up pointing to the exactly same path and so we'd end up doing two `umount -R` operations on the same path and get an error like: ``` mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /var/osbuild/store/stage/uuid-efaac9370d25455d9e8df6d847ecb5b3/data/tree: not mounted mount/ostree.deployment (org.osbuild.ostree.deployment): Traceback (most recent call last): mount/ostree.deployment (org.osbuild.ostree.deployment): File "/var/b/shared/code/github.com/osbuild/osbuild/mounts/org.osbuild.ostree.deployment", line 136, in <module> mount/ostree.deployment (org.osbuild.ostree.deployment): main() mount/ostree.deployment (org.osbuild.ostree.deployment): File "/var/b/shared/code/github.com/osbuild/osbuild/mounts/org.osbuild.ostree.deployment", line 132, in main mount/ostree.deployment (org.osbuild.ostree.deployment): service.main() mount/ostree.deployment (org.osbuild.ostree.deployment): File "/var/b/shared/code/github.com/osbuild/osbuild/osbuild/host.py", line 252, in main mount/ostree.deployment (org.osbuild.ostree.deployment): self.stop() mount/ostree.deployment (org.osbuild.ostree.deployment): File "/var/b/shared/code/github.com/osbuild/osbuild/osbuild/mounts.py", line 126, in stop mount/ostree.deployment (org.osbuild.ostree.deployment): self.umount() mount/ostree.deployment (org.osbuild.ostree.deployment): File "/var/b/shared/code/github.com/osbuild/osbuild/mounts/org.osbuild.ostree.deployment", line 125, in umount mount/ostree.deployment (org.osbuild.ostree.deployment): subprocess.run(["umount", "-R", self.tree], mount/ostree.deployment (org.osbuild.ostree.deployment): File "/usr/lib64/python3.12/subprocess.py", line 571, in run mount/ostree.deployment (org.osbuild.ostree.deployment): raise CalledProcessError(retcode, process.args, mount/ostree.deployment (org.osbuild.ostree.deployment): subprocess.CalledProcessError: Command '['umount', '-R', '/var/osbuild/store/stage/uuid-efaac9370d25455d9e8df6d847ecb5b3/data/tree'] ' returned non-zero exit status 1. ⏱ Duration: 103s ```
It makes things a little more clear to know the variable is pointing to the path of the deployment.
We still target the tree here, but we open ourselves up to be able to target something other than the tree in the future. This mostly exchanges the `tree` variable for `target`. We also update the comment to try to enhance clarity.
Instead of operating directly on the tree for a stage we can operate on a mount too. This is useful in the case where operating on the directory tree of files isn't sufficient and the modifications need to be made directly to the filesystems on the disk image that we are creating. One such example of this is we are having a problem right now where the immutable bit being set on an OSTree deployment root doesn't survive the `cp -a --reflink=auto` in the org.osbuild.copy stage when being copied from the directory tree into the mounted XFS filesystem we created on the disk image. Thus we have to workaround this loss of attribute by applying the attribute directly on the mounted filesystem from the disk.
dustymabe
force-pushed
the
dusty-chattr-upload
branch
from
January 10, 2024 16:23
db75ffc
to
9015942
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.