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

compat container create: match duplicate mounts correctly #18458

Merged
merged 1 commit into from
May 4, 2023

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented May 4, 2023

The logic which checks for duplicated volumes here did not work correctly because it used filepath.Clean(). However the writes to the volDestinations map did not thus the string no longer matched when you included a final slash for example.

So we can either call Clean() on all or no paths. I decided to call it on no path because this is what we do right now. Just the check did it.

Fixed #18454

Does this PR introduce a user-facing change?

Fixed a bug in the compat container create endpoint which could result in a "duplicate mount destination" error when the volume path was not "clean", e.g. included a final slash at the end.

The logic which checks for duplicated volumes here did not work
correctly because it used filepath.Clean(). However the writes to the
volDestinations map did not thus the string no longer matched when you
included a final slash for example.

So we can either call Clean() on all or no paths. I decided to call it
on no path because this is what we do right now. Just the check did it.

Fixed containers#18454

Signed-off-by: Paul Holzinger <[email protected]>
@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 4, 2023
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label May 4, 2023
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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

@baude
Copy link
Member

baude commented May 4, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2023
@openshift-merge-robot openshift-merge-robot merged commit 41f5fcf into containers:main May 4, 2023
@Luap99 Luap99 deleted the docker-dup-volume branch May 4, 2023 13:36
brianmcarey added a commit to brianmcarey/kubevirtci that referenced this pull request Jun 21, 2023
Podman recently changed the handling of volumes at the container create
stage[1] to fix a bug[2] so when the bootstrap image was updated this
started failing in the check-provision lanes[3].

[1] containers/podman#18458
[2] containers/podman#18454
[3] https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirtci/1024/check-provision-k8s-1.26-centos9/1670717915193675776#1:build-log.txt%3A2275

Signed-off-by: Brian Carey <[email protected]>
kubevirt-bot pushed a commit to kubevirt/kubevirtci that referenced this pull request Jun 21, 2023
Podman recently changed the handling of volumes at the container create
stage[1] to fix a bug[2] so when the bootstrap image was updated this
started failing in the check-provision lanes[3].

[1] containers/podman#18458
[2] containers/podman#18454
[3] https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirtci/1024/check-provision-k8s-1.26-centos9/1670717915193675776#1:build-log.txt%3A2275

Signed-off-by: Brian Carey <[email protected]>
@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 Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 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. kind/api-change Change to remote API; merits scrutiny 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.

"fill out specgen: conflict at mount destination /.../: duplicate mount destination"
4 participants