Skip to content

Commit d6cab4a

Browse files
authored
Merge pull request #2128 from stackhpc/reboot-delay
Add extra delay to reboot playbook
2 parents 0e4588e + ae0d82e commit d6cab4a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

etc/kayobe/ansible/maintenance/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 ``maintenance/reboot.yml`` playbook
5+
to ensure hosts can be reached reliably. The default delay is 5 seconds and
6+
can be customised with the ``post_reboot_delay_s`` variable.

0 commit comments

Comments
 (0)