Skip to content
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

Merged
merged 1 commit into from
May 29, 2020

Conversation

mheon
Copy link
Member

@mheon mheon commented May 26, 2020

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2020
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented May 26, 2020

Man pages need to be modified as well.

@mheon
Copy link
Member Author

mheon commented May 26, 2020

It's already in the manpages

@TomSweeneyRedHat
Copy link
Member

LGTM

@rhatdan
Copy link
Member

rhatdan commented May 26, 2020

grep "ro, read-only" *md
podman-create.1.md: · ro, read-only: true or false (default).
podman-run.1.md: · ro, read-only: true or false (default).

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]>
@mheon mheon force-pushed the fix_mount_readonly branch from c974cce to e26f9ed Compare May 26, 2020 20:05
@mheon
Copy link
Member Author

mheon commented May 26, 2020

Fixed

@rhatdan
Copy link
Member

rhatdan commented May 26, 2020

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2020
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2020
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")
}
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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

@rhatdan
Copy link
Member

rhatdan commented May 29, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 78c3846 into containers:master May 29, 2020
schrht added a commit to schrht/libpod that referenced this pull request Jun 2, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mount with read-only option is rejected by podman
7 participants