-
Notifications
You must be signed in to change notification settings - Fork 61
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
root filesystem label is container_file_t when it should be root_t #149
Comments
BTW I don't have much experience with osbuild debugging...if someone can add a brief crash course into the README.md here on e.g. "how can I set a breakpoint right after Edit, ok
but...I don't know what that means; as I understand it I should be able to find filesystem trees from those hashes I think, but I don't see them under What I think is probably going on is that we need to do something a bit like this: |
Something like I'll do some docs stuff about this today but the gist is that you need to have an export as well; and I think to not have the pipeline already in cache. I'm contemplating changing |
Thank you! I played around with this a bit and I think it's a bit random what labels we end up with on the disk before the first boot. The pipeline we generate in osbuild runs Following the code I see that there is a codepath from deploy.rs:deploy() that calls sysroot.deploy_tree_with_options to sysroot_finalize_deployment() which AIUI should do some labeling of the deployment root. So I'm clearly missing something. Will moving to |
The labeling should be from |
Until osbuild/bootc-image-builder#149 is fixed.
CentOS/centos-bootc#186 will undo the change that triggered this, but we still definitely need to fix the disk image labels. |
Because of the issues with the latest CentOS/centos-bootc#184 and osbuild#149 with the latest quay.io/centos-bootc/fedora-bootc:eln this commit moves to the last known good container id.
Because of the issues with the latest CentOS/centos-bootc#184 and osbuild#149 with the latest quay.io/centos-bootc/fedora-bootc:eln this commit moves to the last known good container id.
Because of the issues with the latest CentOS/centos-bootc#184 and #149 with the latest quay.io/centos-bootc/fedora-bootc:eln this commit moves to the last known good container id.
We should just hard error out when trying to write a SELinux-enabled target system from a non-SELinux host. It's possible but it's horrendously complex; today bootc install has explicit logic to disallow this...which we'd be using...if we were using |
The problem is around the filesystem root. ostree is just a super fancy wrapper around chroot and hardlinks. We need to ensure that what ostree calls the "physical /" aka the thing you see when you just
osbuild however makes a temporary root and then copies it, and I believe that's the source of the problem. (I still don't understand why we don't default to writing directly to the target root filesystem and only offer "construct temporary tree" as a debugging aid, because doing it directly is WAY more efficient) |
This came out of a discussion with bootc-image-builder, which has this issue right now: osbuild/bootc-image-builder#149 As I noted in that issue, I think it's basically been working here because we always write to a real fresh filesystem, but let's be very explicit. There's a notable tricky bootstrapping we're solving here around "what's the label of `/`" because we know we are running the target OS as a container image already. Signed-off-by: Colin Walters <[email protected]>
So I did containers/bootc#290 but this won't help bib until it uses bootc install to-filesystem. This...might help when run in the osbuild pipeline, or it might not. I'm not yet sure until we can look at the details of how bib calls bootc here, and how some of the files are laid out which I am not yet sure of. I think the most relevant thing going on here is the |
This came out of a discussion with bootc-image-builder, which has this issue right now: osbuild/bootc-image-builder#149 As I noted in that issue, I think it's basically been working here because we always write to a real fresh filesystem, but let's be very explicit. There's a notable tricky bootstrapping we're solving here around "what's the label of `/`" because we know we are running the target OS as a container image already. Signed-off-by: Colin Walters <[email protected]>
This came out of a discussion with bootc-image-builder, which has this issue right now: osbuild/bootc-image-builder#149 As I noted in that issue, I think it's basically been working here because we always write to a real fresh filesystem, but let's be very explicit. There's a notable tricky bootstrapping we're solving here around "what's the label of `/`" because we know we are running the target OS as a container image already. Signed-off-by: Colin Walters <[email protected]>
The way osbuild works is to synthesize a filesystem tree in the store, then copy it to the disk. This ensures the label for the store is `root_t` which ends up being the labeling for the "infrastructure" bits in the `/ostree` repository in the target root. This in turn is blocking a lot of things. Closes: osbuild#149
PR in #197 |
The way osbuild works is to synthesize a filesystem tree in the store, then copy it to the disk. This ensures the label for the store is `root_t` which ends up being the labeling for the "infrastructure" bits in the `/ostree` repository in the target root. This in turn is blocking a lot of things. Closes: osbuild#149
The way osbuild works is to synthesize a filesystem tree in the store, then copy it to the disk. This ensures the label for the store is `root_t` which ends up being the labeling for the "infrastructure" bits in the `/ostree` repository in the target root. This in turn is blocking a lot of things. Closes: osbuild#149
The way osbuild works is to synthesize a filesystem tree in the store, then copy it to the disk. This ensures the label for the store is `root_t` which ends up being the labeling for the "infrastructure" bits in the `/ostree` repository in the target root. This in turn is blocking a lot of things. Closes: osbuild#149
The way osbuild works is to synthesize a filesystem tree in the store, then copy it to the disk. This ensures the label for the store is `root_t` which ends up being the labeling for the "infrastructure" bits in the `/ostree` repository in the target root. This in turn is blocking a lot of things. Closes: #149
Migrating this back from CentOS/centos-bootc#184
Because we want to be able to add a proper
Closes
in this repository.One thing I notice here...and I'm not yet certain if it's a bib regression or not, but looking at the disk image before it's booted:
That's just really broken, we shouldn't end up with a physical disk image root labeled
container_file_t
! It looks like actually all of the labels up to the deployment root are similarly broken (they should be something likeroot_t
orusr_t
).However once we get to the deployment things are fine:
And it's specifically that
/ostree/deploy/default/backing
is alsocontainer_file_t
, and the overlayfs picks up that context and that breaks everything.The text was updated successfully, but these errors were encountered: