currently there is a race-condition between starting a lxc
and executing the first systemctl-command within.
This change let's the starting container wait until the
socket exists before continuing.
Change-Id: I4828bd317172b887f6fc42d649a39c4d0b593c99
} -> exec {"lxc-$contname-started":
path => '/usr/bin',
refreshonly => true,
- refresh => "/usr/bin/lxc-stop -n $contname ; /usr/bin/lxc-start -dn $contname",
+ 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",
+ command => "/usr/bin/lxc-start -dn $contname; /usr/bin/lxc-attach -n $contname -- bash -c 'while ! [[ -S /run/systemd/private ]]; do sleep 1; done'",
unless => "/usr/bin/[ \"\$(lxc-info -Hsn $contname)\" != \"STOPPED\" ]",
}
$dir.each |String $in| {