Skip to content

Commit aa8dba7

Browse files
committed
remove podman pause process pidfile cleanup
1 parent 043dc7c commit aa8dba7

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

ansible/cleanup.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,5 @@
2828
path: "/home/{{ ansible_user }}/.ssh/"
2929
state: absent
3030

31-
# A podman pause process is started by `podman pull`, and causes an error
32-
# Error: cannot re-exec process to join the existing user namespace
33-
# in podman commands in the booted image due to its pidfile.
34-
# Later podman versions may cleanup the pidfile automatically.
35-
# NB: This hard-codes the default config that only `podman` user (=1001) runs containers.
36-
- name: Check for running podman containers
37-
command:
38-
cmd: podman ps
39-
become_user: podman
40-
register: podman_ps
41-
changed_when: false
42-
43-
- name: Ensure no containers are running
44-
assert:
45-
that: podman_ps.stdout_lines | length == 1 # header only
46-
fail_msg: "podman user has running containers:\n{{ podman_ps.stdout }}"
47-
48-
- name: Get PID of podman pause process
49-
command:
50-
cmd: cat /tmp/podman-run-1001/libpod/tmp/pause.pid
51-
register: podman_pause_pidfile
52-
changed_when: false
53-
54-
- name: Kill pause process
55-
command:
56-
cmd: "kill {{ podman_pause_pidfile.stdout }}"
57-
become_user: podman
58-
59-
- name: Remove pause pidfile
60-
file:
61-
path: /tmp/podman-run-1001/libpod/tmp/pause.pid
62-
state: absent
63-
6431
- name: Run cloud-init cleanup
6532
command: cloud-init clean --logs --seed

0 commit comments

Comments
 (0)