]> git.proxmox.com Git - pve-cluster.git/log
pve-cluster.git
3 months agobump version to 8.0.7 master
Wolfgang Bumiller [Tue, 4 Jun 2024 08:58:55 +0000 (10:58 +0200)]
bump version to 8.0.7

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 months agothe notify update breaks older pve-{ha-,}manager
Wolfgang Bumiller [Tue, 4 Jun 2024 08:57:08 +0000 (10:57 +0200)]
the notify update breaks older pve-{ha-,}manager

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 months agobump pve-rs dependency for the notification update
Wolfgang Bumiller [Tue, 4 Jun 2024 09:03:19 +0000 (11:03 +0200)]
bump pve-rs dependency for the notification update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 months agonotify: use named template instead of passing template strings
Lukas Wagner [Tue, 21 May 2024 13:31:44 +0000 (15:31 +0200)]
notify: use named template instead of passing template strings

The notification system will now load template files from a defined
location. The template to use is now passed to proxmox_notify, instead
of separate template strings for subject/body.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
3 months agofix #5461: pvecm: use ssh_info_to_command for intra cluster ssh
Aaron Lauterer [Thu, 16 May 2024 12:08:27 +0000 (14:08 +0200)]
fix #5461: pvecm: use ssh_info_to_command for intra cluster ssh

because otherwise the SSH calls to other nodes in the cluster will fail
on newer clusters that only have the ssh host keys located in the
pmxcfs.

With ssh_info_to_command we get all the needed SSH options that set the
alias and point to the right known_hosts file.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
5 months agobump version to 8.0.6
Thomas Lamprecht [Fri, 19 Apr 2024 06:36:05 +0000 (08:36 +0200)]
bump version to 8.0.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agopvecm: stop merging SSH known hosts by default
Fabian Grünbichler [Thu, 11 Jan 2024 10:51:18 +0000 (11:51 +0100)]
pvecm: stop merging SSH known hosts by default

and allow explicitly unmerging to remove the symlink altogether.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
5 months agossh: expose SSH options on their own
Fabian Grünbichler [Thu, 11 Jan 2024 10:51:17 +0000 (11:51 +0100)]
ssh: expose SSH options on their own

for example, to re-use with an scp command.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
5 months agofix #4886: SSH: pin node's host key if available
Fabian Grünbichler [Thu, 11 Jan 2024 10:51:16 +0000 (11:51 +0100)]
fix #4886: SSH: pin node's host key if available

if the target node has already stored their SSH host key on pmxcfs, pin it and
ignore the global known hosts information.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
5 months agofix #4886: write node SSH hostkey to pmxcfs
Fabian Grünbichler [Thu, 11 Jan 2024 10:51:15 +0000 (11:51 +0100)]
fix #4886: write node SSH hostkey to pmxcfs

so that we can explicitly pin just this key when doing intra-cluster SSH
connections. this works similar to the certificate cache we use for API
proxying, but without automatic invalidation, since node A doesn't have access
to node B's host key..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
5 months agodatacenter config: mark notification settings as deprecated/unused
Lukas Wagner [Fri, 19 Jan 2024 10:30:45 +0000 (11:30 +0100)]
datacenter config: mark notification settings as deprecated/unused

These were part of the first version of the notification overhaul
which was already rolled out in pvetest. To avoid breakage for users
who may have used the version from pvetest, we do not remove them yet
and only mark them as unused or deprecated. They can be removed at
some point in the future.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agossh: default to 4096 bit keys when generating
Fabian Grünbichler [Thu, 21 Dec 2023 09:46:09 +0000 (10:46 +0100)]
ssh: default to 4096 bit keys when generating

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 months agocfs_write_file: fix accidental UTF-8 re-encoding
Fiona Ebner [Tue, 9 Jan 2024 11:55:07 +0000 (12:55 +0100)]
cfs_write_file: fix accidental UTF-8 re-encoding

by correclty passing the $force_utf8 flag to
PVE::Tools::file_set_contents(). The idea was that only callers that
are ready will opt-in to the behavior.

When reading files with PVE::Tools::file_get_contents() or
ipcc_get_config(), the UTF-8 flag on the Perl string is not set, even
if the data is UTF-8. Such data would then be encoded a second time,
as reported in the community forum [0] and bug tracker [1].

[0]: https://forum.proxmox.com/threads/139282/
[1]: https://bugzilla.proxmox.com/show_bug.cgi?id=1909#c1

Fixes: 90c824b ("cluster fs: allow to force UTF-8 encoding for cfs_write_file")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Filip Schauer <f.schauer@proxmox.com>
10 months agobump version to 8.0.5
Thomas Lamprecht [Fri, 17 Nov 2023 13:40:36 +0000 (14:40 +0100)]
bump version to 8.0.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: bump versioned dependency for libpve-rs-perl to >= 0.8.7
Thomas Lamprecht [Fri, 17 Nov 2023 13:35:12 +0000 (14:35 +0100)]
d/control: bump versioned dependency for libpve-rs-perl to >= 0.8.7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agonotify: adapt to matcher based notification system
Lukas Wagner [Tue, 14 Nov 2023 12:59:29 +0000 (13:59 +0100)]
notify: adapt to matcher based notification system

This commit removes the target paramters from all notify calls. Also,
the default 'mail-to-root' target is not added automatically any more
- this target will be added by an dpkg hook in the future.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agoadd profiles.cfg to cluster fs
Dominik Csapak [Fri, 17 Nov 2023 11:45:40 +0000 (12:45 +0100)]
add profiles.cfg to cluster fs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
10 months agoadd priv/macs.db
Alexandre Derumier [Fri, 17 Nov 2023 11:39:39 +0000 (12:39 +0100)]
add priv/macs.db

use to cache mac-ip list association.

can be use by external ipam, firewall,etc for fast lookup

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 months agocluster setup: drop max-size override for file_get_contents calls
Thomas Lamprecht [Fri, 17 Nov 2023 13:23:50 +0000 (14:23 +0100)]
cluster setup: drop max-size override for file_get_contents calls

We switched the default to match pmxcfs again (after its limit
increase for Proxmox VE 7) to 1024 * 1024 (= 1 MiB), so not required
to override the limit here, as we actually made it lower, not higher.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agocluster setup: clean-up variable naming and consitency
Thomas Lamprecht [Fri, 17 Nov 2023 13:16:52 +0000 (14:16 +0100)]
cluster setup: clean-up variable naming and consitency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agodatacenter config: avoid writing out default MAC prefix
Thomas Lamprecht [Sun, 29 Oct 2023 17:06:03 +0000 (18:06 +0100)]
datacenter config: avoid writing out default MAC prefix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix # 4764: datacenter config: default MAC prefix to official Proxmox OUI
Thomas Lamprecht [Sun, 29 Oct 2023 15:52:25 +0000 (16:52 +0100)]
fix # 4764: datacenter config: default MAC prefix to official Proxmox OUI

Proxmox Server Solutions GmbH got the OUI BC-24-11 assigned for a MA-L
(large) address block that provides 24 bits (16 777 216) of space
available for guests.

Use this as new default, effectively disallowing a fully random MAC,
and extend the descriptions with some background.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agodatacenter config: add missing language codes and comment all
Thomas Lamprecht [Sun, 29 Oct 2023 14:42:41 +0000 (15:42 +0100)]
datacenter config: add missing language codes and comment all

Croatian, Georgian, Ukrainian were all added only recently, so add
them to this map here.

Arabic, Korean and Dutch was missing too, and we had those in since
quite a while.

While at it, comment the long form for every language.

Copied over from widget-toolkit's language_map, then transformed with
some vim sed foo.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agodatacenter config: fix descriptions for user-tag-access schema
Thomas Lamprecht [Sun, 29 Oct 2023 14:41:24 +0000 (15:41 +0100)]
datacenter config: fix descriptions for user-tag-access schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agodatacenter config: update comment for removing applet console-viewer
Thomas Lamprecht [Mon, 2 Oct 2023 11:07:11 +0000 (13:07 +0200)]
datacenter config: update comment for removing applet console-viewer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agobump version to 8.0.4
Fiona Ebner [Mon, 11 Sep 2023 11:57:13 +0000 (13:57 +0200)]
bump version to 8.0.4

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
12 months agod/control: add/bump libpve-notify-perl dependency for libpve-common-perl to >= 8.0.9
Fiona Ebner [Mon, 11 Sep 2023 11:53:33 +0000 (13:53 +0200)]
d/control: add/bump libpve-notify-perl dependency for libpve-common-perl to >= 8.0.9

Needed for the forcing UTF-8 encoding with file_set_contents().

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
12 months agod/control: run wrap-and-sort -tkn
Fiona Ebner [Mon, 11 Sep 2023 12:23:45 +0000 (14:23 +0200)]
d/control: run wrap-and-sort -tkn

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
12 months agofix #4937: notify: write configuration files in utf8 encoding
Lukas Wagner [Wed, 30 Aug 2023 12:37:54 +0000 (14:37 +0200)]
fix #4937: notify: write configuration files in utf8 encoding

Strings that are returned from the Rust implementation are encoded as
utf8. To avoid issues with certain special characters (e.g. german
umlauts), we also need to explicitly store the configuration files in
utf8 encoding.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[FE: use flag parameter instead of encoding as a string]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
12 months agocluster fs: allow to force UTF-8 encoding for cfs_write_file
Lukas Wagner [Wed, 30 Aug 2023 12:37:53 +0000 (14:37 +0200)]
cluster fs: allow to force UTF-8 encoding for cfs_write_file

Since this function is used to store utf8-encoded strings that come
from Rust, we need to be able to save the file in proper utf8 encoding
as well.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[FE: use flag parameter instead of encoding as a string]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
13 months agobuildsys: add libpve-notify-perl package to $(LIB_DEB) variable
Lukas Wagner [Mon, 24 Jul 2023 13:29:52 +0000 (15:29 +0200)]
buildsys: add libpve-notify-perl package to $(LIB_DEB) variable

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[w.bumiller@proxmox.com: add missing '_all' suffix
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agobump version to 8.0.3
Wolfgang Bumiller [Mon, 24 Jul 2023 13:06:19 +0000 (15:06 +0200)]
bump version to 8.0.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agod/control: extended description for libpve-notify-perl
Wolfgang Bumiller [Mon, 24 Jul 2023 13:10:14 +0000 (15:10 +0200)]
d/control: extended description for libpve-notify-perl

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agod/control: libpve-notify-perl depneds on libproxmox-rs-perl 0.3.1
Wolfgang Bumiller [Mon, 24 Jul 2023 12:19:07 +0000 (14:19 +0200)]
d/control: libpve-notify-perl depneds on libproxmox-rs-perl 0.3.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agod/control: set libpve-rs-perl dep to 0.8.5
Wolfgang Bumiller [Mon, 24 Jul 2023 10:11:36 +0000 (12:11 +0200)]
d/control: set libpve-rs-perl dep to 0.8.5

This will be the first one introducing the notify packages.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agonotify: use renamed Proxmox::RS::Notify
Lukas Wagner [Mon, 24 Jul 2023 11:26:58 +0000 (13:26 +0200)]
notify: use renamed Proxmox::RS::Notify

Suggested-by: Wolfgang Bugmiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
13 months agoadd libpve-notify-perl package
Lukas Wagner [Thu, 20 Jul 2023 14:32:05 +0000 (16:32 +0200)]
add libpve-notify-perl package

The package contains the  PVE::Notify. It is a very thin wrapper
around the Proxmox::RS::Notify module, feeding the configuration
from the new 'notifications.cfg' and 'priv/notifications.cfg' files
into it.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
13 months agodatacenter: add APT/fencing/replication notification configuration
Lukas Wagner [Thu, 20 Jul 2023 14:32:04 +0000 (16:32 +0200)]
datacenter: add APT/fencing/replication notification configuration

These options allow setting the notification target for package update
notifications, node fencing notifications and replication notifications.

Also, fencing and replication has now new options that allow disabling
notifications altogether.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
13 months agocluster files: add notifications.cfg
Lukas Wagner [Thu, 20 Jul 2023 14:32:03 +0000 (16:32 +0200)]
cluster files: add notifications.cfg

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
14 months agobump version to 8.0.2
Thomas Lamprecht [Sat, 1 Jul 2023 17:23:03 +0000 (19:23 +0200)]
bump version to 8.0.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agod/control: bump dependency for libpve-common-perl to >= 8.0.6
Thomas Lamprecht [Sat, 1 Jul 2023 17:29:01 +0000 (19:29 +0200)]
d/control: bump dependency for libpve-common-perl to >= 8.0.6

to get new run_fork_with_timeout behavior in list context.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: updatecerts: check and report if we got a timeout
Thomas Lamprecht [Sat, 1 Jul 2023 16:40:10 +0000 (18:40 +0200)]
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>
14 months agopvecm: updatecerts: reword comment
Thomas Lamprecht [Sat, 1 Jul 2023 16:35:13 +0000 (18:35 +0200)]
pvecm: updatecerts: reword comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: updatecerts: only report quorum-wait progress if not silent
Thomas Lamprecht [Sat, 1 Jul 2023 15:16:27 +0000 (17:16 +0200)]
pvecm: updatecerts: only report quorum-wait progress if not silent

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: updatecerts: improve variable naming
Thomas Lamprecht [Sat, 1 Jul 2023 15:15:55 +0000 (17:15 +0200)]
pvecm: updatecerts: improve variable naming

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: updatecerts: wait for quorum
Fiona Ebner [Fri, 30 Jun 2023 11:59:42 +0000 (13:59 +0200)]
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>
14 months agosetup: split generation of local (i.e. non-pmxcfs) files out into helper
Fiona Ebner [Fri, 30 Jun 2023 11:59:41 +0000 (13:59 +0200)]
setup: split generation of local (i.e. non-pmxcfs) files out into helper

In preparation to wait for quorum in the updatecerts command. The
generation of files that do not depend on quorum should still be done
beforehand.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agofix typo
Fiona Ebner [Fri, 30 Jun 2023 11:59:44 +0000 (13:59 +0200)]
fix typo

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: style cleanups
Thomas Lamprecht [Sat, 1 Jul 2023 14:32:09 +0000 (16:32 +0200)]
pvecm: style cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopmxcfs: drop unused variable from full_write
Thomas Lamprecht [Sat, 1 Jul 2023 11:28:48 +0000 (13:28 +0200)]
pmxcfs: drop unused variable from full_write

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopmxcfs: log resolved IP and improve log on failure to resolve
Thomas Lamprecht [Fri, 30 Jun 2023 13:39:18 +0000 (15:39 +0200)]
pmxcfs: log resolved IP and improve log on failure to resolve

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopmxcfs: check all addresses from getaddrinfo to find non-loopback one
Thomas Lamprecht [Fri, 30 Jun 2023 09:29:18 +0000 (11:29 +0200)]
pmxcfs: check all addresses from getaddrinfo to find non-loopback one

Make the resolution of the node name to a local non-loopback address
through getaddrinfo more flexible.

Don't just ask for one, but for all addresses, then loop through the
returned linked list until the first non-loopback one is found.

It seems that some cloud-init templates hosting providers, like e.g.
OVH use, are misconfigured in always adding 127.0.1.1 for the
hostname to /etc/hosts, even if another mapping for the hostname
exists already. This popped up in our community forum with the
upgrade to bookworm, so might be related to the cloud-init version
from Bookworm.

Some examples pointed out by Alexandre:
https://forum.proxmox.com/threads/129678/
https://forum.proxmox.com/threads/129669/#post-568172
https://forum.proxmox.com/threads/129398/#post-568290

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agopvecm: update comment about updatecerts timeout
Fiona Ebner [Wed, 28 Jun 2023 13:23:16 +0000 (15:23 +0200)]
pvecm: update comment about updatecerts timeout

The call was moved by 84c3ab0 ("pve-cluster.service: move pvecm call
to pveproxy.service") to pveproxy.service's ExecStartPre.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
15 months agodatacenter config: turn shutdown policy into a standard option
Fiona Ebner [Fri, 16 Jun 2023 11:33:37 +0000 (13:33 +0200)]
datacenter config: turn shutdown policy into a standard option

to be re-used by the node/status API endpoint.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
15 months agobuildsys: improve DSC target
Thomas Lamprecht [Mon, 5 Jun 2023 10:06:49 +0000 (12:06 +0200)]
buildsys: improve DSC target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump version to 8.0.1
Thomas Lamprecht [Mon, 5 Jun 2023 10:05:05 +0000 (12:05 +0200)]
bump version to 8.0.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoadd cfg files for resource mapping
Dominik Csapak [Thu, 25 May 2023 10:17:43 +0000 (12:17 +0200)]
add cfg files for resource mapping

There might be more mapping types in the future, but for now it's:

- mapping/pci.cfg
- mapping/usb.cfg

Add them to both, the perl side (PVE/Cluster.pm) and pmxcfs side
(status.c).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: Dominik, Fabian and I decided to do a s/resource/mapping/
   rename on the cfg & API paths and privileges, so ammend that ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agopvecm: fix cluster join over ssh with newer rsync
Dominik Csapak [Fri, 2 Jun 2023 13:20:23 +0000 (15:20 +0200)]
pvecm: fix cluster join over ssh with newer rsync

Since rsync 3.2.4, the syntax to give multiple files in one parameter
does not work anymore, so instead add both files explicitly.

this fixes the cluster join over ssh on Bookworm based Proxmox VE,
and Bullseye has rsync 3.2.3 so no change required there.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agobuildsys: use correct perl vendorarch path again
Thomas Lamprecht [Wed, 31 May 2023 12:08:43 +0000 (14:08 +0200)]
buildsys: use correct perl vendorarch path again

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoupdate gitignore
Thomas Lamprecht [Wed, 31 May 2023 11:50:26 +0000 (13:50 +0200)]
update gitignore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobuildsys: rework doc-gen cleanup and makefile inclusion
Thomas Lamprecht [Wed, 31 May 2023 11:47:09 +0000 (13:47 +0200)]
buildsys: rework doc-gen cleanup and makefile inclusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agomakefile: convert to use simple parenthesis
Thomas Lamprecht [Wed, 31 May 2023 11:46:56 +0000 (13:46 +0200)]
makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump glib2 dependency to 2.68, required by g_memdup2
Wolfgang Bumiller [Wed, 31 May 2023 11:34:38 +0000 (13:34 +0200)]
bump glib2 dependency to 2.68, required by g_memdup2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 months agobuildsys: move -Wl linker flags from CFLAGS to LDFLAGS
Wolfgang Bumiller [Wed, 31 May 2023 11:17:04 +0000 (13:17 +0200)]
buildsys: move -Wl linker flags from CFLAGS to LDFLAGS

(requires to also be buildable with clang)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agobuildsys: derive upload dist automatically
Thomas Lamprecht [Fri, 19 May 2023 16:30:39 +0000 (18:30 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 8.0.0
Thomas Lamprecht [Fri, 19 May 2023 16:07:47 +0000 (18:07 +0200)]
bump version to 8.0.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agore-organize source hierachy
Thomas Lamprecht [Fri, 19 May 2023 16:04:20 +0000 (18:04 +0200)]
re-organize source hierachy

data/src was a bit odd, and git is good enough to resolve such things
for history (blame) or applying patches, so don't bother enduring
this.

The process was basically:

 git mv data/src/ data/pmxcfs
 git mv data/ src
 git mv cpgtest.c src/test
 git mv src/cts/* src/test/scripts

And a few Makefile fixups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: add sbuild convenience target
Thomas Lamprecht [Fri, 19 May 2023 15:34:39 +0000 (17:34 +0200)]
buildsys: add sbuild convenience target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: drop bogus and unused NOVIEW variable
Thomas Lamprecht [Fri, 19 May 2023 15:34:25 +0000 (17:34 +0200)]
buildsys: drop bogus and unused NOVIEW variable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: drop bogus and unused PERL_APIVER
Thomas Lamprecht [Fri, 19 May 2023 15:34:09 +0000 (17:34 +0200)]
buildsys: drop bogus and unused PERL_APIVER

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agopmxcfs: migrate to g_memdup2
Thomas Lamprecht [Fri, 19 May 2023 15:29:08 +0000 (17:29 +0200)]
pmxcfs: migrate to g_memdup2

As the previously used g_memdup is deprecated since GLib 2.68, due to
being prone to integer overflows when converting the argument from a
gsize to a guint, while that only produces a warning we compile with
Werror, so this FTBFS.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/control: avoid versioned build-dependcies with a -1 Debian revisions
Thomas Lamprecht [Fri, 19 May 2023 15:26:23 +0000 (17:26 +0200)]
d/control: avoid versioned build-dependcies with a -1 Debian revisions

for us not _that_ relevant, but it makes backporting unnecessarily
difficult and is just useless.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: add DSC target
Thomas Lamprecht [Fri, 19 May 2023 15:17:46 +0000 (17:17 +0200)]
buildsys: add DSC target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: refactor generating build directory into own target
Thomas Lamprecht [Fri, 19 May 2023 15:16:55 +0000 (17:16 +0200)]
buildsys: refactor generating build directory into own target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: use full DEB_VERSION
Thomas Lamprecht [Fri, 19 May 2023 15:06:39 +0000 (17:06 +0200)]
buildsys: use full DEB_VERSION

we're in control of this, so don't need to be scared about epoch
bumps or the like

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/control: raise standards version compliance to 4.6.2
Thomas Lamprecht [Fri, 19 May 2023 15:05:55 +0000 (17:05 +0200)]
d/control: raise standards version compliance to 4.6.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agod/control: define compat level via build-depends and raise to 13
Thomas Lamprecht [Fri, 19 May 2023 15:05:51 +0000 (17:05 +0200)]
d/control: define compat level via build-depends and raise to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agouse combined dpkg packaging variable makefile fragment
Thomas Lamprecht [Fri, 19 May 2023 15:05:04 +0000 (17:05 +0200)]
use combined dpkg packaging variable makefile fragment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agomakefile: convert to use simple parenthesis
Thomas Lamprecht [Fri, 19 May 2023 15:04:05 +0000 (17:04 +0200)]
makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agodrop out of date authors file
Thomas Lamprecht [Fri, 19 May 2023 14:56:10 +0000 (16:56 +0200)]
drop out of date authors file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobump version to 7.3-3
Thomas Lamprecht [Mon, 20 Mar 2023 10:17:04 +0000 (11:17 +0100)]
bump version to 7.3-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agocrs: add ha-rebalance-on-start sub-option to datacenter config
Thomas Lamprecht [Mon, 20 Mar 2023 06:39:25 +0000 (07:39 +0100)]
crs: add ha-rebalance-on-start sub-option to datacenter config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agodc config: mark HA CRS scheduler sub-property optional
Thomas Lamprecht [Mon, 20 Mar 2023 06:36:04 +0000 (07:36 +0100)]
dc config: mark HA CRS scheduler sub-property optional

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agofix #4234: vzdump: add cluster-wide configuration
Leo Nunner [Tue, 7 Mar 2023 12:11:03 +0000 (13:11 +0100)]
fix #4234: vzdump: add cluster-wide configuration

Introduce a cluster-wide vzdump.conf file which gets filled with the
default vzdump configuration.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
18 months agopvecm add: require user to navigate out of /etc/pve
Friedrich Weber [Thu, 9 Mar 2023 12:30:19 +0000 (13:30 +0100)]
pvecm add: require user to navigate out of /etc/pve

If `pvecm add` is issued from /etc/pve (or any subdirectory), it
prints some errors:

    [...]
    shell-init: error retrieving current directory: getcwd: cannot
    access parent directories: Transport endpoint is not connected
    [...]
    successfully added node 'pve-c2' to cluster.
    cannot fetch initial working directory: Transport endpoint is not
    connected at /usr/share/perl5/PVE/CLI/pvecm.pm line 446.

The reason is that `pvecm add` restarts pmxcfs, which re-mounts the
fuse mount at /etc/pve, invalidating pvecm's working directory.

The error messages give the impression that something went wrong.
Indeed, the second error indicates the temporary directory is not
cleaned up. The cluster join itself actually works, though.

The issue could be fixed by chdir'ing to / in `pvecm add`. However,
the user's shell would still remain in the now-invalid /etc/pve,
potentially leading to confusing "transport endpoint not connected"
messages in future interactions.

To avoid this, require the user to chdir out of /etc/pve before
running `pvecm add`.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
19 months agofix variable declared in conditional statement
Thomas Lamprecht [Fri, 27 Jan 2023 10:40:22 +0000 (11:40 +0100)]
fix variable declared in conditional statement

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agobump version to 7.3-2
Thomas Lamprecht [Tue, 3 Jan 2023 15:32:18 +0000 (16:32 +0100)]
bump version to 7.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agofix #1295: add config schema to control pending update notifications
Thomas Lamprecht [Tue, 3 Jan 2023 15:08:21 +0000 (16:08 +0100)]
fix #1295: add config schema to control pending update notifications

For now allow a simple selection of `auto` (current behavior),
`always` (if updates are available) or `never`.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agobump version to 7.3-1
Thomas Lamprecht [Mon, 21 Nov 2022 07:34:41 +0000 (08:34 +0100)]
bump version to 7.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agodatacenter config: add 'case-sensitive' option to to 'tag-styles'
Thomas Lamprecht [Mon, 21 Nov 2022 07:32:08 +0000 (08:32 +0100)]
datacenter config: add 'case-sensitive' option to to 'tag-styles'

defaults to off, but admins that want that can turn it on easily

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agodatacenter config: remove typos in "user-tag-access" description
Stefan Sterz [Fri, 18 Nov 2022 15:28:03 +0000 (16:28 +0100)]
datacenter config: remove typos in "user-tag-access" description

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
22 months agobump version to 7.2-3
Thomas Lamprecht [Thu, 17 Nov 2022 12:04:38 +0000 (13:04 +0100)]
bump version to 7.2-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoregister new file firewall/cluster.fw
Stefan Hrdlicka [Mon, 24 Oct 2022 14:33:59 +0000 (16:33 +0200)]
register new file firewall/cluster.fw

added file for cache from bugzilla case #1965

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
22 months agodatacenter config: add cluster resource scheduling (crs) options
Fiona Ebner [Thu, 10 Nov 2022 14:37:48 +0000 (15:37 +0100)]
datacenter config: add cluster resource scheduling (crs) options

Initially, with a setting for HA to switch between basic (just count
services) and static (use static node and resource information).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
22 months agodatacenter config: add 'ordering' property to 'tag-style' option
Dominik Csapak [Wed, 16 Nov 2022 15:47:59 +0000 (16:47 +0100)]
datacenter config: add 'ordering' property to 'tag-style' option

So that the admin can decide if the tags should be sorted in the
front end UI.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agodatacenter config: add options to control tag usage rights
Dominik Csapak [Wed, 16 Nov 2022 15:47:58 +0000 (16:47 +0100)]
datacenter config: add options to control tag usage rights

By adding a 'user-tag-privileges' and 'registered-tags' option.

The former sets the general policy by which "normal" users (with just
'VM.Config.Options' on the respective guest) can set or delete tags
on a guest, and the latter is a list of registered tags only settable
by users with admin-like permission ('Sys.Modify' on '/'); it is
designed to be used as source/target for actions like backup jobs in
the future.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: drop outdated stuff & reword/work commit message]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agodatacenter config: add tag-style property
Dominik Csapak [Wed, 16 Nov 2022 15:47:57 +0000 (16:47 +0100)]
datacenter config: add tag-style property

It's a property string containing 'tree-shape' and 'colors' the
colors are formatted like this:

<tag>:<background-color>[:<text-color>]

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agocluster: add get_guest_config_properties
Dominik Csapak [Wed, 16 Nov 2022 15:47:56 +0000 (16:47 +0100)]
cluster: add get_guest_config_properties

Akin to the singular get_guest_config_property, but with the
possibility to query a list of properties.

Uses the CFS_IPC_GET_GUEST_CONFIG_PROPERTIES introduced in the
previous patch.

Note that the same details apply w.r.t. parsing and permissions as
the singular variant, iow. one needs to take caution and filter
allowed guests views  on call site when using this.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: reword/extend commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agopmxcfs: add IPC call to get multiple guest config properties at once
Dominik Csapak [Wed, 16 Nov 2022 15:47:55 +0000 (16:47 +0100)]
pmxcfs: add IPC call to get multiple guest config properties at once

Previously we used the existing IPC call just for getting the `lock`
property of virtual guests in the cluster resource API call, but for
the tag display we'll to get another one and calling this twice seems
rather non-ideal.

Thus introduce a successor: CFS_IPC_GET_GUEST_CONFIG_PROPERTIES

It allows one to get multiple properties from a single, or all
virtual guest in-memory configs in one go. Keep the existing IPC call
as is for backward compatibility and add this as separate, new one.

The new IPC command basically behaves the same as the previous
CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties
instead and returns multiple properties per guest.

The existing perl wrapper around the IPC call to get a single
property was switched over to use the new IPC call too, so we'll
be able to drop the old IPC command with the next major release if
nothing comes up.

= Benchmark =

== Setup ==

Proxmox VE in a VM with CPU type host (Intel 12700k) and 4 cores
10000 typical configs with both 'lock' and 'tags' set at the end, and
fairly long tags ('test-tag1,test-tag2,test-tag3') (normal VM with a
snapshot, ~ 1 KiB)

== Test ==

Average of 100 runs each with time in milliseconds

== Previous Results ==

num props  total time  time per iteration
1          1054.2      10.2

== Results with this Patch ==

num props  total time  time per iter  function
2          1332.2      13.2           get_properties
1          1051.2      10.2           get_properties
2          2082.2      20.2           get_property, 2 separate calls
1          1034.2      10.2           get_property

So, a call with the new code for one property is the same as with the
old code, and adding a second property only adds a bit of additional
time (in this case ~30%).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: reword & re-structure commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoRevert "add nodes/hardware-map.conf"
Thomas Lamprecht [Wed, 9 Nov 2022 08:42:29 +0000 (09:42 +0100)]
Revert "add nodes/hardware-map.conf"

This reverts commit 7ab9ce86d35a91ca0d8b0d6906db3bc4cb3f3881.