[pve-devel] [RFC manager] pveproxy service: specify wait time for pvecm updatecerts command

Fiona Ebner f.ebner at proxmox.com
Thu Jun 29 15:59:35 CEST 2023

When starting a node that's part of a cluster, there is a time window
between the start of pve-cluster.service and when quorum is reached
(from the node's perspective). pveproxy.service is ordered after
pve-cluster.service, but that does not prevent the ExecStartPre hook
from being executed before the node is part of the quorate partition.
The pvecm updatecerts command won't do anything without quorum.

In particular, it might happen that the base directories for observed
files will not get created during/after the upgrade from Proxmox VE 7
to 8 (reported in the community forum [0] and reproduced right away in
a virtual test cluster).

To increase the chances for successful execution of the hook during
startup, wait for up to 5 seconds for quorum.

[0]: https://forum.proxmox.com/threads/129644/

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>

Dependency bump for libpve-cluster-api-perl needed.

 services/pveproxy.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/pveproxy.service b/services/pveproxy.service
index 51038785..7575faee 100644
--- a/services/pveproxy.service
+++ b/services/pveproxy.service
@@ -11,7 +11,7 @@ After=pvedaemon.service
-ExecStartPre=-/usr/bin/pvecm updatecerts --silent
+ExecStartPre=-/usr/bin/pvecm updatecerts --silent --quorum-wait-seconds 5
 ExecStart=/usr/bin/pveproxy start
 ExecStop=/usr/bin/pveproxy stop
 ExecReload=/usr/bin/pveproxy restart

More information about the pve-devel mailing list