]> git.proxmox.com Git - pve-cluster.git/commit
pvecm: updatecerts: wait for quorum
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 30 Jun 2023 11:59:42 +0000 (13:59 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 1 Jul 2023 16:04:41 +0000 (18:04 +0200)
commit97dc596c68e8c2db6655c604ef7810fa80125594
tree79aef1fdeff874c1167d912e808dc3c5a24b1786
parent9a3753488456b19227ed202a1c51c38ca82d82d7
pvecm: updatecerts: wait for quorum

Mostly useful for the updatecerts call triggered via the ExecStartPre
hook for pveproxy.service.

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 much without quorum. Generating
local (non-pmxcfs) files is still done before waiting on 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).

Waiting on quorum should highly increase the chances for successful
execution of the ExecStartPre hook.

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

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CLI/pvecm.pm