kubespray
kubespray copied to clipboard
TASK [kubernetes/kubeadm : Join to cluster if needed] failed but not exit
I met the problem several times that ansible run to end and some worker showed failed and not join the cluster.
I found the reason is in task [kubernetes/kubeadm : Join to cluster if needed], kubespray use block
and rescue
to handle the exception of first join cluster, but if second join in rescue
still failed, ansible will continue to run tasks and skip the failed node, and this is the correct behavior of block
and rescue
in ansible, but I want to know if we should exit in this scenario. Maybe ansible should choose to exit here or not by a variable, and the default behavior is exit when twice tries both failed.
https://github.com/kubernetes-sigs/kubespray/blob/21b71b38a3e73224e813c9d21c00039b5ea872f5/roles/kubernetes/kubeadm/tasks/main.yml#L67-L114
Environment:
-
Version of Ansible (
ansible --version
): ansible 2.10.15 -
Version of Python (
python --version
): Python 3.9.10 -
Kubespray version (commit) (
git rev-parse --short HEAD
): master
Command used to invoke ansible:
ansible-playbook cluster.yml --flush-cache -vvv
Output of ansible run:
TASK [kubernetes/kubeadm : Join to cluster] ***************************************************************************************************
fatal: [worker-0]: FAILED! => {...}
TASK [kubernetes/kubeadm : Join to cluster with ignores] **************************************************************************************
fatal: [worker-0]: FAILED! => {...}
TASK [kubernetes/kubeadm : Display kubeadm join stderr if any] ********************************************************************************
ok: [worker-0] => {"msg": "...."}
TASK [kubernetes/kubeadm : Set ca.crt file permission] ****************************************************************************************
ok: [master-0] => {...}
Anything else do we need to know:
Use the playbook in following gist to simulate the problem fast. https://gist.github.com/ciiiii/6e483dcea4bb888f68e7547626b4532c
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
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.