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

entrypoint cleanup + non-systemd-host fix #2767

Merged
merged 6 commits into from
May 19, 2022

Conversation

BenTheElder
Copy link
Member

@BenTheElder BenTheElder commented May 13, 2022

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 13, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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

@k8s-ci-robot k8s-ci-robot requested review from aojea and munnerz May 13, 2022 19:10
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 13, 2022
@@ -55,43 +55,43 @@ validate_userns() {
}

overlayfs_preferrable() {
if [[ -z "$userns" ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

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

tabs => double space (like the rest of the file)

@@ -225,9 +227,7 @@ fix_cgroup() {
# See: https://d2iq.com/blog/running-kind-inside-a-kubernetes-cluster-for-continuous-integration
# Capture initial state before modifying
#
# Basically we're looking for the cgroup-path for the cpu controller for the
Copy link
Member Author

Choose a reason for hiding this comment

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

things got re-arranged, and this comment got out of place.

done
# workaround for hosts not running systemd
# we only do this for kubelet.slice because it's not relevant when not using
# the systemd cgroup driver
Copy link
Member Author

Choose a reason for hiding this comment

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

functional change here

Copy link
Contributor

Choose a reason for hiding this comment

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

@AkihiroSuda @kolyshkin can you please chime in here, I'm really in deep waters here and I think that a another pair of eyes will be nice for this change ... the cgroup glue keeps growing ...

Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't work, wishful thinking :-)

#2766 (comment)

I need to get a v1 host going again and take a peek at what exactly systemd is up to with the pseudo-subsystem.

Copy link
Member Author

Choose a reason for hiding this comment

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

I setup colima on an old personal machine to debug, this and a real slice works 0ffcf8d.

@@ -234,7 +234,7 @@ fix_cgroup() {
# See: https://man7.org/linux/man-pages/man7/cgroups.7.html
echo 'INFO: fix cgroup mounts for all subsystems'
local cgroup_subsystems
cgroup_subsystems=$(findmnt -lun -o source,target -t cgroup | grep "${current_cgroup}" | awk '{print $2}')
cgroup_subsystems=$(findmnt -lun -o source,target -t cgroup | grep -F "${current_cgroup}" | awk '{print $2}')
Copy link
Member Author

Choose a reason for hiding this comment

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

-F / --fixed-strings means match fixed strings, not patterns / regexes.
we're intending to match literal values

@BenTheElder BenTheElder force-pushed the systemd-entrypoint branch from 949138e to 0ffcf8d Compare May 19, 2022 04:24
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 19, 2022
@BenTheElder
Copy link
Member Author

bentheelder/kind-node:v1.24.0@sha256:cf92db251fb3f420634ec46d9c222812fee4d75f1e0105a325e57679b0f57370 is built with this change

I've tested it in colima xref #2778, and this works now.

@BenTheElder
Copy link
Member Author

Confirmed WSL 2 #2766 (comment)

I'll bump the node image and then we should ship this to v0.14

Before=slices.target

[Slice]
MemoryAccounting=true
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these parameters ***Accounting needed twice?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes these parameters are for the slice. group vs specific unit.

https://www.freedesktop.org/software/systemd/man/systemd.slice.html

@BenTheElder BenTheElder changed the title [WIP] entrypoint cleanup + fixes entrypoint cleanup + non-systemd-host fix May 19, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 19, 2022
@BenTheElder
Copy link
Member Author

BenTheElder commented May 19, 2022

Passed across github actions with the new node image.

Tested locally by me in colima and cgroups v2 ~debian (with systemd).
Also tested by others on rancher desktop and WSL 2

Base image already tested in all the pull-kubernetes* jobs across k8s versions in prow.

@stmcginnis
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2022
@BenTheElder
Copy link
Member Author

/retest

@BenTheElder
Copy link
Member Author

/override pull-kind-e2e-kubernetes-1-22

@k8s-ci-robot
Copy link
Contributor

@BenTheElder: Overrode contexts on behalf of BenTheElder: pull-kind-e2e-kubernetes-1-22

In response to this:

/override pull-kind-e2e-kubernetes-1-22

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.

@k8s-ci-robot k8s-ci-robot merged commit 1e2f525 into kubernetes-sigs:main May 19, 2022
@BenTheElder BenTheElder deleted the systemd-entrypoint branch May 19, 2022 19:29
@BenTheElder BenTheElder added this to the v0.14.0 milestone May 19, 2022
@aojea
Copy link
Contributor

aojea commented May 19, 2022

👌👍

@BenTheElder
Copy link
Member Author

full test runs in #2780, not sure why 1.22 flaked but it only flaked here and not on the 2 subsequent PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants