From: David Galloway Date: Fri, 8 Feb 2019 20:03:31 +0000 (-0500) Subject: common: Reboot RHEL7 testnodes in case of timedatectl/systemd issue X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=859d36df486e29fc4fdcbd1cb625bef2612e7bd9;p=ceph-cm-ansible.git common: Reboot RHEL7 testnodes in case of timedatectl/systemd issue Fixes: http://tracker.ceph.com/issues/24197 Signed-off-by: David Galloway --- diff --git a/roles/common/tasks/yum_systems.yml b/roles/common/tasks/yum_systems.yml index 521998ca..0517f47a 100644 --- a/roles/common/tasks/yum_systems.yml +++ b/roles/common/tasks/yum_systems.yml @@ -15,6 +15,24 @@ tags: - timezone +# See http://tracker.ceph.com/issues/24197 +# If/when we use ansible 2.7, the next two tasks can be replaced with the 'reboot' ansible module +- name: Reboot RHEL7 to workaround systemd bug + shell: "sleep 5 && reboot" + async: 1 + poll: 0 + when: '"Connection timed out" in current_tz.stderr' + tags: + - timezone + +- name: Wait for reboot in case of systemd workaround + wait_for_connection: + delay: 20 + timeout: 300 + when: '"Connection timed out" in current_tz.stderr' + tags: + - timezone + - name: Set /etc/localtime (RHEL/CentOS 6) file: src: /usr/share/zoneinfo/{{ timezone }}