5
0
mirror of git://git.proxmox.com/git/pve-cluster.git synced 2025-03-11 16:58:28 +03:00

794 Commits

Author SHA1 Message Date
Lukas Wagner
317a212f69 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>
2023-07-25 09:21:30 +02:00
Wolfgang Bumiller
26064fcae9 bump version to 8.0.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 15:10:18 +02:00
Wolfgang Bumiller
34aa4d7dd6 d/control: extended description for libpve-notify-perl
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 15:10:18 +02:00
Wolfgang Bumiller
0b65d8de38 d/control: libpve-notify-perl depneds on libproxmox-rs-perl 0.3.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 14:38:06 +02:00
Wolfgang Bumiller
edd02d18a2 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>
2023-07-24 14:38:06 +02:00
Lukas Wagner
c1b3b947f9 notify: use renamed Proxmox::RS::Notify
Suggested-by: Wolfgang Bugmiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 14:38:06 +02:00
Lukas Wagner
d1606d46db 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>
2023-07-24 12:02:27 +02:00
Lukas Wagner
d91e09cf84 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>
2023-07-24 12:02:24 +02:00
Lukas Wagner
41ceede7a2 cluster files: add notifications.cfg
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 12:02:22 +02:00
Thomas Lamprecht
a56696c2a0 bump version to 8.0.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 19:29:38 +02:00
Thomas Lamprecht
b7f059ff36 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>
2023-07-01 19:29:38 +02:00
Thomas Lamprecht
66b0e690fe 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>
2023-07-01 19:29:38 +02:00
Thomas Lamprecht
a56d0aa8f1 pvecm: updatecerts: reword comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 19:29:38 +02:00
Thomas Lamprecht
f34d461403 pvecm: updatecerts: only report quorum-wait progress if not silent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 19:29:38 +02:00
Thomas Lamprecht
1d42870684 pvecm: updatecerts: improve variable naming
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 18:04:41 +02:00
Fiona Ebner
97dc596c68 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>
2023-07-01 18:04:41 +02:00
Fiona Ebner
9a37534884 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>
2023-07-01 16:35:24 +02:00
Fiona Ebner
98cfaf4408 fix typo
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 16:35:24 +02:00
Thomas Lamprecht
6ae4359973 pvecm: style cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 16:35:24 +02:00
Thomas Lamprecht
1ed0106946 pmxcfs: drop unused variable from full_write
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 16:35:24 +02:00
Thomas Lamprecht
175ad01c61 pmxcfs: log resolved IP and improve log on failure to resolve
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-01 16:35:24 +02:00
Thomas Lamprecht
c78963b1c6 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>
2023-07-01 16:35:24 +02:00
Fiona Ebner
0ddbd320f4 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>
2023-06-28 15:41:26 +02:00
Fiona Ebner
731f4e153f 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>
2023-06-16 14:46:51 +02:00
Thomas Lamprecht
e658e95ea4 buildsys: improve DSC target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 12:06:49 +02:00
Thomas Lamprecht
5ad37004c8 bump version to 8.0.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 12:05:05 +02:00
Dominik Csapak
815e6ac1d8 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>
2023-06-05 11:09:19 +02:00
Dominik Csapak
9697997575 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>
2023-06-04 18:56:14 +02:00
Thomas Lamprecht
b0913cb018 buildsys: use correct perl vendorarch path again
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 14:08:43 +02:00
Thomas Lamprecht
2f5f09cbd1 update gitignore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 13:50:26 +02:00
Thomas Lamprecht
864b236692 buildsys: rework doc-gen cleanup and makefile inclusion
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 13:47:09 +02:00
Thomas Lamprecht
05a31bffc9 makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 13:46:56 +02:00
Wolfgang Bumiller
16f7fe8522 bump glib2 dependency to 2.68, required by g_memdup2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-31 13:36:20 +02:00
Wolfgang Bumiller
52c5bfd0f3 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>
2023-05-31 13:19:11 +02:00
Thomas Lamprecht
7be769af36 buildsys: derive upload dist automatically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 18:30:39 +02:00
Thomas Lamprecht
b3b916da28 bump version to 8.0.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 18:07:47 +02:00
Thomas Lamprecht
e5f0776517 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>
2023-05-19 18:04:56 +02:00
Thomas Lamprecht
3ce80eea9c buildsys: add sbuild convenience target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:34:39 +02:00
Thomas Lamprecht
abb84466a7 buildsys: drop bogus and unused NOVIEW variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:34:25 +02:00
Thomas Lamprecht
e8871db77e buildsys: drop bogus and unused PERL_APIVER
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:34:09 +02:00
Thomas Lamprecht
2c372aee2a 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>
2023-05-19 17:32:16 +02:00
Thomas Lamprecht
a01bc7b71b 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>
2023-05-19 17:26:31 +02:00
Thomas Lamprecht
69b707fb06 buildsys: add DSC target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:17:46 +02:00
Thomas Lamprecht
1bc8dbc1fd buildsys: refactor generating build directory into own target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:16:55 +02:00
Thomas Lamprecht
1286f6c63f 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>
2023-05-19 17:07:01 +02:00
Thomas Lamprecht
bdd401a1e2 d/control: raise standards version compliance to 4.6.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:05:55 +02:00
Thomas Lamprecht
3dc50e7d4b d/control: define compat level via build-depends and raise to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:05:51 +02:00
Thomas Lamprecht
3b61597641 use combined dpkg packaging variable makefile fragment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:05:04 +02:00
Thomas Lamprecht
49179c316f makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 17:04:05 +02:00
Thomas Lamprecht
5f86768caa drop out of date authors file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:56:10 +02:00