-
Notifications
You must be signed in to change notification settings - Fork 2.2k
rootfs: improve mount-related errors #4734
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, left a couple of nits.
CI failure is being fixed by #4728 |
When reading mount errors, it is quite hard to make sense of mount flags in their hex form. As this is the error path, the minor performance impact of constructing a string is probably not worth hyper-optimising. Signed-off-by: Aleksa Sarai <[email protected]>
While debugging an issue involving failing mounts, I discovered that just returning the plain mount error message when we are in the fallback code for handling locked mounts leads to unnecessary confusion. It also doesn't help that podman currently forcefully sets "rw" on mounts, which means that rootless containers are likely to hit the locked mounts issue fairly often. So we should improve our error messages to explain why the mount is failing in the locked flags case. Fixes: 7c71a22 ("rootfs: remove --no-mount-fallback and finally fix MS_REMOUNT") Signed-off-by: Aleksa Sarai <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM. @opencontainers/runc-maintainers PTAL
1.3 backport: #4738 |
1.2 backport: #4740 |
While debugging an issue involving failing mounts, I discovered that
just returning the plain mount error message when we are in the fallback
code for handling locked mounts leads to unnecessary confusion.
It also doesn't help that podman currently forcefully sets "rw" on
mounts, which means that rootless containers are likely to hit the
locked mounts issue fairly often.
So we should improve our error messages to explain why the mount is
failing in the locked flags case.
Also, when reading mount errors, it is quite hard to make sense of mount
flags in their hex form. As this is the error path, the minor performance
impact of constructing a string is probably not worth hyper-optimising.
(Though maybe @kolyshkin has an opinion on this.)
Signed-off-by: Aleksa Sarai [email protected]