Gate: fix waiting for nodes following zuul ansible update
For some reason it appears that the task to wait for nodes to come up requires privilege escalation to work. I suspect this is due to interation between ansible 2.5.4 and zuuls log streamer, but am not sure. In the meantime this PS unblocks the gates. Change-Id: I705f2ddf3facfe56838f606f88cfb15b822d18a5 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
5d855b835f
commit
9e96b0fae2
@ -19,6 +19,7 @@
|
|||||||
playbook_user_dir: "{{ ansible_user_dir }}"
|
playbook_user_dir: "{{ ansible_user_dir }}"
|
||||||
kube_master: "{{ groups['primary'][0] }}"
|
kube_master: "{{ groups['primary'][0] }}"
|
||||||
kube_worker: "{{ inventory_hostname }}"
|
kube_worker: "{{ inventory_hostname }}"
|
||||||
|
kube_node_hostname: "{{ ansible_fqdn }}"
|
||||||
|
|
||||||
- name: deploying kubelet and support assets to node
|
- name: deploying kubelet and support assets to node
|
||||||
include_role:
|
include_role:
|
||||||
@ -35,9 +36,15 @@
|
|||||||
kubeadm_aio_join_command: "{{ kubeadm_cluster_join_command }}"
|
kubeadm_aio_join_command: "{{ kubeadm_cluster_join_command }}"
|
||||||
include: util-run-join-command.yaml
|
include: util-run-join-command.yaml
|
||||||
|
|
||||||
|
# FIXME(portdirect): running as root for now to unblock the gates, though this
|
||||||
|
# runs ok under ansible 2.5.4 locally without privileges
|
||||||
- name: waiting for node to be ready
|
- name: waiting for node to be ready
|
||||||
delegate_to: "{{ kube_master }}"
|
delegate_to: "{{ kube_master }}"
|
||||||
command: kubectl get node "{{ ansible_fqdn }}" -o jsonpath="{$.status.conditions[?(@.reason=='KubeletReady')]['type']}"
|
become: true
|
||||||
|
become_user: root
|
||||||
|
shell: kubectl get node "{{ kube_node_hostname }}" -o jsonpath="{$.status.conditions[?(@.reason=='KubeletReady')]['type']}" || echo "Not registered yet"
|
||||||
|
environment:
|
||||||
|
KUBECONFIG: '/etc/kubernetes/admin.conf'
|
||||||
register: task_result
|
register: task_result
|
||||||
until: task_result.stdout == 'Ready'
|
until: task_result.stdout == 'Ready'
|
||||||
retries: 120
|
retries: 120
|
||||||
|
Loading…
Reference in New Issue
Block a user