Commit graph

883 commits

Author SHA1 Message Date
Dominic Jäger
2ae1c0bb12 dc.cfg: Add notes to datacenter config
Similar to notes for nodes.
datacenter.cfg normally uses key-value pairs defined in the schema.
We bypass this to allow potentially long comments at the top.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 09:38:05 +02:00
Thomas Lamprecht
a9592e4156 d/control: better handle fuse3 transition
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 08:22:35 +02:00
Thomas Lamprecht
6453548eee bump version to 7.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 12:42:57 +02:00
Thomas Lamprecht
a8df0863b5 pmxcfs: bump basic FS limits, 1 MiB per-file, 128 MiB total
We have some users running into issues in some cases, like syncing
huge user base through LDAP into users.cfg or having a few thousands+
of HA services, as then the per-file limit is exhausted.

Bumping that one provides only half of the solution as the total
limit of 30 MiB would only allow a few files getting that big, or
reduce the amount left over for actual guest configurations quite a
bit.

So also bump the total filesystem limit from 30 MiB to 128 MiB, so by
a factor of ~4 and in the same spirit bump the maximal numbers of
inodes (i.e., different files) from 10k to 256k, which pmxcfs can
handle still rather easily (tested with touch) and would allow to max
out the full FS limit with 512 byte files, which fits small guest
configs, so sounds like an OK proportioned limit.

That should give use quite some wiggle room again, and should be
relatively safe as most of our access is rather small and on a few
files only, only root has full access anyway and that user can break
everything already, so not much lost here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 12:40:22 +02:00
Aaron Lauterer
be7f39fb8d pve-cluster.service: remove ceph.service
The ceph.service file has been removed in pve-manager commit be244f1.
Therefore, there is no need to reference it anymore. This also avoids
showing the `ceph.service` as a `not found` unit.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-06-21 09:39:42 +02:00
Thomas Lamprecht
a47058f234 bump version to 7.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-20 11:23:56 +02:00
Fabian Grünbichler
305facd9d4 d/control: add missing libtest-mockmodule-perl b-d
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-19 11:45:32 +02:00
Thomas Lamprecht
aea0f5a66f get tasklist: unpack null-terminated C string before decoding as JSON
This was always an "issue", but with Perl 5.28, from our Debian Buster
based release, decode_json just ignored the \0 NUL byte.

For example:
```
perl -w -MJSON -e 'my $raw = "[]\0"; print to_json(decode_json($raw), {pretty=>1});'

```
will get you the following error on perl 5.32
```
garbage after JSON object, at character offset 2 (before "\x{0}") at -e line 1.
```

Note, I did not find anything related in the perldelta aricles for
the 28 -> 30 or 30 -> 32 update, the first one made a bigger jump for
the JSON module version used, so possibly a change there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-16 16:12:35 +02:00
Thomas Lamprecht
1f1c5c4309 get tasklist: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-15 13:00:10 +02:00
Thomas Lamprecht
4c9ce43a08 bump version to 7.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 19:31:37 +02:00
Thomas Lamprecht
11bc808013 buildsys: fix IPCC.so linkage...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 19:31:37 +02:00
Thomas Lamprecht
e4be708695 buildsys: change upload dist to bullseye
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 18:08:20 +02:00
Thomas Lamprecht
6d21f2451b d/control: bump debhelper compat to >= 12
dh_systemd was enabled by default since level 10, with level 12 the
compat plugin does not exists anymore so enabling it manually results
in an error.

The dh_strip override is now obsolete too, as users need to go
through 5.4 AND 6.4 anyway on upgrade, and new installations do not
matter here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 18:05:32 +02:00
Thomas Lamprecht
747cf0db49 d/control: adapt libqb SO-Version dependency change
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-09 17:39:11 +02:00
Thomas Lamprecht
2fd0b1f682 bump version to 6.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 16:01:12 +02:00
Oguz Bektas
80d19645c4 pvecm: fix typo in description for 'updatecerts'
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-04-22 21:54:41 +02:00
Thomas Lamprecht
e085fe6f9f cfs lock: avoid confusing lock prefix on error
we have lots of forum posts where users think that the locking was
the error, not the actual error message from the called code.

This has limited value as general-applied prefix, if a code requires
the lockid or whatever to be included in the error message they can
already do so, so just re-raise the error and be done, at least if it
is a error from the code and not from the lock setup,.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 21:40:30 +02:00
Thomas Lamprecht
4942611503 pmxcfs: db: tell query planner that prepared statement are long living
SQLITE_PREPARE_PERSISTENT
    The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner
    that the prepared statement will be retained for a long time and
    probably reused many times. Without this flag,
    sqlite3_prepare_v3() and sqlite3_prepare16_v3() assume that the
    prepared statement will be used just once or at most a few times
    and then destroyed using sqlite3_finalize() relatively soon. The
    current implementation acts on this hint by avoiding the use of
    lookaside memory so as not to deplete the limited store of
    lookaside memory. Future versions of SQLite may act on this hint
    differently.
-- https://sqlite.org/c3ref/c_prepare_normalize.html#sqlitepreparepersistent

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 21:37:55 +02:00
Thomas Lamprecht
c44bb3d626 pmxcfs: db: use SQLITE_STATIC to avoid memory copies
we can trust that we own *value and *name until the sqlite statement
was executed, so use the STATIC bind flag to tell sqlite that it does
not need to make it's own copy in the bind statement.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 21:37:55 +02:00
Thomas Lamprecht
42f0a0a528 pmxcfs: more debug info on backend write and duplicate inode checks + cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 21:37:55 +02:00
Alexandre Derumier
a3d44df833 rename sdn/.version to sdn/.running-config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 13:36:17 +01:00
Alexandre Derumier
9d3ea5ef77 add sdn/dns.cfg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 13:36:17 +01:00
Alexandre Derumier
fc28c2f8aa add priv/ipam.db
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 13:36:17 +01:00
Alexandre Derumier
be1aa34bf1 add sdn/ipams.cfg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 13:36:17 +01:00
Alexandre Derumier
c20823f850 add sdn/subnets.cfg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 13:36:17 +01:00
Thomas Lamprecht
8d3e188275 pmxcfs: tests: make add_test signature backward compatible
we still need to be able to build with the libcheck version from
buster..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-31 03:21:50 +01:00
Thomas Lamprecht
b68b75f973 pmxcfs: status: catch possible allocation error
even if not really realistic to happen in Linux

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-31 03:09:30 +01:00
Thomas Lamprecht
61c1d1730a pmxcfs: tests: fix type in add_test signature
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-31 03:08:17 +01:00
Thomas Lamprecht
eb72096011 pmxcfs: tests: replace depreacated fail_unless with ck_assert
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-31 03:07:43 +01:00
Thomas Lamprecht
e43ff82bf9 buildsys: drop legacy docgen control variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-14 21:42:07 +01:00
Thomas Lamprecht
cd4660f798 buildsys: fix linkage, place library definitions after objects
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-14 21:37:26 +01:00
Thomas Lamprecht
ad7a70d6db pmxcfs: do not grant LXC configs o+r permissions anymore
This was initially done because of some hook reading the config from
an unprivileged namespace when using unprivileged containers.

But, we nowadays do not do this anymore, either setup stuff before to
or use another source for getting required information (e.g., our
autodev hook uses "/var/lib/lxc/$vmid/devices").

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-07 13:36:14 +02:00
Thomas Lamprecht
c63b596f75 pmxcfs: add some removal reminders for openvz
Removing them now could count as compat breakage, for users which
still depend on some of this weird behavior it's nicer if we do this
more explicitly with 7.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-07 13:36:14 +02:00
Thomas Lamprecht
6f1de191d7 bump version to 6.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-30 13:49:08 +02:00
Thomas Lamprecht
84c983155e pmxcfs: update copyright in license header
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-30 13:31:12 +02:00
Fabian Grünbichler
9dd866204c pmxcfs: protect CPG operations with mutex
cpg_mcast_joined (and transitively, cpg_join/leave) are not thread-safe.
pmxcfs triggers such operations via FUSE and CPG dispatch callbacks,
which are running in concurrent threads.

accordingly, we need to protect these operations with a mutex, otherwise
they might return CS_OK without actually doing what they were supposed
to do (which in turn can lead to the dfsm taking a wrong turn and
getting stuck in a supposedly short-lived state, blocking access via
FUSE and getting whole clusters fenced).

huge thanks to Alexandre Derumier for providing the initial bug report
and quite a lot of test runs while debugging this issue.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-09-30 13:26:11 +02:00
Fabian Grünbichler
38fde8ccc3 pmxcfs sync: properly check for corosync error
dfsm_send_state_message_full always returns != 0, since it returns
cs_error_t which starts with CS_OK at 1, with values >1 representing
errors.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-09-25 15:16:41 +02:00
Fabian Grünbichler
1e0c6aff96 pvecm: pass correct nodename to finish_join
only cosmetic, but printing the wrong nodename might cause confusion.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-18 14:45:22 +02:00
Fabian Grünbichler
f017b47fca fix #2727: pass correct format for linkX
to unbreak joining via SSH with an explicit link address.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-18 14:45:22 +02:00
Thomas Lamprecht
1e8e16ea27 style nit: use post-if not and'ed expression
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-18 14:45:08 +02:00
Thomas Lamprecht
b67b701452 bump version to 6.1-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 18:19:31 +02:00
Thomas Lamprecht
393742f6a5 prepare observed-files basedire: fix mounted check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 18:19:18 +02:00
Thomas Lamprecht
da0488c2ed bump version to 6.1-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-02 19:14:37 +02:00
Alexandre Derumier
beaabd80dd sdn: add sdn/.version file 2020-05-02 19:13:08 +02:00
Alexandre Derumier
e44b172ceb sdn: remove .new files 2020-05-02 19:13:08 +02:00
Thomas Lamprecht
fab69e8338 bump version to 6.1-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-30 17:33:56 +02:00
Thomas Lamprecht
462c16b758 updatecerts: create base directories of observed files
replaces the random hacks where we do some hail-mary mkdir in a
writer or the like, to ensure that the directory structure exists and
we can write safely.

more central and safer would be pmxcfs itself, but to late in the
release cycle to do that now.

Chicken out if pmxcfs is not mounted, we don't want to trash it's
(future) mountpoint..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-30 17:30:46 +02:00
Thomas Lamprecht
b1ad614cca bump version to 6.1-6
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-30 14:32:30 +02:00
Wolfgang Link
8b84a18a4f Add ACME plugin config file to cluster files
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2020-04-30 14:30:26 +02:00
Thomas Lamprecht
41f32a17fc cfs_lock: make it more clear that an error happened during not with the cfs-lock
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 11:13:59 +02:00