]> git.proxmox.com Git - pve-manager.git/commit - defines.mk
fix #844: allow to pre-delay start-all-marked guests on boot
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Nov 2019 12:15:27 +0000 (13:15 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Nov 2019 19:20:58 +0000 (20:20 +0100)
commit1ff3fef0b06c3d9aadcd1caeaef3c62a2930e4be
tree9e14a527d16654c72c0aa3facddb0747a5a98748
parentf36240c5074f86925770c619f5d831bf7086ed6b
fix #844: allow to pre-delay start-all-marked guests on boot

Add a simple ExecStartPre command which reads the local node config,
and if a delay is set the helper sleeps that long then exists.

The systemd-unit approach was chosen as this ensures that we really
only delay when doing the startall on node boot. The pve-guests
service does not allows manual stops, starts or restarts, it can only
be pulled in by the multi-user.target

Mark this command with "-" to tell systemd that errors of it should
not cause an abort, it's a best-effort approach.

The journal from a 2 second delay would look like:
> Nov 19 13:13:48 dev6 systemd[1]: Starting PVE guests...
> Nov 19 13:13:48 dev6 pve-startall-delay[2318]: Delaying on-boot 'startall' command for 2 second(s).
> ...
> Nov 19 13:13:50 dev6 pve-guests[2339]: <root@pam> starting task UPID:dev6:00000924:00000529:5DD3DC7E:startall::root@pam:

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/NodeConfig.pm
bin/Makefile
bin/pve-startall-delay [new file with mode: 0755]
defines.mk
services/pve-guests.service