Skip to content

Commit e9d1d9e

Browse files
committed
Add extra delay to reboot playbook
We often see CI failures where the reboot playbook is successful, but the growroot playbook invoked immediately after it fails with a `Connection timed out` error. Add a small 5 seconds extra delay after the reboot to ensure hosts have finished booting successfully. The delay can be customised with the `post_reboot_delay_s` variable. (cherry picked from commit ae0d82e)
1 parent 0bdb4b5 commit e9d1d9e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

etc/kayobe/ansible/reboot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
gather_facts: false
66
vars:
77
reboot_timeout_s: "{{ 20 * 60 }}"
8+
post_reboot_delay_s: 5 # Extra delay to ensure SSH is working reliably
89
reboot_with_bootstrap_user: false
910
ansible_user: "{{ bootstrap_user if reboot_with_bootstrap_user | bool else kayobe_ansible_user }}"
1011
ansible_ssh_common_args: "{{ '-o StrictHostKeyChecking=no' if reboot_with_bootstrap_user | bool else '' }}"
@@ -32,7 +33,8 @@
3233
- name: Reboot and wait
3334
become: true
3435
ansible.builtin.reboot:
35-
reboot_timeout: "{{ reboot_timeout_s }}"
36+
post_reboot_delay: "{{ post_reboot_delay_s | int }}"
37+
reboot_timeout: "{{ reboot_timeout_s | int }}"
3638
search_paths:
3739
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
3840
- /lib/molly-guard
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Adds an extra delay after reboot in the ``reboot.yml`` playbook to ensure
5+
hosts can be reached reliably. The default delay is 5 seconds and can be
6+
customised with the ``post_reboot_delay_s`` variable.

0 commit comments

Comments
 (0)