]> WPIA git - infra.git/commitdiff
add: TODO comment for future improvement
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Sat, 5 Jan 2019 14:08:16 +0000 (15:08 +0100)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Sat, 5 Jan 2019 14:08:16 +0000 (15:08 +0100)
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

modules/lxc/manifests/init.pp

index 0f4101d8da7aa7dfad0d53aae5190dcfee28e7d3..676558e1f7b7a3bd5d10105c37d79079aee17d83 100644 (file)
@@ -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'",