Jonathan Rosser 8e9bdba322 Wait for systemd-tmpfiles-setup service to complete after container restart
There is a race condition between starting an lxc container and executing
the first ansible task. Ansible makes heavy use of /tmp and the first
task executed after 'lxc-start' will collide with systemd-tmpfiles-setup
which by default removes all content from /tmp, including the working
files of any ansible task which happens to be running. This causes a fatal
error for ansible which cannot be recovered with retries.

This patch adds a raw command to check the state of the tmpfiles-setup
service and wait until it has completed, avoiding the race confdition.

Change-Id: I4ada8473bfd17b763bde16ac95099ddf7deb541c
2020-06-17 14:27:58 +01:00
..
2020-05-26 21:30:54 +03:00