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

kubeadm: update preflight check #129450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlory
Copy link
Member

@carlory carlory commented Jan 2, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

  1. The losetup binary is required by kubelet. kubelet's volume manager uses it to create a fd lock.

  2. remove nsenter. kubelet's --containerized flag was deprecated in 1.14

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

kubeadm: removed preflight check for nsenter on Linux nodes
kubeadm: added preflight check for `losetup` on Linux nodes. It's required by kubelet for keeping a block device opened. 

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 2, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 2, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carlory

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2025
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 2, 2025
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

i'm +1 to have preflight for the kubelet tools that are required.

kubeadm: added preflight check for losetup on Linux nodes

please add some explanation in the release note "it's required by the kubelet for doing X".

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4ca6187b682854bda76ce7e43d13dfa4694ca7d9

@carlory
Copy link
Member Author

carlory commented Jan 2, 2025

unrelated failure
/test pull-kubernetes-integration

please add some explanation in the release note "it's required by the kubelet for doing X".

updated.

@@ -83,6 +83,7 @@ func addExecChecks(checks []Checker, execer utilsexec.Interface, k8sVersion stri
}

checks = append(checks,
InPathCheck{executable: "losetup", mandatory: true, exec: execer},
Copy link
Contributor

Choose a reason for hiding this comment

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

Cloud you add some comments to explain why we need it? So that when it needs to be removed in the future, we can quickly confirm why we added it in the first place.

Copy link
Contributor

Choose a reason for hiding this comment

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

In PR #129317, we removed the touch, because the code structure has been changed several times, which makes it very difficult to track down the PR where we initially added it.

Copy link
Member

@neolit123 neolit123 Jan 2, 2025

Choose a reason for hiding this comment

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

all the 3 tools that we preflight seem to be related to kubelet and volumes. we could add a comment that covers all 3 of them.

this PR here can merge fast.
and for https://github.com/kubernetes/kubernetes/pull/122016/files#diff-1c0013149a8afa62fc0d6d029db0ffc3564c30d336738ee32e80e3379a14455a
you can remove the nsetter part of the comment.

Copy link
Member Author

@carlory carlory Jan 3, 2025

Choose a reason for hiding this comment

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

@HirazawaUi @neolit123 updated. And remove nsenter in this PR.

Copy link
Member

@neolit123 neolit123 Jan 3, 2025

Choose a reason for hiding this comment

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

lgtm, but now we need the kubelet pr to merge first, where nsetter will actually be no longer needed. not an issue if we merge this pr first but as long as it's within the same k8s release window.

/lgtm

kubeadm: remove preflight check for nsenter on Linux nodes

Signed-off-by: carlory <baofa.fan@daocloud.io>
@carlory carlory force-pushed the kubeadm-exec-check branch from 61040f5 to 00a7849 Compare January 3, 2025 03:42
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@k8s-ci-robot k8s-ci-robot requested a review from neolit123 January 3, 2025 03:42
@carlory carlory changed the title kubeadm: add preflight check for losetup on Linux nodes kubeadm: update preflight check Jan 3, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 78e5d6d8a94ac26020af163acc82f4d2ffbc5d04

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm

@stmcginnis
Copy link
Contributor

Looks great with the links explaining why they are needed. Thanks!

/lgtm

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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants