Skip to content

Commit 9b9971d

Browse files
authored
Merge pull request #1209 from stackhpc/yoga-molly-guard
yoga: Fix reboot hang on systems with molly-guard, add timeout variable
2 parents e25cc4c + 382f735 commit 9b9971d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

etc/kayobe/ansible/reboot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44
serial: "{{ lookup('env', 'ANSIBLE_SERIAL') | default(1, true) }}"
55
tags:
66
- reboot
7+
vars:
8+
reboot_timeout_s: "{{ 20 * 60 }}"
79
tasks:
810
- name: Reboot and wait
911
become: true
1012
reboot:
13+
reboot_timeout: "{{ reboot_timeout_s }}"
14+
search_paths:
15+
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
16+
- "/lib/molly-guard"
17+
# Default list:
18+
- "/sbin"
19+
- "/bin"
20+
- "/usr/sbin"
21+
- "/usr/bin"
22+
- "/usr/local/sbin"

etc/kayobe/ansible/ubuntu-upgrade.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@
4040
reboot:
4141
reboot_timeout: "{{ reboot_timeout_s }}"
4242
connect_timeout: 600
43+
search_paths:
44+
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
45+
- "/lib/molly-guard"
46+
# Default list:
47+
- "/sbin"
48+
- "/bin"
49+
- "/usr/sbin"
50+
- "/usr/bin"
51+
- "/usr/local/sbin"
4352
become: true
4453
when: file_status.stat.exists
4554

@@ -101,6 +110,15 @@
101110
reboot:
102111
reboot_timeout: "{{ reboot_timeout_s }}"
103112
connect_timeout: 600
113+
search_paths:
114+
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
115+
- "/lib/molly-guard"
116+
# Default list:
117+
- "/sbin"
118+
- "/bin"
119+
- "/usr/sbin"
120+
- "/usr/bin"
121+
- "/usr/local/sbin"
104122
become: true
105123

106124
- name: Update distribution facts

0 commit comments

Comments
 (0)