diff options
author | Jason DeTiberus <detiber@gmail.com> | 2017-01-24 17:34:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-24 17:34:50 -0500 |
commit | 60808d88521ada44948632825cadb7e9752c6d97 (patch) | |
tree | 62a525d53700f1a82cc269b41cbdeb89d82ab92d /playbooks/common/openshift-cluster | |
parent | 0e89802effb785ff90755369bfd40865756bf60b (diff) | |
parent | f8d5693489cb95e6a7ccfcc5b33d99115f7da5d3 (diff) | |
download | openshift-60808d88521ada44948632825cadb7e9752c6d97.tar.gz openshift-60808d88521ada44948632825cadb7e9752c6d97.tar.bz2 openshift-60808d88521ada44948632825cadb7e9752c6d97.tar.xz openshift-60808d88521ada44948632825cadb7e9752c6d97.zip |
Merge pull request #2981 from dgoodwin/upgrade-wait-for-node
Wait for nodes to be ready before proceeding with upgrade.
Diffstat (limited to 'playbooks/common/openshift-cluster')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml index 86b344d7a..2bb460815 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml @@ -87,6 +87,19 @@ - name: Restart rpm node service service: name="{{ openshift.common.service_type }}-node" state=restarted when: inventory_hostname in groups.oo_nodes_to_upgrade and not openshift.common.is_containerized | bool + + - name: Wait for node to be ready + command: > + {{ hostvars[groups.oo_first_master.0].openshift.common.client_binary }} get node {{ openshift.common.hostname | lower }} --no-headers + register: node_output + delegate_to: "{{ groups.oo_first_master.0 }}" + when: inventory_hostname in groups.oo_nodes_to_upgrade + until: "{{ node_output.stdout.split()[1].startswith('Ready')}}" + # Give the node two minutes to come back online. Note that we pre-pull images now + # so containerized services should restart quickly as well. + retries: 24 + delay: 5 + - name: Set node schedulability command: > {{ hostvars[groups.oo_first_master.0].openshift.common.client_binary }} adm manage-node {{ openshift.node.nodename | lower }} --schedulable=true |