Skip to content

Commit

Permalink
Ensure podman copes with a hard reboot (#460)
Browse files Browse the repository at this point in the history
* remove unused podman temp dir variable

* fix podman containers failing with 'invalid internal status' after hard reboot
  • Loading branch information
sjpb authored Oct 23, 2024
1 parent 9e30bf6 commit c61d18d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
1 change: 0 additions & 1 deletion ansible/roles/podman/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
podman_users:
- name: "{{ ansible_user }}"
podman_tmp_dir_root: /run # MUST be on a tmpfs
16 changes: 16 additions & 0 deletions ansible/roles/podman/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,19 @@
with_items: "{{ podman_users }}"
register: podman_user_info
become: yes

- name: Clear up podman temporary files on startup
copy:
content: |
# Created by ansible
# Delete ephemeral podman files to avoid issues where /tmp is not of type tmpfs and persists across reboots.
# See tmpfiles.d(5) man page, note "R" specifies recursive removal and "!" marks as happening only on boot.
#
# Type Path Mode User Group Age Argument
R! /tmp/containers-user-*
R! /tmp/podman-run-*
dest: /etc/tmpfiles.d/podman-local.conf
owner: root
group: root
mode: 0660
become: true
9 changes: 0 additions & 9 deletions ansible/roles/podman/tasks/validate.yml

This file was deleted.

10 changes: 0 additions & 10 deletions ansible/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
'enable_configless' not found in openhpc_config.SlurmctldParameters - is variable openhpc_config overridden?
Additional slurm.conf parameters should be provided using variable openhpc_config_extra.
success_msg: Checked Slurm will be configured for configless operation

- name: Validate podman configuration
hosts: podman
gather_facts: false
tags: podman
tasks:
- import_role:
name: podman
tasks_from: validate.yml
tags: validate

- name: Validate filebeat configuration
hosts: filebeat
Expand Down

0 comments on commit c61d18d

Please sign in to comment.