From: Lucas Werkmeister Date: Sat, 5 Jan 2019 14:08:16 +0000 (+0100) Subject: add: TODO comment for future improvement X-Git-Url: https://code.wpia.club/?p=infra.git;a=commitdiff_plain;h=4fc1f6bc4b9b18d30eaf4df931494404bde8f73f add: TODO comment for future improvement With systemd/systemd#9796 [1], included in systemd v240 and later [2], we will be able to use `systemctl is-system-running --wait` to wait for the system being online instead of polling systemd’s private socket, which should be both more efficient and more stable. [1]: https://github.com/systemd/systemd/pull/9796 [2]: https://github.com/systemd/systemd/blob/v240/NEWS#L189-L191 Change-Id: I6bc2bb691eb1a6bdbcd98843891d06fb49e6b4df --- diff --git a/modules/lxc/manifests/init.pp b/modules/lxc/manifests/init.pp index 0f4101d..676558e 100644 --- a/modules/lxc/manifests/init.pp +++ b/modules/lxc/manifests/init.pp @@ -75,6 +75,7 @@ class lxc { } -> exec {"lxc-$contname-started": path => '/usr/bin', refreshonly => true, + # TODO use `systemctl is-system-running --wait` in systemd v240+ refresh => "/usr/bin/lxc-stop -n $contname ; /usr/bin/lxc-start -dn $contname; /usr/bin/lxc-attach -n $contname -- bash -c 'while ! [[ -S /run/systemd/private ]]; do sleep 1; done'", }-> exec {"lxc-$contname-started1": command => "/usr/bin/lxc-start -dn $contname; /usr/bin/lxc-attach -n $contname -- bash -c 'while ! [[ -S /run/systemd/private ]]; do sleep 1; done'",