-
Notifications
You must be signed in to change notification settings - Fork 42.2k
cri-api: fix comment lines about PROPAGATION_PRIVATE #115704
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
Conversation
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 5b8c1c8a52870e291470d37cb23b675afd59f163 |
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.
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.
I'd argue that cri-dockerd's behavior is wrong and insecure (but unfixable for compatibility sake).
It should have just raised an explicit error when the requested propagation ("None" in the yaml) is not applicable, as falling back to "HostToContainer" (aka "rslave") may result in leaking unexpected data to the container, etc.
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.
containerd, CRI-O, etc. may print a warning when the mount source contains the CRI daemon root, but changing the propagation is insecure as explained above, and raising an error will break compatibility.
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.
Updated the PR to clarify the expected behavior
02b1b3b to
b17e353
Compare
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.
typo: appicable/applicable?
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.
fixed
derekwaynecarr
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.
please see suggestion, thanks!
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.
Is the desire in the API comment change to say that its ok for cri providers to warn/error?
I would expect the CRI provider to publish its known issues separate from API definition. Can we remove the cri-dockerd notice as a result?
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.
agree the cri-dockerd issue is probably better placed in user facing .. provider specific docs...
s/An implementation/A runtime/
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.
Removed cri-dockerd notice
The current CRI implementations treat `PROPAGATION_PRIVATE` as "rprivate", not "private": - https://github.com/containerd/containerd/blob/v1.6.16/pkg/cri/opts/spec_linux.go#L181 - https://github.com/cri-o/cri-o/blob/v1.26.1/server/container_create_linux.go#L982 However, this is not always true for cri-dockerd, which treats `PROPAGATION_PRIVATE` as noop and lets dockerd use its default propagation mode: - https://github.com/Mirantis/cri-dockerd/blob/v0.3.1/libdocker/helpers.go#L235-L236 (The "private is default" comment in L236 is inaccurate) dockerd's default propagation mode is "rprivate" for most cases, but dockerd changes its default propagation mode to "rslave" when the mount source contains the daemon root (`/var/lib/docker`): - https://github.com/moby/moby/blob/v20.10.23/volume/mounts/linux_parser.go#L145 - https://github.com/moby/moby/blob/v20.10.23/daemon/volumes.go#L137-L143 - https://github.com/moby/moby/blob/v20.10.23/daemon/volumes_linux.go#L11-L36 This behavior was introduced in Docker 18.03 (moby/moby PR 36055). Related: - kubernetes/website PR 39385 - Mirantis/cri-dockerd PR 159 Signed-off-by: Akihiro Suda <[email protected]>
a6d30ee to
af95a76
Compare
|
@derekwaynecarr PTAL |
marquiz
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 label has been added. DetailsGit tree hash: e0eb4cc23988aa3a5496235fc35d05f51ea6a10e |
|
LGTM |
mikebrow
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
|
@derekwaynecarr PTAL |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AkihiroSuda, mrunalp, pacoxu, saschagrunert, SergeyKanzhelev The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
1 similar comment
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
The current CRI implementations treat
PROPAGATION_PRIVATEas "rprivate", not "private":However, this is not always true for cri-dockerd, which treats
PROPAGATION_PRIVATEas noop and lets dockerd use its default propagation mode:dockerd's default propagation mode is "rprivate" for most cases, but dockerd changes its default propagation mode to "rslave" when the mount source contains the daemon root (
/var/lib/docker):This behavior was introduced in Docker 18.03 (moby/moby#36055).
Related:
mountPropagation: Noneequates torprivate, notprivatewebsite#39385What type of PR is this?
/kind documentation
What this PR does / why we need it:
Fix a comment line about
PROPAGATION_PRIVATEbecause it is inaccurate.Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
A manifest to verify the behavior: