]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Reboot RHEL7 testnodes in case of timedatectl/systemd issue 435/head
authorDavid Galloway <dgallowa@redhat.com>
Fri, 8 Feb 2019 20:03:31 +0000 (15:03 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 8 Feb 2019 20:03:31 +0000 (15:03 -0500)
Fixes: http://tracker.ceph.com/issues/24197
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/tasks/yum_systems.yml

index 521998cad9ec916876cbfd30a9ce46e75144b4aa..0517f47aa398ceef1b1babe2ff52296b2f2856f0 100644 (file)
   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 }}