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
volume: Change owner of symlinks too #94895
volume: Change owner of symlinks too #94895
Conversation
Welcome @mauriciovasquezbernal! |
Hi @mauriciovasquezbernal. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig storage |
@mauriciovasquezbernal: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/lgtm |
could you add unit test? Thanks! cc @msau42 |
This commit uses Lchown instead of Chown to change the owner of symlinks too. It doesn't change any behaviour. However, it could avoid some confusions as the symlinks are updated to the correct owner too.
f8a4d76
to
d81fc18
Compare
@jingxu97 I added the unit test. |
/retest |
Former TestSetVolumeOwnership only checks the mode of the files. This commit adds a new TestSetVolumeOwnershipOwner that checks the ownership of the files.
d81fc18
to
119040a
Compare
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
It looks good to me as well. But it would be nice to have a confirmation from @sjenning because he originally made the change that prevented permissions of symlinks from being changed. But at that time - we were calling plain |
Nice that you were able to get rid of an extra stat syscall by using -1 for the UID! /lgtm |
/approve |
1 similar comment
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, mauriciovasquezbernal, sjenning 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 |
/retest Review the full test history for this PR. Silence the bot with an |
3 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This commit uses Lchown instead of Chown to change the owner of symlinks too.
It doesn't change any behaviour. However, it could avoid some confusions as the
symlinks are updated to the correct owner too.
Please consider the following Pod with a configMap:
The current behaviour shows that the group owner is
0
for the symlink point to the real content file:The behaviour after this PR shows as group owner
2000
as specified infsGroup
:Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: