Skip to content

cmd/initContainer: Avoid RPM failures due to unexpected file owners - #640

Merged
debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/netsharedpath
Nov 17, 2021
Merged

debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/netsharedpath

Conversation

@debarshiray

@debarshiray debarshiray commented Dec 2, 2020 •

Copy link
Copy Markdown
Member

When running rootless, files and directories bind mounted from the
host operating system can have their ownership listed as
nobody:nobody. This is because the UIDs and GIDs that actually own
those locations are not available inside the container.

Some distribution packages are particular about the file ownerships of
some of these locations. eg., Fedora's filesystem RPM. Encountering
nobody:nobody as the owner can fail package management transactions
involving such packages leading to unforeseen consequences.

Therefore, configure RPM to leave these locations alone.

@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@martymichal martymichal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment with a proposed change. Apart from that, looks good to me. Did not test locally, yet. Great work!

Comment thread src/cmd/initContainer.go Resolved
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Dec 2, 2020
When running rootless, files and directories bind mounted from the
host operating system can have their ownership listed as
nobody:nobody. This is because the UIDs and GIDs that actually own
those locations are not available inside the container.

Some distribution packages are particular about the file ownerships of
some of these locations. eg., Fedora's filesystem RPM. Encountering
nobody:nobody as the owner can fail package management transactions
involving such packages leading to unforeseen consequences.

Therefore, configure RPM to leave these locations alone.

containers#640
@debarshiray
debarshiray force-pushed the wip/rishi/netsharedpath branch from 14afafa to 4bca04f Compare December 2, 2020 17:54
@debarshiray

Copy link
Copy Markdown
Member Author

Note that this doesn't seem to be working as I thought it would.

@softwarefactory-delete-me

Copy link
Copy Markdown

Build succeeded.

Comment thread src/cmd/initContainer.go Resolved
@martymichal martymichal added this to the Release 0.2.0 milestone Feb 26, 2021
@martymichal martymichal added 2. Container Realm The issue is related to what happens inside of a toolbox container 3. Bugfix Fixes a bug 6. Minor Change Should not cause breakage labels Feb 26, 2021
Base automatically changed from master to main March 25, 2021 22:25
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Nov 17, 2021
When running rootless, files and directories bind mounted from the
host operating system can have their ownership listed as
nobody:nobody. This is because the UIDs and GIDs that actually own
those locations are not available inside the container.

Some distribution packages are particular about the file ownerships of
some of these locations. eg., Fedora's filesystem and libvirt-libs
RPMs. Encountering nobody:nobody as the owner can fail package
management transactions involving such packages leading to unforeseen
consequences.

Therefore, configure RPM to leave these locations alone.

containers#640
@debarshiray
debarshiray force-pushed the wip/rishi/netsharedpath branch from 4bca04f to d9ba7ca Compare November 17, 2021 01:39
When running rootless, files and directories bind mounted from the
host operating system can have their ownership listed as
nobody:nobody. This is because the UIDs and GIDs that actually own
those locations are not available inside the container.

Some distribution packages are particular about the file ownerships of
some of these locations. eg., Fedora's filesystem, flatpak and
libvirt-libs RPMs. Encountering nobody:nobody as the owner can fail
package management transactions involving such packages leading to
unforeseen consequences.

Therefore, configure RPM to leave these locations alone.

containers#640
@debarshiray
debarshiray force-pushed the wip/rishi/netsharedpath branch from d9ba7ca to 7542f5f Compare November 17, 2021 01:56
@debarshiray

Copy link
Copy Markdown
Member Author

This fixes the filesystem, flatpak and libvirt-libs RPMs.

We might have to tweak the list of paths in %_netsharedpath over time as Toolbox evolves and problems with other RPMs come to light.

@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray merged commit 7542f5f into containers:main Nov 17, 2021
@debarshiray
debarshiray deleted the wip/rishi/netsharedpath branch November 17, 2021 02:18
@juhp

juhp commented Nov 17, 2021

Copy link
Copy Markdown
Contributor

This is really great news!

allisonkarlitskaya added a commit to allisonkarlitskaya/lisbox that referenced this pull request Dec 10, 2021
allisonkarlitskaya added a commit to allisonkarlitskaya/lisbox that referenced this pull request Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. Container Realm The issue is related to what happens inside of a toolbox container 3. Bugfix Fixes a bug 6. Minor Change Should not cause breakage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants