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

Fix permissions on initially created named volumes #10531

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jun 2, 2021

Permission of volume should match the directory it is being mounted on.

Fixes: #10188

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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 Jun 2, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Jun 2, 2021

@mheon PTAL

@rhatdan rhatdan force-pushed the volume branch 4 times, most recently from 0db10db to 4a48ed1 Compare June 2, 2021 20:50
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.

Just nits, code LGTM.

Does it really fully fix #10188? It looks like there's something in Buildah as well.

libpod/container_internal.go Outdated Show resolved Hide resolved
@@ -1734,6 +1734,15 @@ func (c *Container) chownVolume(volumeName string) error {
if err := os.Lchown(mountPoint, uid, gid); err != nil {
return err
}

st, err := os.Lstat(filepath.Join(c.state.Mountpoint, v.Dest))
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment here? Maybe also mention #10188 for historical reasons.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure,

@@ -904,6 +904,18 @@ USER bin`, BB)
Expect(session.ExitCode()).To(Equal(100))
})

It("podman run with named volume", func() {
Copy link
Member

Choose a reason for hiding this comment

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

Can you drop a comment that points to #10188?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why, this fixes the permissions of the volume created, I don't believe we care about the timestamps.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok It now handled timestamps.

@rhatdan rhatdan force-pushed the volume branch 2 times, most recently from 2491338 to 4581de8 Compare June 3, 2021 09:56
@TomSweeneyRedHat
Copy link
Member

All kinds of test unhappiness @Rhadan

@rhatdan
Copy link
Member Author

rhatdan commented Jun 11, 2021

Fixes: #10606

@TomSweeneyRedHat
Copy link
Member

LGTM
I restarted one test that was failing, it appears we may have a network flake flying around.

Permission of volume should match the directory it is being mounted on.

Fixes: containers#10188

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@openshift-merge-robot openshift-merge-robot merged commit e405f12 into containers:master Jun 15, 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.

VOLUME in Dockerfile created with wrong permissions + timestamp
4 participants