-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Behavior change when duplicate additionalGids are specified #4769
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
Comments
Sorry, I can't reproduce this issue in
Did I miss something here? @saku3 |
Sorry, I didn't explain it clearly.
When I use the
|
I guess the difference between The reason is that: before the PR #3999, the deduplicate operation was done in From my opinion, I think we should provide a backward compatibility in runc's newer release, though this is not a bug for me. @opencontainers/runc-maintainers If you have some other opinions, please let us know. Would you mind to open a PR to provide this compatibility in runc? |
Given that we generally try to just pass what users specify directly to the kernel, I think that the new behaviour is actually more preferable. Do we have an example of a downstream user program breaking as a result of this behaviour change? I guess hypothetically a user could see different output from |
Compare to provide a backward compatibility, this seems more reasonable. |
As far as I know, there is no such program. However, I believe the OCI runtime-spec should define the expected behavior in case of duplicates. |
From the spec perspective, the most I'd personally be comfortable with is something like "bundle authors SHOULD ensure there are no duplicates" and "runtimes MAY deduplicate" but IMO it's not really worth it unless we can find some software that actually cares (or some place the kernel treats it differently besides preserving the duplicates). |
Description
In runc v1.3.0, the behavior has changed when specifying duplicate AdditionalGids.
Previously, duplicate group IDs in AdditionalGids were deduplicated.
In the current version, duplicates are no longer removed.
This change in behavior is due to this PR: #3999
Previously, deduplication occurred because the
GetAdditionalGroupsPath
(which calls GetAdditionalGroups) function stored the GIDs in a map.The OCI runtime-spec does not define behavior regarding duplicated group IDs.
(Should this be standardized?)
Steps to reproduce the issue
Specify the following fields in the process section of your spec:
runc v1.3.0
Duplicate GIDs appear in the output:
runc v1.2.6
Duplicate GIDs are removed:
Describe the results you received and expected
The results are as shown in the reproduction steps.
There are a few options to consider:
Additionally,
crun
does not deduplicate duplicates.youki
references the olderrunc
behavior and deduplicates additionalGids.What version of runc are you using?
Host OS information
cat /etc/os-release
Host kernel information
No response
The text was updated successfully, but these errors were encountered: