]> git.proxmox.com Git - pve-cluster.git/log
pve-cluster.git
4 years agomake: fix upload target
Fabian Grünbichler [Wed, 3 Jul 2019 06:44:30 +0000 (08:44 +0200)]
make: fix upload target

to correctly reference dbgsym package

4 years agobump version to 6.0-6
Fabian Grünbichler [Tue, 2 Jul 2019 08:37:39 +0000 (10:37 +0200)]
bump version to 6.0-6

4 years agocorosync: refactor and reuse IP RE matching
Fabian Grünbichler [Tue, 2 Jul 2019 08:19:52 +0000 (10:19 +0200)]
corosync: refactor and reuse IP RE matching

this avoids calling getaddrinfo for the usual case of plain IPs, and
makes the code a bit easier to read as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agocorosync: stylistic changes
Fabian Grünbichler [Tue, 2 Jul 2019 08:05:57 +0000 (10:05 +0200)]
corosync: stylistic changes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoAdd functions to resolve hostnames and iterate corosync nodes
Stefan Reiter [Mon, 1 Jul 2019 15:22:14 +0000 (17:22 +0200)]
Add functions to resolve hostnames and iterate corosync nodes

The sub 'for_all_corosync_addresses' iterates through all nodes in a
passed corosync config and calls a specified function for every ringX_addr
on every node it finds (provided the IP-version matches the specified
one or undef was specified).

All ringX_addr entries that cannot be parsed as an IP address will be
best-effort resolved as hostnames. This has to happen in the exact same
way as corosync does internally, to ensure consistency with firewall
rules.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoadd qdevice status api call
Oguz Bektas [Mon, 1 Jul 2019 16:31:01 +0000 (18:31 +0200)]
add qdevice status api call

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agobump version to 6.0-3
Thomas Lamprecht [Thu, 27 Jun 2019 09:17:20 +0000 (11:17 +0200)]
bump version to 6.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoRevert "pvecm: remove mtunnel"
Thomas Lamprecht [Thu, 27 Jun 2019 09:15:56 +0000 (11:15 +0200)]
Revert "pvecm: remove mtunnel"

This reverts commit 7a415f9657e68114c29b0bd1cad52283c203950a.
For now we have to many bad users of that, they all never should have
used this in the first place, but it slipped in so here we are..

4 years agobump version to 6.0-2
Thomas Lamprecht [Tue, 25 Jun 2019 10:30:27 +0000 (12:30 +0200)]
bump version to 6.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi: join info: we still get ring0_addr in nodelist
Thomas Lamprecht [Tue, 25 Jun 2019 10:28:49 +0000 (12:28 +0200)]
api: join info: we still get ring0_addr in nodelist

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmxcfs: workaround dumb g_string_free behaviour
Thomas Lamprecht [Mon, 24 Jun 2019 10:44:51 +0000 (12:44 +0200)]
pmxcfs: workaround dumb g_string_free behaviour

While GLib mentions that this method is nullable[0][1] (i.e., can be passed
and can return null) its use of the, a bit misleading,
g_return_val_if_fail[2] voids that, as passing NULL emits an
warning[2] which looks pretty grave (assertion failure), albeit is
just noise..

[0]: https://developer.gnome.org/glib/stable/glib-Strings.html#g-string-free
[1]: https://salsa.debian.org/gnome-team/glib/blob/debian/2.58.3-2/glib/gstring.c#L196
[2]: https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmxcfs: get guest cfg properties: use g_string_sized_new
Thomas Lamprecht [Mon, 24 Jun 2019 10:42:20 +0000 (12:42 +0200)]
pmxcfs: get guest cfg properties: use g_string_sized_new

While with NULL as first argument g_string_new_len effectively
becomes a g_string_sized_new it can be confusing as the docs do not
mention that. Also this may lead to an error if one changes the call
with out to much research, so fix it to the one function we should
used to begin with here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd 'sdn.cfg' && 'sdn.cfg.new' to observed files
Alexandre Derumier [Wed, 19 Jun 2019 16:01:23 +0000 (18:01 +0200)]
add 'sdn.cfg' && 'sdn.cfg.new' to observed files

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agobump version to 6.0-1
Thomas Lamprecht [Fri, 14 Jun 2019 18:13:05 +0000 (20:13 +0200)]
bump version to 6.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoremove now unused old corosync ringX_addr formats
Thomas Lamprecht [Tue, 28 May 2019 16:14:47 +0000 (18:14 +0200)]
remove now unused old corosync ringX_addr formats

no users of this anymore, so drop it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agonode join: use new corosync link parameters
Thomas Lamprecht [Tue, 28 May 2019 16:14:18 +0000 (18:14 +0200)]
node join: use new corosync link parameters

Similar to the change to cluster creation use now also the
corosync-link definition for the rest of the cluster join/add calls.

As link0, former ring0, is not special anymore allow that it's not
passed and only default back to nodename if it's configured in the
totem section of the configuration.

As the 'join' and 'addnode' api paths are quite connected, do all in
one patch.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocorosync: allow to set link priorities
Thomas Lamprecht [Tue, 28 May 2019 16:13:22 +0000 (18:13 +0200)]
corosync: allow to set link priorities

For now in passive mode, a link with a higher value has a lower
priority. If the current active link fails the one with the next
higher priority will take over. Use 255 as maximum, as internally
kronosnet uses an uin8_t variable for this, and while there can be
"only" 8 links currently it may be still nice to use different values
that ]0..1[ for them, e.g., when re-shuffling link priorities it's
useful to have space between them.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocluster create: use new corosync-link format for totem interfaces
Thomas Lamprecht [Tue, 28 May 2019 16:07:05 +0000 (18:07 +0200)]
cluster create: use new corosync-link format for totem interfaces

Preparation for enhanced compatibility with new corosync 3/knet
transport. Pretty straight forward switch from ringX_addr to links,
*but*, for configuration backward compatibility corosync still uses
"ringX_addr" as "link address", this will surely add confusion...

We drop all the "all IP versions must match" checking code, as
1. it could not cope with unresolved hostname's anyway
2. links can be on different IP versions with kronosnet

This makes it a bit easier and shorter, we can re-add some (saner)
checking always later on, if people misconfigure this often..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd new corosync-link format
Thomas Lamprecht [Tue, 28 May 2019 16:04:04 +0000 (18:04 +0200)]
add new corosync-link format

use a format string this time, so we can drop the parameter count a
bit. With address as default_key we can still use it conveniently
from CLI.

There will be the link priority flag added in a future patch.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocorosync config: support 'linknumber' property
Thomas Lamprecht [Mon, 27 May 2019 16:08:47 +0000 (18:08 +0200)]
corosync config: support 'linknumber' property

Corosync has moved its rings a layer up, i.e., abstracted away from
the network layer below. That what early were called rings are now
links, knet can have up to 8 all others 1, for now.

Let our parser understand this change in the totem section of the
config, but keep backwards compatibility and accept 'ringnumber'
also.

While we are at it, try to write out the two map operations used in a
bit more readable way.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmxcfs: get config property: escape double quote and backslash
Thomas Lamprecht [Thu, 13 Jun 2019 07:01:59 +0000 (09:01 +0200)]
pmxcfs: get config property: escape double quote and backslash

This are the most relevant from as the bite JSON really and can in
theory be in our configuration property values.

While technically a literal \t, \b, \f, \r (but not \n) can be an
issue too, this values normally really do not get written into the
config by our stack, if it has been manually added, but that's off
limits. If we really need it we can add it always in the future

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd get_guest_config_property IPCC method
Thomas Lamprecht [Thu, 13 Jun 2019 07:01:58 +0000 (09:01 +0200)]
add get_guest_config_property IPCC method

This adds a new method to our IPCC interface.
It's a helper to get a property of a single or all guests.

It is restricted to only look at the current config state only, i.e.,
no PENDING changes and no snapshots, this is by design and wanted.
It uses the strict config format to be quick and return/continue
early, those restrictions are imposed by
PVE::QemuServer::parse_vm_config, and the container counterpart, it
mostly boils down to the following regex:
/^([a-z][a-z_]*\d*):\s*(.+?)\s*$/
and the fact that this is applied directly on the config lines (no
whitespace trimming, in any way, happens before)

Motivation for this work is to get the lock state of all guests
_quick_, allowing us to pass this info in our resource call, and
enhance the tree view of our Web User Interface with that
information. It was kept a bit more general, without bending the code
to much. The call returns a serialized JSON object with the format:
VMID => { PROPERTY => PROPERTY_VALUE }
if the property was found in VMID configuration, a empty object will
be returned if it was not found.

If one passes 0 to the request all VM configurations will be
searched, only those with a match will be returned, in the same
manner as above.

So why a IPCC call and not perl handling of this? Well performance.
Dominik's proposed a perl + cfs_read_file approach[0], while this is
relatively short and in the (mostly) safer perl land it's pretty
slow, especially on first connections. The idea for this existed
since quite a bit in my head, but Dominik's patch put it in front and
a prototype of this was born soon after that, initial evaluation and
performance comparison showed a speedup of >100 times at the initial
gathering, as [0] really benefits from the ccache afterwards, and
that _is_ a cache which gets often used and hit more "serial runs"
(i.e., in same worker) make his approach more reasonable, though.
But after a bit of work this came in not to ugly shape, and here the
numbers, with 10005 VM configs, all "real" ones with about 502 bytes
space usage, and all with a lock in the worst place, at the end.

Legend:
C0 : how many "serial runs" took place, i.e., how many runs in the
     same worker
C1: IPCC (this) approach total runtime in ms
C2: IPCC (this) approach per-run runtime in ms, i.e., C1 / C0
C3: Perl + cfs_read_file ([0]) approach total runtime
C4: Perl + cfs_read_file ([0]) approach per-run runtime, i.e., C3 / C0

Data:
C0   C1    C2     C3     C4
1 18.31 18.31 3570.29 3570.29
2 31.51 15.76 3717.69 1858.84
3 44.19 14.73 3821.84 1273.95
4 58.54 14.63 3950.24 987.56
5 70.31 14.06 4071.42 814.28
6 95.29 15.88 4175.95 695.99
7 95.87 13.70 4192.35 598.91
8 111.81 13.98 4346.84 543.36
9 120.84 13.43 4432.13 492.46
10 134.52 13.45 4554.25 455.42
11 149.74 13.61 4673.71 424.88
12 161.13 13.43 4797.56 399.80
13 172.74 13.29 4892.15 376.32
14 180.63 12.90 4951.17 353.66
15 199.04 13.27 5034.51 335.63

So, initially C beats Perl (not really correct wording, but hey) by
>200 times. But, on the second run we immediately see that while IPCC
scales almost linear the perl one doesn't, it really benefits from
the cache now, while initial call needed 3.5s this "only" needs ~200
ms more. But 200ms is still quite a bit of addition to an API call,
10k VMs are not seen to often in the wild, I guess, albeit it's
easily possible with setups using a lot of containers, here we know
about users having ~1500 CTs on only two nodes, so not completely
unrealistic either.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-February/035830.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmxcfs: vminfo_type_to_string: fixup indendation and parenthesis
Thomas Lamprecht [Wed, 12 Jun 2019 15:02:37 +0000 (17:02 +0200)]
pmxcfs: vminfo_type_to_string: fixup indendation and parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmxcfs: status: refactor out vminfo_type_to_string
Thomas Lamprecht [Wed, 8 May 2019 19:33:13 +0000 (19:33 +0000)]
pmxcfs: status: refactor out vminfo_type_to_string

will be re-used in a future patch and improves readabillity a little
bit, IMO

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopvecm: remove mtunnel
Thomas Lamprecht [Tue, 4 Jun 2019 14:49:03 +0000 (16:49 +0200)]
pvecm: remove mtunnel

it was a mistake to move it here in the first place, and now we can
finally drop it again, as no PVE version can exist in 6.0, or latest
5.4 which still tries to use this one.
The one we will keep using is the one in qm from qemu-server, as
there we have full access to all it's perl modules without adding
cyclic dependencies.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocorosync: config: write: die if we get a undefined value
Thomas Lamprecht [Tue, 28 May 2019 16:02:15 +0000 (18:02 +0200)]
corosync: config: write: die if we get a undefined value

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoget_node_kv: unpack result from pmxcfs
Dominik Csapak [Mon, 27 May 2019 07:21:39 +0000 (09:21 +0200)]
get_node_kv: unpack result from pmxcfs

in 'broadcast_node_kv' we send the status and make sure its always
a scalar so it gets send as a null terminated string via pack(Z*)
when we get it back from pmxcfs we have to unpack(Z*) again, or
we get a string with a trailing '\0'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobuildsys: perlapi-X.Y gets set automatically by dh, so drop manual replace
Thomas Lamprecht [Sat, 25 May 2019 17:12:32 +0000 (19:12 +0200)]
buildsys: perlapi-X.Y gets set automatically by dh, so drop manual replace

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofollouwp: fix and add comments + minor code cleanup
Thomas Lamprecht [Sat, 25 May 2019 15:21:20 +0000 (17:21 +0200)]
follouwp: fix and add comments + minor code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd generic data broadcast interface
Dominik Csapak [Thu, 16 May 2019 15:12:31 +0000 (17:12 +0200)]
add generic data broadcast interface

similar to how we handle the cluster wide tasklist and rrd data,
have an interface that can sync data across the cluster

this data is only transient and will not be written to disk

we can use this for a number of things, e.g. listing ceph services
across the cluster, etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agopmxcfs: make status entry removable
Dominik Csapak [Thu, 16 May 2019 15:12:30 +0000 (17:12 +0200)]
pmxcfs: make status entry removable

we can now do a CFS_IPC_SET_STATUS with no data, which results in
removal of the entry in the kv entries

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agod/control: remove obsolete dependencies
Thomas Lamprecht [Wed, 22 May 2019 10:25:05 +0000 (12:25 +0200)]
d/control: remove obsolete dependencies

the xml one should have been already removed by commit
77a620a8f9aa749580679dd687d233c52526b1f6 which removed it from the
build dependencies only..

rsyslog and lsb-base have no direct use here anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: remove unnecessary build depends
Thomas Lamprecht [Wed, 22 May 2019 10:24:23 +0000 (12:24 +0200)]
d/control: remove unnecessary build depends

compat level 10 implies those, and autotools is not needed anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoremove workarounds for avoiding HA fencing on upgrade
Thomas Lamprecht [Tue, 21 May 2019 20:18:26 +0000 (22:18 +0200)]
remove workarounds for avoiding HA fencing on upgrade

those got introduced by commit
ec826d72c06e6f649b2b19c3341c39abb29b19f9 and can now be safely
removed, as current pve-cluster and pve-ha-manager do show this
problems, and upgrades need to go through latest PVE 5.X which then
ensures this is fixed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoremove maintscript for pve-cluster default conf
Thomas Lamprecht [Tue, 21 May 2019 20:15:39 +0000 (22:15 +0200)]
remove maintscript for pve-cluster default conf

upgraders are required to go through latest PVE 5.X which includes
executing this step, so we can remove it now here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: update standards version
Thomas Lamprecht [Tue, 21 May 2019 15:58:19 +0000 (17:58 +0200)]
d/control: update standards version

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump debian compat level to 10
Thomas Lamprecht [Tue, 21 May 2019 15:57:08 +0000 (17:57 +0200)]
bump debian compat level to 10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: switch upload dist over to buster
Thomas Lamprecht [Tue, 21 May 2019 16:12:48 +0000 (18:12 +0200)]
buildsys: switch upload dist over to buster

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.0-0+1
Thomas Lamprecht [Tue, 21 May 2019 16:11:28 +0000 (18:11 +0200)]
bump version to 6.0-0+1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: use dpkg-dev Makefile helpers for pkg info
Thomas Lamprecht [Tue, 21 May 2019 16:07:41 +0000 (18:07 +0200)]
buildsys: use dpkg-dev Makefile helpers for pkg info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: reuse PERL_DOC_INC from pve-doc-generator
Thomas Lamprecht [Tue, 21 May 2019 15:54:06 +0000 (17:54 +0200)]
buildsys: reuse PERL_DOC_INC from pve-doc-generator

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 5.0-37
Thomas Lamprecht [Tue, 30 Apr 2019 13:59:10 +0000 (13:59 +0000)]
bump version to 5.0-37

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoupdate corosync build-dependency
Fabian Grünbichler [Fri, 19 Apr 2019 08:33:34 +0000 (10:33 +0200)]
update corosync build-dependency

transitional corosync-dev is dropped with Debian Buster / PVE 6

5 years agofix #1777: join: assert that local nodename bound IP is configured
Thomas Lamprecht [Mon, 15 Apr 2019 12:40:26 +0000 (12:40 +0000)]
fix #1777: join: assert that local nodename bound IP is configured

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoassert_joinable: report what param caused the error
Thomas Lamprecht [Mon, 15 Apr 2019 12:39:25 +0000 (12:39 +0000)]
assert_joinable: report what param caused the error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agopmxcfs: allow read access for www-data to /run dir
Thomas Lamprecht [Thu, 11 Apr 2019 05:46:09 +0000 (07:46 +0200)]
pmxcfs: allow read access for www-data to /run dir

There's no real sensible information here, and we naturally only
allow read, but no write/exec.

This makes our IPCC restart connection re-cachin heuristic also work
for processes run as www-data, e.g., pveproxy, and thus guarantee a
more seamless pmxcfs restart - e.g., for package updates.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoipcc: increase restart grace period
Thomas Lamprecht [Thu, 11 Apr 2019 05:42:21 +0000 (07:42 +0200)]
ipcc: increase restart grace period

with bad timing and general restart overhead 5 secs were sometimes a
too small timeout, even if it happened really seldom. Increase it a
bit, as it's desired to have the connection stay a live in a lot of
cases, e.g., to not get logged out on pve-cluster update as
pveproxy's verify_ticked couldn't do IPCC.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-36
Thomas Lamprecht [Wed, 10 Apr 2019 13:47:06 +0000 (15:47 +0200)]
bump version to 5.0-36

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocleanup and sort use module section
Thomas Lamprecht [Wed, 10 Apr 2019 13:45:42 +0000 (15:45 +0200)]
cleanup and sort use module section

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agodatacenter: only print properties to string if not already
Thomas Lamprecht [Wed, 10 Apr 2019 13:45:21 +0000 (15:45 +0200)]
datacenter: only print properties to string if not already

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-35
Thomas Lamprecht [Wed, 3 Apr 2019 11:38:15 +0000 (13:38 +0200)]
bump version to 5.0-35

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoactually add priv/tfa.cfg to observed files
Thomas Lamprecht [Wed, 3 Apr 2019 11:35:07 +0000 (13:35 +0200)]
actually add priv/tfa.cfg to observed files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoregister priv/tfa.cfg as observed file
Wolfgang Bumiller [Tue, 2 Apr 2019 10:21:59 +0000 (12:21 +0200)]
register priv/tfa.cfg as observed file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd u2f configuration to datacenter.cfg
Wolfgang Bumiller [Tue, 2 Apr 2019 10:21:58 +0000 (12:21 +0200)]
add u2f configuration to datacenter.cfg

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix 'PIDFile= references path below legacy directory /var/run/' warning
Thomas Lamprecht [Tue, 26 Mar 2019 13:50:14 +0000 (14:50 +0100)]
fix 'PIDFile= references path below legacy directory /var/run/' warning

/var/run is a symlink to /run on stretch and buster, and the systemd
version of buster will annoy one with warnings if /var/run/xyz.pid is
used..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agorestart pve-cluster.service on failure
Thomas Lamprecht [Thu, 14 Mar 2019 13:50:26 +0000 (14:50 +0100)]
restart pve-cluster.service on failure

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-34
Thomas Lamprecht [Thu, 14 Mar 2019 08:39:00 +0000 (09:39 +0100)]
bump version to 5.0-34

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocluster: use lock for legacy authkey generation
Fabian Grünbichler [Wed, 13 Mar 2019 14:01:33 +0000 (15:01 +0100)]
cluster: use lock for legacy authkey generation

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agocluster: add cfs_lock_authkey
Fabian Grünbichler [Wed, 13 Mar 2019 14:01:32 +0000 (15:01 +0100)]
cluster: add cfs_lock_authkey

used for authkey rotation in pve-access-control

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agomac_prefix: do not allow multicast prefixes
Stoiko Ivanov [Tue, 12 Mar 2019 15:07:40 +0000 (16:07 +0100)]
mac_prefix: do not allow multicast prefixes

MAC-addresses having the LSB of the first octet set, are considered
multicast-addresses (see [0,1]). LXC (the kernel) does not allow
such a mac-address to be set for a device, thus preventing containers from
starting if a multicast prefix is set (reported in [2] by Alexandre)

This patch introduces 'mac-prefix' (permitting only unicast prefixes) via
register_format and uses it instead of the pattern.

[0] https://lists.linuxcontainers.org/pipermail/lxc-users/2010-August/000783.html
[1] https://en.wikipedia.org/wiki/MAC_address
[2] https://pve.proxmox.com/pipermail/pve-devel/2019-March/035996.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agoallow to setup and remove qdevice for cluster
Oguz Bektas [Tue, 5 Mar 2019 12:42:07 +0000 (13:42 +0100)]
allow to setup and remove qdevice for cluster

makes it possible to setup and remove qdevice through pvecm

requirements:
    * all hosts need corosync-qdevice installed
    * host serving as qdevice needs corosync-qnetd installed
    * root ssh access from pve host to qdevice host

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
5 years agod/control: bump version dependency to pve-doc-generator
Thomas Lamprecht [Fri, 22 Feb 2019 12:31:32 +0000 (13:31 +0100)]
d/control: bump version dependency to pve-doc-generator

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years ago1891 Add zsh command completion for pvecm
Christian Ebner [Thu, 21 Feb 2019 13:25:01 +0000 (14:25 +0100)]
1891 Add zsh command completion for pvecm

This adds the generation of the zsh command completion scripts for
pvecm.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
5 years agoget_nodelist: remove unused variable
Thomas Lamprecht [Fri, 25 Jan 2019 16:47:28 +0000 (17:47 +0100)]
get_nodelist: remove unused variable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agopve-cluster: dont pretend to be a time-sync provider
Fabian Grünbichler [Tue, 15 Jan 2019 07:46:30 +0000 (08:46 +0100)]
pve-cluster: dont pretend to be a time-sync provider

time-sync.target is a special passive unit, consumers (i.e., units that
intend to say "I want to start after synchronized time has been
established") should only order themselves after it. only providers
(i.e., units that intend to say "I am responsible for synchronizing the
clock") should pull it in via a dependency.

this and 2c7182b76f59b32efaba3135c095b9c722957af1 together also fix #998

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agofix #2049: avoid conflict with chrony service
Oguz Bektas [Mon, 14 Jan 2019 10:34:37 +0000 (11:34 +0100)]
fix #2049: avoid conflict with chrony service

Do not depend on a specific time synchronizing daemon but allow any
by depend on the general time-sync.target

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-33
Thomas Lamprecht [Mon, 7 Jan 2019 11:51:20 +0000 (12:51 +0100)]
bump version to 5.0-33

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agodatacenter.cfg: add ha setting with shutdown_policy as format string property
Thomas Lamprecht [Thu, 20 Dec 2018 07:44:40 +0000 (08:44 +0100)]
datacenter.cfg: add ha setting with shutdown_policy as format string property

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-32
Thomas Lamprecht [Thu, 20 Dec 2018 09:46:54 +0000 (10:46 +0100)]
bump version to 5.0-32

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocomment the observed file hash
Thomas Lamprecht [Thu, 20 Dec 2018 07:50:57 +0000 (08:50 +0100)]
comment the observed file hash

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agopmxcfs: add ceph.conf to observed files
Dominik Csapak [Wed, 19 Dec 2018 10:24:37 +0000 (11:24 +0100)]
pmxcfs: add ceph.conf to observed files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobuildsys: ensure correct PERL include is set for generating the docs
Thomas Lamprecht [Wed, 19 Dec 2018 09:31:14 +0000 (10:31 +0100)]
buildsys: ensure correct PERL include is set for generating the docs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: error out if a sub target fails
Thomas Lamprecht [Wed, 19 Dec 2018 09:29:16 +0000 (10:29 +0100)]
buildsys: error out if a sub target fails

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agorefactor run_silent_cmd
Thomas Lamprecht [Fri, 14 Dec 2018 10:07:42 +0000 (11:07 +0100)]
refactor run_silent_cmd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoindentation cleanup
Thomas Lamprecht [Fri, 14 Dec 2018 10:06:50 +0000 (11:06 +0100)]
indentation cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-31
Thomas Lamprecht [Thu, 29 Nov 2018 12:08:27 +0000 (13:08 +0100)]
bump version to 5.0-31

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd 'for internal use' to description of addnode
David Limbeck [Wed, 3 Oct 2018 09:53:36 +0000 (11:53 +0200)]
add 'for internal use' to description of addnode

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agobuildsys: add build PVE folder to LD_LIBRARY_PATH and PERLLIB
Thomas Lamprecht [Fri, 7 Sep 2018 11:50:47 +0000 (13:50 +0200)]
buildsys: add build PVE folder to LD_LIBRARY_PATH and PERLLIB

ensures that the PVE modules and libraries currently build get used,
not the installed ones.

Besides correctness from a Packaging POV this also makes bootstrapping
easier.

Reported-by: Rhonda D'Vine <rhonda@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoWpedantic: mark flexible arrays with [] not [0]
Thomas Lamprecht [Fri, 7 Sep 2018 11:50:46 +0000 (13:50 +0200)]
Wpedantic: mark flexible arrays with [] not [0]

https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Zero-Length.html
(same as in GCC 4.7.4 docs)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoWpedantic: add casts to void* for pointer printing
Thomas Lamprecht [Fri, 7 Sep 2018 11:50:45 +0000 (13:50 +0200)]
Wpedantic: add casts to void* for pointer printing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoWpedantic: remove extra semicolons after function bodies
Thomas Lamprecht [Fri, 7 Sep 2018 11:50:44 +0000 (13:50 +0200)]
Wpedantic: remove extra semicolons after function bodies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: IPCConst.pm is needed by 'check' target
Thomas Lamprecht [Thu, 6 Sep 2018 12:29:01 +0000 (14:29 +0200)]
buildsys: IPCConst.pm is needed by 'check' target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix some format security issues
Thomas Lamprecht [Tue, 28 Aug 2018 13:12:36 +0000 (15:12 +0200)]
fix some format security issues

fix places reported by '-Werror=format-security' in preperance to
make this package debhelper level 9 compatible.

Rename the touched 'str' variable to an actual name in this process

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-30
Thomas Lamprecht [Thu, 23 Aug 2018 12:00:51 +0000 (14:00 +0200)]
bump version to 5.0-30

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd missing languages to datacenter_schema
Dominik Csapak [Fri, 17 Aug 2018 09:20:24 +0000 (11:20 +0200)]
add missing languages to datacenter_schema

copied from proxmox-widget-toolkit Utils.js
since i see no good way to only have this in one place

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoFix #1849: typos: aquire -> acquire
Wolfgang Bumiller [Tue, 31 Jul 2018 09:40:42 +0000 (11:40 +0200)]
Fix #1849: typos: aquire -> acquire

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoFix #1848: typo in PVE::Cluster::join()
Wolfgang Bumiller [Tue, 31 Jul 2018 09:19:33 +0000 (11:19 +0200)]
Fix #1848: typo in PVE::Cluster::join()

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoapi/join: avoid using an IPv6 address as worker task ID
Thomas Lamprecht [Mon, 30 Jul 2018 12:31:00 +0000 (14:31 +0200)]
api/join: avoid using an IPv6 address as worker task ID

We used the hostname of the node over which we joined a cluster as
worker ID, which is then encoded in it's task UPID - a unique ID with
encoded information, separated by colons.
While this is no problem for normal hostnames, or IPv4 addresses, the
hostname can also be an IPv6 address - which is also separated by
colons. This throws of the upid_decode method.

While the, from a user POV, best solution would probably be to
connect and query the cluster name from the join peer it is much
simpler to just omit the ID to avoid such problems.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agogitignore: do not track *.buildinfo files
Thomas Lamprecht [Thu, 26 Jul 2018 07:33:06 +0000 (09:33 +0200)]
gitignore: do not track *.buildinfo files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: also cleanup dependency tracking files
Thomas Lamprecht [Thu, 26 Jul 2018 07:27:35 +0000 (09:27 +0200)]
buildsys: also cleanup dependency tracking files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: add dependency tracking
Wolfgang Bumiller [Tue, 24 Jul 2018 10:23:11 +0000 (12:23 +0200)]
buildsys: add dependency tracking

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobuildsys: fixup data/Makefile
Wolfgang Bumiller [Tue, 24 Jul 2018 10:17:34 +0000 (12:17 +0200)]
buildsys: fixup data/Makefile

Actually fill the 'all' target so we don't compile at
install time...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobuildsys: replace autotools with plain makefiles
Thomas Lamprecht [Wed, 4 Jul 2018 08:52:48 +0000 (10:52 +0200)]
buildsys: replace autotools with plain makefiles

pve-cluster is not a big project with to much dependencies, so
autotools was a bit of an overkill for it.
Omit it, plus a ./configure step in general and just use a plain
Makefile - in combination with pkg-config - like we do in our other
projects.

Build time gets reduced quite a bit - albeit the were never that big
anyway...:

(old autotools) time make deb
make deb  12.96s user 1.78s system 94% cpu 15.543 total

(new plain makefile) time make deb
make deb  9.40s user 1.14s system 100% cpu 10.465 total

A third less time needed here, and with compiling in parallel I can
shave off even 1.5 seconds more, so almost  half of the original
time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-29
Thomas Lamprecht [Tue, 24 Jul 2018 09:19:58 +0000 (11:19 +0200)]
bump version to 5.0-29

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofixup coding style
Thomas Lamprecht [Tue, 24 Jul 2018 09:00:11 +0000 (11:00 +0200)]
fixup coding style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1843: always free certificate file after reading it
Stoiko Ivanov [Tue, 24 Jul 2018 08:42:40 +0000 (10:42 +0200)]
fix #1843: always free certificate file after reading it

Reading https://$host:8006/nodes repeadedly leads to pveproxy keeping
a filedescriptor open for each node-certificate in the cluster and
eventually reaching its NOFile limit..

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agobump version to 5.0-28
Thomas Lamprecht [Tue, 3 Jul 2018 12:16:42 +0000 (14:16 +0200)]
bump version to 5.0-28

5 years agopvecm updatecerts: followup: do work in fork
Thomas Lamprecht [Tue, 3 Jul 2018 12:10:41 +0000 (14:10 +0200)]
pvecm updatecerts: followup: do work in fork

to workaround the case that we may possible get into the
uninterruptedly D state.
While this may still happen, it happens to a fork and we can return
an error to our caller.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agopvecm updatecerts: time out after 30 seconds
Thomas Lamprecht [Mon, 2 Jul 2018 14:29:40 +0000 (16:29 +0200)]
pvecm updatecerts: time out after 30 seconds

We call this in pve-cluster.service as ExecStartPost. We prefix it
with '-' to tell systemd that it should ignore non-zero exit codes,
but if the command hangs (e.g., on IO) systemd kills it after a
timeout (90 seconds default) which then doesn't get ignored and the
unit will also be put in failure state and stopped.
We specifically do not want this to happen, so wrap the updatecerts
call in run_with_timeout and give it a maximum of 30 seconds to
finish.

Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: fixup IPCConst.pm dependencies
Wolfgang Bumiller [Wed, 23 May 2018 09:51:59 +0000 (11:51 +0200)]
buildsys: fixup IPCConst.pm dependencies

IPCConst.pm depends on cfs-ipc-ops.h. Additionally, since
the header is the "input" and IPCConst.pm.awk is the
generator, use the header as the main direct dependency and
add the generator as a secondary dependency afterwards
(thus we have to swap the awk parameters).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>