-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix logic when not creating a workdir #9231
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
fix logic when not creating a workdir #9231
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
LGTM
I can confirm that this fixes my issue.
LGTM once Ed's test issues are addressed |
16b8b55
to
53421b4
Compare
LGTM |
test/system/030-run.bats
Outdated
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.
There's a mix of spaces and tabs on this line.
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.
Need to fix my vimrc. Thank you!
When resolving the workdir of a container, we may need to create unless the user set it explicitly on the command line. Otherwise, we just do a presence check. Unfortunately, there was a missing return that lead us to fall through into attempting to create and chown the workdir. That caused a regression when running on a read-only root fs. Fixes: containers#9230 Signed-off-by: Valentin Rothberg <[email protected]>
53421b4
to
821ef64
Compare
/lgtm |
/hold cancel |
When resolving the workdir of a container, we may need to create it unless
the user sets it explicitly on the command line. Otherwise, we just do a
presence check. Unfortunately, there was a missing return that lead us
to fall through into attempting to create and chown the workdir. That
caused a regression when running on a read-only root fs.
Fixes: #9230
Signed-off-by: Valentin Rothberg [email protected]
@Luap99 PTAL
It took me longer than I want to admit until I found an easy way to test it (doing the unshare+mount dance didn't work out well in the system tests).