OOMPolicy [0] defaults to stop - resulting in the complete daemon to
be killed.
Our Daemon class does start new workers automatically if it detects
that fewer than configured are running.
[0] systemd.service(5)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
user experience benefits when we restart pmgdaemon and pmgproxy if
they get terminated abnormally (now observed with oom-kills).
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
The package that ships the service is the same as the one that ships
the binaries, so quite the useless check and a remainder from initial
switch from sysv to systemd in ~2015 (when it was not 100% clear
what/how systemd features should be integrated or units encoded).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
while we indirectly got that by the remote-fs ordering constraint its
better to encode it explicitly, especially as the remote-fs does not
make much sense and may get removed soon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
get_ip_from_hostname does only check getaddrinfo, which can fail for
the local node in some environments, especially container ones.
Rather, use the new get_local_ip helper, that still tries to do a gai
call first, but falls back to configured (/etc/network/interfaces)
IPs and also on the currently, from kernel POV active ones.
A big bonus is that the new helper is much less likely to die, so it
won't break service startup in restricted (CTs) envs after initial
setup as often anymore.
While yes, if no addr is resolved, configured or active the PMG won't
work, but killing pmg proxy/daemon won't better that situation either
;)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Ported over from commit 8797cc74cd94583130ab4c2f541d1a75b518cfa6
of pve-manager, but with the list of machine-id extracted from PMG
ISOs.
The full map:
PMG 5.0-5 -> "e378bde63ac54872a85af23a8e4dac73"
PMG 5.1-1 -> "932b668d1fad4709b4976d54152d223c"
PMG 5.1-2 -> "931a8410cd034202a26b0e19d56e157a"
PMG 5.2-1 -> "9a1f3c5284e1423c9b0e0ee5819db6c9"
PMG 6.0-1 -> "5472a49c6436426fbebd7881f7b7f13b"
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
To ensure we have the new `upid_normalize_status_type` and the
new http-server listening behavior available
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
It was actually integrated into apt quite a bit before version 2.0
but it does not really hurts and version 2 is available since Q1 2020
on sid, bullseye will have 2.2.x so using (>= 2~) is just fine.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This patch changes the deprecated method used from libarchive-perl.
It needs a versioned dependency bump on libarchive-perl (>= 3.4.0).
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This contains `PMG::RS::Acme` and `PMG::RS::CSR` which are
used for letsencrypt certificates.
Note that for the DNS plugins this still uses the perl code
from proxmox-acme for now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PMG::PBSSchedule contains methods for creating/deleting systemd-timer units,
which will run a backup to a configured PBS remote.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
add a SectionConfig definition to hold information about PBS-remotes used
for backing up PMG.
Mostly adapted from the PBSPlugin.pm in pve-storage.
This commit needs a versioned dependency on pve-common
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>