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

Ensure the Volumes field in Compat Create is honored #9025

Merged

Conversation

mheon
Copy link
Member

@mheon mheon commented Jan 19, 2021

Docker has, for unclear reasons, three separate fields in their Create Container struct in which volumes can be placed. Right now we support two of those - Binds and Mounts, which (roughly) correspond to -v and --mount respectively. Unfortunately, we did not support the third, Volumes, which is used for anonymous named volumes created by -v (e.g. -v /test). It seems that volumes listed here are not included in the remaining two from my investigation, so it should be safe to just append them into our handling of the Binds (-v) field.

Fixes #8649

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 19, 2021
@mheon
Copy link
Member Author

mheon commented Jan 19, 2021

Apparently it is not a safe assumption that Volumes is distinct, because Compose likes to populate it as well as the other two. Fun!

@mheon mheon force-pushed the add_support_volumes_field branch 5 times, most recently from 5dc7ab2 to 31ec311 Compare January 20, 2021 19:50
@rhatdan
Copy link
Member

rhatdan commented Jan 21, 2021

Looks like your test is failing.

@mheon
Copy link
Member Author

mheon commented Jan 21, 2021

It is actually a different test that was broken by the addition of my test, which is confusing since I do clean up everything. I will take another look today.

@mheon mheon force-pushed the add_support_volumes_field branch 2 times, most recently from d993562 to 97203c0 Compare January 26, 2021 19:04
Docker has, for unclear reasons, three separate fields in their
Create Container struct in which volumes can be placed. Right now
we support two of those - Binds and Mounts, which (roughly)
correspond to `-v` and `--mount` respectively. Unfortunately, we
did not support the third, `Volumes`, which is used for anonymous
named volumes created by `-v` (e.g. `-v /test`). It seems that
volumes listed here are *not* included in the remaining two from
my investigation, so it should be safe to just append them into
our handling of the `Binds` (`-v`) field.

Fixes containers#8649

Signed-off-by: Matthew Heon <[email protected]>
@mheon mheon force-pushed the add_support_volumes_field branch from 97203c0 to 1ae410d Compare January 26, 2021 19:38
@mheon
Copy link
Member Author

mheon commented Jan 26, 2021

Looks like this is going to go green - @containers/podman-maintainers PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jan 27, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2021
@openshift-merge-robot openshift-merge-robot merged commit 179b9d1 into containers:master Jan 27, 2021
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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.

[APIv2]: container copy rewrite broke PUT /containers/{id}/archive endpoint
5 participants