otherwise the ACME endpoint might return the ordered domain in lower
case and we fail to find our plugin config.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
on all call sites, we assume $cfg->{domains} is a hash, but if we do not
have any domains configured, that fails with
'Can't use an undefined value as a HASH reference at ...'
so always make domains a hash to avoid this
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
similar to the recent changes for pve-guest-common - we start each API
call with a cfs_update, but while we were waiting for the flock another
R-M-W cycle might have happened, so we need to refresh after obtaining
the lock.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
for now mostly due to the "nice" property of the acmedomains which
do not use their property key as index but actually the doamain.
Without this one could set up duplicated domain entries just fine,
but once using them -> error.
This is not nice UX, so verify node config before writing an updated
one out, to catch those issues.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
mixed bag of improvements:
- return hash based on domain
- check for duplicate domains, allow overlap between main and additional
keys otherwise
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Allow additional domains with different sub-plugins,
However, only one domain per additional entry is permitted.
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
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>
Use the new format to verify the MAC addresses.
The wakeonlan API call now returns the MAC address of the node to wake on
successful sending of the WoL packet.
pvenode finally displays this MAC address to the user as feedback.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Provides the basic functionality to provide a wake on LAN feature implementation
to start nodes in a cluster from other nodes.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Add pattern support for the check_type method used by the
parse_config method. It would be much better to integrate the missing
stuff into either the JSONSchema check_prop or parse_config methods,
should be mostly the "description" assembly anyway, and if that is
not possible or to hacky it'd be still nice to have a common single
of those parser, not multiple ones (pve-container, qemu-server, ...)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this currently only contains a description and the node-specific ACME
configuration, but I am sure we can find other goodies to put there.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>