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

overlay-volumes: add support for non-volatile upperdir,workdir for overlay volumes #14474

Merged

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Jun 3, 2022

Similar feature was added for named overlay volumes here: #12712
Following PR just mimics similar feature for anonymous volumes.

Often users want their anonymous overlayed volumes to be non-volatile in nature
that means that same upper dir can be re-used by one or more
containers but overall of nature of volumes still have to be overlay
so work done is still on a overlay not on the actual volume.

Following PR adds support for more advanced options i.e custom workdir
and upperdir for overlayed volumes. So that users can re-use workdir
and upperdir across new containers as well.

Usage

podman run -it -v /some/path:/data:O,upperdir=/path/persistant/upper,workdir=/path/persistant/work alpine sh

Does this PR introduce a user-facing change?

Adds support for non-volatile `upperdir`,`workdir` for anonymous overlay volumes

Closes: #14427

@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 3, 2022
@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch from 841b471 to 7571cd5 Compare June 3, 2022 08:26
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, just a nit

test/e2e/run_volume_test.go Outdated Show resolved Hide resolved
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, giuseppe

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

@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch 2 times, most recently from 29e9ccb to 5676710 Compare June 3, 2022 10:28
@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch from 5676710 to e58c588 Compare June 3, 2022 13:00
@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch from e58c588 to 3081bfa Compare June 3, 2022 15:26
@TomSweeneyRedHat
Copy link
Member

LGTM

@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch from 3081bfa to a4bdcf5 Compare June 6, 2022 13:02
@mheon
Copy link
Member

mheon commented Jun 6, 2022

Is "anonymous volume" an overlayfs term I'm not familiar with? Because these are not anonymous volumes in the Podman sense (which are created at container create time and do not specify any details about where the volume is to be mounted from). Calling this just an "overlay volume" seems more appropriate?

@flouthoc
Copy link
Collaborator Author

flouthoc commented Jun 6, 2022

Is "anonymous volume" an overlayfs term I'm not familiar with? Because these are not anonymous volumes in the Podman sense (which are created at container create time and do not specify any details about where the volume is to be mounted from). Calling this just an "overlay volume" seems more appropriate?

Yeah we can just call it overlay volumes it just for the cases where volumes are not named and rather created directly from file paths. Let me change the PR description so it sounds more generic.

…onymous volumes

Similar feature was added for named overlay volumes here: containers#12712
Following PR just mimics similar feature for anonymous volumes.

Often users want their anonymous overlayed volumes to be `non-volatile` in nature
that means that same `upper` dir can be re-used by one or more
containers but overall of nature of volumes still have to be overlay
so work done is still on a overlay not on the actual volume.

Following PR adds support for more advanced options i.e custom `workdir`
and `upperdir` for overlayed volumes. So that users can re-use `workdir`
and `upperdir` across new containers as well.

Usage

```console
podman run -it -v /some/path:/data:O,upperdir=/path/persistant/upper,workdir=/path/persistant/work alpine sh
```

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the non-volatile-overlay-volume branch from a4bdcf5 to aadae49 Compare June 6, 2022 13:29
@flouthoc flouthoc changed the title overlay-volumes: add support for non-volatile upperdir,workdir for anonymous volumes overlay-volumes: add support for non-volatile upperdir,workdir for overlay volumes Jun 6, 2022
@TomSweeneyRedHat
Copy link
Member

Happy green test buttons.

@rhatdan
Copy link
Member

rhatdan commented Jun 6, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2022
@openshift-merge-robot openshift-merge-robot merged commit 3f8a754 into containers:main Jun 6, 2022
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman cannot create container when an overlay volume has additional arguments
6 participants