You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because kubeadm_discovery_address is set to kube-control-plane-gx03l92v:6443 where kube-control-plane-gx03l92v is the inventory_hostname of the first and only kube_control_plane.
I think this failure is caused by the changes of commit 27ab364. This commit sets the fact first_kube_control_plane in order to ensure task delegation to working kube_control_plane instance. This is achieved by refactoring groups['kube_control_plane']|first to first_kube_control_plane.
This main goal works smoothly but the commit also refactor the use of first_kube_master to first_kube_control_plane. But this is incorrect since first_kube_master should be an address and not the inventory_hostname. Some times both are the same but we can't ensure that. So when roles/kubernetes/control-plane/tasks/define-first-kube-control.yml is included, first_kube_control_plane fact value changes from adress to inventory_hostname generating the fail.
I think one option is to refactor the first_kube_control_plane name from roles/kubespray-defaults/defaults/main.yaml to first_kube_control_plane_address in order to avoid variable overlapping.
I will open the PR to fix this ASAP.
The text was updated successfully, but these errors were encountered:
Environment:
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
):ansible --version
):python --version
):Kubespray version (commit) (
git rev-parse --short HEAD
):92f25bf267ffd3393f6caffa588169d3a44a799c -> v2.18.0
Network plugin used:
calico
Command used to invoke ansible:
ansible-playbook cluster.yml
Output of ansible run:
Explanation:
As we can see in the Ansible output log, the following task locating in
roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml
is failing:This is because
kubeadm_discovery_address
is set tokube-control-plane-gx03l92v:6443
wherekube-control-plane-gx03l92v
is theinventory_hostname
of the first and onlykube_control_plane
.I think this failure is caused by the changes of commit 27ab364. This commit sets the fact
first_kube_control_plane
in order to ensure task delegation to workingkube_control_plane
instance. This is achieved by refactoringgroups['kube_control_plane']|first
tofirst_kube_control_plane
.This main goal works smoothly but the commit also refactor the use of
first_kube_master
tofirst_kube_control_plane
. But this is incorrect sincefirst_kube_master
should be anaddress
and not theinventory_hostname
. Some times both are the same but we can't ensure that. So whenroles/kubernetes/control-plane/tasks/define-first-kube-control.yml
is included,first_kube_control_plane
fact value changes fromadress
toinventory_hostname
generating the fail.I think one option is to refactor the
first_kube_control_plane
name fromroles/kubespray-defaults/defaults/main.yaml
tofirst_kube_control_plane_address
in order to avoid variable overlapping.I will open the PR to fix this ASAP.
The text was updated successfully, but these errors were encountered: