Skip to content

yoga: Fix reboot hang on systems with molly-guard, add timeout variable #1209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions etc/kayobe/ansible/reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
serial: "{{ lookup('env', 'ANSIBLE_SERIAL') | default(1, true) }}"
tags:
- reboot
vars:
reboot_timeout_s: "{{ 20 * 60 }}"
tasks:
- name: Reboot and wait
become: true
reboot:
reboot_timeout: "{{ reboot_timeout_s }}"
search_paths:
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
- "/lib/molly-guard"
# Default list:
- "/sbin"
- "/bin"
- "/usr/sbin"
- "/usr/bin"
- "/usr/local/sbin"
18 changes: 18 additions & 0 deletions etc/kayobe/ansible/ubuntu-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
reboot:
reboot_timeout: "{{ reboot_timeout_s }}"
connect_timeout: 600
search_paths:
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
- "/lib/molly-guard"
# Default list:
- "/sbin"
- "/bin"
- "/usr/sbin"
- "/usr/bin"
- "/usr/local/sbin"
become: true
when: file_status.stat.exists

Expand Down Expand Up @@ -101,6 +110,15 @@
reboot:
reboot_timeout: "{{ reboot_timeout_s }}"
connect_timeout: 600
search_paths:
# Systems running molly-guard hang waiting for confirmation before rebooting without this.
- "/lib/molly-guard"
# Default list:
- "/sbin"
- "/bin"
- "/usr/sbin"
- "/usr/bin"
- "/usr/local/sbin"
become: true

- name: Update distribution facts
Expand Down