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

🐛 always declare try-or-die-command function in kubeadm-bootstrap-script.sh #11089

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

chewong
Copy link
Member

@chewong chewong commented Aug 22, 2024

What this PR does / why we need it:

When I tried to join a worker node to a 1.31 cluster, I encountered the following error during cloud-init:

[2024-08-22 23:34:18] /usr/local/bin/kubeadm-bootstrap-script: line 111: try-or-die-command: command not found

It appears that before 1.31, we only use try-or-die-command when joining a control plane - https://github.com/kubernetes-sigs/cluster-api/blob/main/bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script-pre-k8s-1-31.sh#L131-L132. However, for >= 1.31, we use try-or-die-command for kubeadm join regardless of the node role. This PR removes the if condition around the function so that it's available when joining both control plane and worker nodes.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 22, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 22, 2024
@chewong
Copy link
Member Author

chewong commented Aug 22, 2024

/area bootstrap

@k8s-ci-robot k8s-ci-robot added area/bootstrap Issues or PRs related to bootstrap providers and removed do-not-merge/needs-area PR is missing an area label labels Aug 22, 2024
@sbueringer
Copy link
Member

Thx!

/lgtm
/assign @chrischdi

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 23, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 87ab2ceb909327ba232b63ad1205670f840994a6

@sbueringer
Copy link
Member

/cherry-pick release-1.8

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.8

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.

@chrischdi
Copy link
Member

/approve
/cherry-pick release-1.8

@k8s-infra-cherrypick-robot

@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/approve
/cherry-pick release-1.8

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 Aug 23, 2024
@k8s-ci-robot k8s-ci-robot merged commit 057fdff into kubernetes-sigs:main Aug 23, 2024
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Aug 23, 2024
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #11090

In response to this:

/cherry-pick release-1.8

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.

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/bootstrap Issues or PRs related to bootstrap providers 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/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