]> git.proxmox.com Git - pve-container.git/commit
Improve feedback for startup
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 8 Sep 2020 11:58:43 +0000 (13:58 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 Sep 2020 18:54:57 +0000 (20:54 +0200)
commitabaa24bd5f889a9fa7607b1841c66ec01fcd4a72
treeb5a29618dd2ddf64f5897216a92f70183c479905
parent8667164dcdaf6acb623be1b8338f0892c1c7f39f
Improve feedback for startup

Since it was necessary to switch to 'Type=Simple' in the systemd
service, see 545d6f0a13ac2bf3a8d3f224c19c0e0def12116d,
'systemctl start' would not wait for the 'lxc-start' command anymore.
Thus every container start was reported as a success and the 'post-start'
hook would trigger immediately after the 'systemctl start' command.

Use the monitor socket to get the necessary information and detect
startup failure, and only run the 'post-start' hookscript after
the container is effectively running. If something goes wrong
with the monitor socket, for example if lxc-monitord is not running,
fall back to the old behavior.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/LXC.pm