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

[3.4] volumes: be more tolerant and fix infinite loop #12211

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

vrothberg
Copy link
Member

Make Podman more tolerant when parsing image volumes during container
creation and further fix an infinite loop when checking them.

Consider VOLUME ['/etc/foo', '/etc/bar'] in a Containerfile. While
it looks correct to the human eye, the single quotes are wrong and yield
the two volumes to be [/etc/foo, and /etc/bar] in Podman and Docker.

When running the container, it'll create a directory bar] in /etc
and a directory [ in / with two subdirectories etc/foo,. This
behavior is surprising to me but how Docker behaves. We may improve on
that in the future. Note that the correct way to syntax for volumes in
a Containerfile is VOLUME /A /B /C or VOLUME ["/A", "/B", "/C"];
single quotes are not supported.

This change restores this behavior without breaking container creation
or ending up in an infinite loop.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2014149
Signed-off-by: Valentin Rothberg [email protected]

Make Podman more tolerant when parsing image volumes during container
creation and further fix an infinite loop when checking them.

Consider `VOLUME ['/etc/foo', '/etc/bar']` in a Containerfile.  While
it looks correct to the human eye, the single quotes are wrong and yield
the two volumes to be `[/etc/foo,` and `/etc/bar]` in Podman and Docker.

When running the container, it'll create a directory `bar]` in `/etc`
and a directory `[` in `/` with two subdirectories `etc/foo,`.  This
behavior is surprising to me but how Docker behaves.  We may improve on
that in the future.  Note that the correct way to syntax for volumes in
a Containerfile is `VOLUME /A /B /C` or `VOLUME ["/A", "/B", "/C"]`;
single quotes are not supported.

This change restores this behavior without breaking container creation
or ending up in an infinite loop.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2014149
Signed-off-by: Valentin Rothberg <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 8, 2021

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2021
@vrothberg
Copy link
Member Author

@mheon @TomSweeneyRedHat PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@mheon
Copy link
Member

mheon commented Nov 8, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2021
@mheon
Copy link
Member

mheon commented Nov 8, 2021

I wonder if we need a v3.4.1-rhel branch now.

@openshift-merge-robot openshift-merge-robot merged commit 8de9950 into containers:v3.4 Nov 8, 2021
@vrothberg vrothberg deleted the 3.4-bz-2014149 branch November 8, 2021 14:25
@TomSweeneyRedHat
Copy link
Member

@mheon, we need to get an update v3.4.* to RHEL 8.5.0.2 for next week. I think we want to get a v3.4.1-rhel branch and then spin up a v3.4.2 release from it. Maybe a ps in standup today?

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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.

5 participants