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

Add Port-10250 to default kubeadm_ignore_preflight_errors #11900

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

Conversation

sathieu
Copy link
Contributor

@sathieu sathieu commented Jan 20, 2025

kubelet is started before kubeadm init is run.

Since, #11710, this leads to the following error:

W0116 14:54:04.224835   11902 utils.go:69] The recommended value for "clusterDNS" in "KubeletConfiguration" is: [10.233.0.10]; the provided value is: [169.254.25.10]
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR Port-10250]: Port 10250 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or highe
[init] Using Kubernetes version: v1.31.4
[preflight] Running pre-flight checks

As kubelet is started before kubeadm init
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sathieu
Once this PR has been reviewed and has the lgtm label, please assign floryut for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 20, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @sathieu. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

Copy link
Contributor

@VannTen VannTen left a comment

Choose a reason for hiding this comment

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

First, on the overall change:

kubelet is started before kubeadm init is run.

Is that legitimate from kubespray ? Without context, this looks wrong, so maybe we should not be doing this ? And in that case, that's what we should be fixing.

Comment on lines -23 to +24
kubeadm_ignore_preflight_errors: []
kubeadm_ignore_preflight_errors:
- Port-10250
Copy link
Contributor

Choose a reason for hiding this comment

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

This can't be done here because this would break customization of this variable.
It should instead be done locally on the task experiencing the issue, like :

vars:
ignored:
- DirAvailable--etc-kubernetes-manifests
- "{{ kubeadm_ignore_preflight_errors }}"
command: >-
timeout -k {{ kubeadm_join_timeout }} {{ kubeadm_join_timeout }}
{{ bin_dir }}/kubeadm join
--config {{ kube_config_dir }}/kubeadm-client.conf
--ignore-preflight-errors={{ ignored | flatten | join(',') }}
--skip-phases={{ kubeadm_join_phases_skip | join(',') }}

Or if this affect several tasks, have another variables which is combined to form the full list at the relevant use sites.

@sathieu
Copy link
Contributor Author

sathieu commented Jan 20, 2025

I don't understand why we have this problem and it was not caught by kubespray's CI.

Here is our inventory (generated by ansible, so double jinja): https://gitlab.com/kubitus-project/kubitus-installer/-/tree/d97c911f3a6eba275f21c19b5994f55cb3fc3ac5/roles/kubespray/templates/inventory

And the renovate MR: https://gitlab.com/kubitus-project/kubitus-installer/-/merge_requests/3610

@VannTen
Copy link
Contributor

VannTen commented Jan 20, 2025 via email

@sathieu
Copy link
Contributor Author

sathieu commented Jan 20, 2025

Are you able to reproduce it in another context ? Does it happens on multiples inventories / clusters ?

Not yet, but I can test changing the inventory if there is a suspiciour variable.

NB: We are using Debian 12

@yankay
Copy link
Member

yankay commented Jan 21, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 21, 2025
@sathieu
Copy link
Contributor Author

sathieu commented Jan 21, 2025

In the manual doc for kubeadm, kubelet is started:

  1. (Optional) Enable the kubelet service before running kubeadm:
sudo systemctl enable --now kubelet

The kubelet is now restarting every few seconds, as it waits in a crashloop for kubeadm to tell it what to do.

I think it is crashlooping until the cert is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants