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:
Pete Birley 2018-06-09 19:05:57 -05:00
parent 5d855b835f
commit 9e96b0fae2

View File

@ -19,6 +19,7 @@
playbook_user_dir: "{{ ansible_user_dir }}"
kube_master: "{{ groups['primary'][0] }}"
kube_worker: "{{ inventory_hostname }}"
kube_node_hostname: "{{ ansible_fqdn }}"
- name: deploying kubelet and support assets to node
include_role:
@ -35,9 +36,15 @@
kubeadm_aio_join_command: "{{ kubeadm_cluster_join_command }}"
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
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
until: task_result.stdout == 'Ready'
retries: 120