-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Revert "Fix copyUIDGID parameter inversion in Docker compat API" #27534
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
Revert "Fix copyUIDGID parameter inversion in Docker compat API" #27534
Conversation
616bcd5 to
6fa5f70
Compare
|
/cc @dwaynebradley |
|
@matejvasek: GitHub didn't allow me to request PR reviews from the following users: dwaynebradley. Note that only containers members and repo collaborators can review this PR, and authors cannot review their own PRs. 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-sigs/prow repository. |
|
I assume this does not need release notes, since the reverted commit has not been added to any release branch yet. |
|
I am not sure what to do about this. The Docker documentation says one thing, but the software actually does another. Breaking other tools is also not good. |
Well the compat API is supposed to be docker compatible, so it should do what docker does not what docker docs say it does. As a general rule if there are users depending on the behavior then it is much easier to keep such behavior working and update the docs instead of breaking the users, especially since there would be no good way for them to handle this because the option suddenly does the opposite so they would need to version check and invert the param which is just ugly as hell. |
Luap99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but as general rule can you add the context of these things also in the commit message please. I prefer to read the git log with context and not have to go to github for every commit to figure out why it was done.
|
@Luap99 I could force push amended message if you wish. |
This reverts commit 2b848cc. The official Docker API documentation was misleading here. Testing shown that old podman behaviour was correct. In docker copyUIDGID=true means that primary container uid/gid is used, not the uid/gid from the tar stream. Signed-off-by: Matej Vašek <matejvasek@gmail.com>
6fa5f70 to
65411d5
Compare
|
I guess the reverted commit has not been merged to any of the release branches, right? |
|
When it comes to cherry-picking to releases, is there somebody to we should notify to not include the reverted commit in backports? |
giuseppe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
LGTM. Let's await the Moby maintainers' response in the discussion. I will then update the documentation based on their answer. |
We don't have a process for that. Your comments on the original PR should be enough for others looking at it to not backport it I suppose |
Luap99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
OK tried to look on the original issue #27332 and talk to the reporter of it. It appears that he did really observe inconsistency with The flag works same way on See #27538 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, Luap99, matejvasek 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 |
This reverts commit 2b848cc.
The commit's assumption that
copyUIDGID=truemeans that UID/GID from the tar should be preserved does not seem to be true. Opposite is true: ifcopyUIDGUID=truethe main UID/GID of the container is used. I tested this onmoby.Also brief look at the source code seems to confirm this:
https://github.com/moby/moby/blob/16880e9e1ba21593215b40241d62c043410e0ae7/daemon/archive_unix.go#L136-L144
https://github.com/moby/moby/blob/16880e9e1ba21593215b40241d62c043410e0ae7/daemon/archive_tarcopyoptions_unix.go#L22-L30
Yes it's quite contra-intuitive but it does behave that way.
See this issue opened since 2017 moby/moby#34096
Also apparently there was a PR to fix this moby/moby#34099 but is has newer been merged.
And another bug report docker/docs#17533 that suggest to change in documentation instead of the behaviour.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?