-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for readonly
option to --mount
#6380
Add support for readonly
option to --mount
#6380
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, mheon 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 |
Man pages need to be modified as well. |
It's already in the manpages |
LGTM |
grep "ro, read-only" *md read-only is in the man pages not readonly. |
This is just an alias to the `ro` option, but it's already in the manpages (and Docker) so we might as well add support for it. Fixes containers#6379 Signed-off-by: Matthew Heon <[email protected]>
Fixed |
/lgtm |
case "ro", "rw": | ||
if setRORW { | ||
return newMount, errors.Wrapf(optionArgError, "cannot pass 'ro' or 'rw' options more than once") | ||
return newMount, errors.Wrapf(optionArgError, "cannot pass 'readonly', 'ro', or 'rw' options more than once") | ||
} |
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.
How about adding the following code in this block? So that we can reuse the code for handling ro
. They are totally same.
if kv[0] == "readonly" {
kv[0] = "ro"
}
Don't know if it is feasible.
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.
@SCHEN2015 I am going to merge this, Please open a PR to cleanup the code.
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.
@SCHEN2015 I am going to merge this, Please open a PR to cleanup the code.
Dan, thanks! Created PR6443. #6443
/hold cancel |
containers#6380 (comment) Signed-off-by: Charles Shih <[email protected]>
This is just an alias to the
ro
option, but it's already in the manpages (and Docker) so we might as well add support for it.Fixes #6379