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

Task: Gen_certs | Gather etcd node certs #3552

Closed
giridharmp opened this issue Oct 19, 2018 · 1 comment
Closed

Task: Gen_certs | Gather etcd node certs #3552

giridharmp opened this issue Oct 19, 2018 · 1 comment

Comments

@giridharmp
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Environment:

Kubespray version (commit) (git rev-parse --short HEAD):
v2.7.0

Network plugin used:
Canal

Copy of your inventory file:
[all]
node1 ip=10.222.1.20 ansible_host=10.222.1.20 ansible_user=admin etcd_member_name=etcd1
node2 ip=10.222.4.249 ansible_host=10.222.4.249 ansible_user=admin etcd_member_name=etcd2
node3 ip=10.222.9.146 ansible_host=10.222.9.146 ansible_user=admin etcd_member_name=etcd3
node4 ip=10.222.0.16 ansible_host=10.222.0.16 ansible_user=admin
node5 ip=10.222.6.238 ansible_host=10.222.6.238 ansible_user=admin
node6 ip=10.222.9.227 ansible_host=10.222.9.227 ansible_user=admin

[kube-master]
node1
node2
node3

[etcd]
node1
node2
node3

[kube-node]
node4
node5
node6

[k8s-cluster:children]
kube-node
kube-master

[vault]
node1
node2
node3

[calico-rr]

Command used to invoke ansible:
ansible-playbook --flush-cache -i inventory/myproject/hosts.ini --become --become-user=root cluster.yml

Output of ansible run:

Anything else do we need to know:
When there are more worker nodes, the certificates created for the worker nodes in master-a is not getting copied to the worker nodes.
This is because of the code snippet in the task: Gen_certs | Gather etcd node certs in the task file /etcd/tasks/gen_certs_script.yml
The variable {{ inventory_hostname }} when used along with delegate_to: in the module slurp does not get resolved to the proper inventory_hostname. It always points to the first master node in the cluster.
History of the file shows that this change to use slurp module has been recently made.

@ant31
Copy link
Contributor

ant31 commented Oct 20, 2018

ansible 2.7 is bugged. You should use 2.6 until ansible is fixed
related issue: ansible/ansible#46600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants