]> git.proxmox.com Git - pve-cluster.git/commit
pvecm: updatecerts: check and report if we got a timeout
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 1 Jul 2023 16:40:10 +0000 (18:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 1 Jul 2023 17:29:38 +0000 (19:29 +0200)
commit66b0e690fec93c63952645213cc3110df3d56162
treea233aef5a8467d860d7d0b9b6620d83031c42de4
parenta56d0aa8f16e7a97fb7645589add626e309ce9a9
pvecm: updatecerts: check and report if we got a timeout

If timeout is reached, run_fork_with_timeout will warn "got timeout".
When processing triggers for pve-manager (because of ExecStartPre of
pveproxy.service invoking pvecm updatecerts) that warning can appear
in the apt output without any context (output of the forked sub
doesn't appear there). So give it some actual content using the
$got_timeout returned in wantarray list context of the
run_fork_with_timeout method.

Note that this could be seen as clash with the silent flag, but IMO
that is a bit misnamed, we mostly want to avoid outputting the info
messages from updatecerts_and_ssh, and that silent (i.e., quite) gets
convoluted with a no-error behavior seems also odd.
TBH., I actually thought about printing the "waiting for quorum" at
least once for the silent case too, but for now omitted it – lets
wait on actual feedback and then maybe restructure this completely.

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