Aaron Lauterer [Tue, 3 May 2022 11:58:07 +0000 (13:58 +0200)]
ceph pools create: remove crush_rule for ec pool data
The crush rule is an optional paramter which can be used for the
metadata pool, but the erasure coded data pool will always get its own
crush rule. Therefore this parameter can not be adapted.
Dominik Csapak [Tue, 3 May 2022 14:10:25 +0000 (16:10 +0200)]
schedule-analyze: fix schedules with limited runs
When a schedule only has a limited amount of runs it can happen
(e.g. 2022-10-01 8:00/30), $next will be undef after the last run.
Exit early in that case.
ui: disk reassign: remove unused reference and bind
They are not used anywhere else, so I assume they were left over from
an earlier version.
Also, sometimes "[object object] flashes in the Target Guest field
when opening the reassign window, with this removed it doesn't occur.
Dominik Csapak [Mon, 2 May 2022 13:15:20 +0000 (15:15 +0200)]
ui: realm sync: let users set 'remove vanished options' independently
and label it correctly. The 'Properties' option was mislabeled,
it means 'remove vanished fields from synced users', not 'remove
fields from vanished users'.
So don't couple that with the 'Entries' option, and update the label
to convey the right meaning.
api: ceph ec pools: make add_storages overridable default
The behavior of always adding the storage config was lost in commit e039e85. But it is more sensible to make it a default that can be
changed if needed.
Thomas Lamprecht [Thu, 28 Apr 2022 18:23:24 +0000 (20:23 +0200)]
api: ceph ec pools: move to format-str, create ec in worker, reuse $rados
moved to a format string 'erasurce-coded', that allows also to drop
most of the param existence checking as we can set the correct
optional'ness in there. Also avoids bloating the API to much for
just this.
Reuse the $rados connection more often to avoid to much
overhead/lingering sockets (the rados connection stays around in the
background to allow efficient reuse)
really should be three separate commits, but too intertwined and too
late for me to care tbh.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
To use erasure coded (EC) pools for RBD storages, we need two pools. One
regular replicated pool that will hold the RBD omap and other metadata
and the EC pool which will hold the image data.
The coupling happens when an RBD image is created by adding the
--data-pool parameter. This is why we have the 'data-pool' parameter in
the storage configuration.
To follow already established semantics, we will create a 'X-metadata'
and 'X-data' pool. The storage configuration is always added as it is
the only thing that links the two together (besides naming schemes).
Different pg_num defaults are chosen for the replicated metadata pool as
it will not hold a lot of data.
Functions to manage erasure code (EC) profiles:
* add
* remove
* check if exists
* get default prefixed name
* get pool properties
* destroy crush rule
vzdump: add error if passed in hook script doesn't exist
Previously, if the '--script' argument was passed with a non-existent
file, it would state that a non-executable script was the reason for
failure. This adds a check to see if the hook script exists, in order
to provide a more accurate error message.
Also adds an 'Error:' prefix the 'script not executable' error.
vzdump: check that notes-template is a single line
While vzdump itself wouldn't mind about unescaped newlines, the
parameter isn't supposed to contain any, and when used as part of the
job config, it has to be a single line too, so make it consistent.
commit 052fbb2a4d1bdeb490b2e3b67cd7555e460ebe93 introduced permission
checks here that caused all regular bridges to be removed from the
returned list as soon as the SDN package is installed, unless the user
is root@pam or there exists a VNET with the same ID.
this is arguably a breaking change, so limit the priv check to actually
defined VNETs for the time being, and add ALL regular bridges
uncondtionally like before.
get_local_vnets already filters by the same prvs, so we need to get the
full config to find out which IDs are VNETs and which are not.
once/iff we introduce ACL paths for *all* bridges in the future, we can
limit accordingly here.
with the recent rework of the render/maps/arrays, we now
show 'Default (__default__)'. Since '__default__' is only an internal
value in the gui, don't expose it by explicitely checking for it
in the other render functions it works already because we either construct
the text differently (console_map) or we check the result from
parsing (vga_driver)
Dominik Csapak [Mon, 28 Mar 2022 12:38:06 +0000 (14:38 +0200)]
ui: realm sync: replace 'full' and 'purge' with 'remove-vanished'
in default sync options and the sync window. We do this by exposing
the individual flags as checkboxes. We get the mapped value from the
backend so we do not have to handle 'old' values here.
Fabian Ebner [Tue, 30 Nov 2021 10:38:12 +0000 (11:38 +0100)]
ceph: services: broadcast versions: improve requesting old version
to avoid a "malformed JSON string" warning when there is no old
version present (e.g. after starting a cluster).
get_node_kv will always return something that evaluates to true, so
instead, test if the result has an entry for the current node. Also,
it's enough to request the kv for the current node only.
Fabian Ebner [Thu, 17 Mar 2022 08:37:47 +0000 (09:37 +0100)]
ui: disk storage selector: never send format when hideFormat is true
The backend will pick an appropriate format when nothing is specified. The
comment made it sound like 'raw' would be sent, but that didn't actually happen
on file-based storages, and now no format is sent, so adapt the comment too.
ui: lxc: resources: consider rootfs as a disk again
Commit fa7980c2 ("ui: lxc resources: switch to vector based font
awesome icons") seems like an innocent change, but it broke the
(very brittle) logic here by removing the tdCls for rootfs.
Fabian Ebner [Tue, 29 Mar 2022 12:53:15 +0000 (14:53 +0200)]
vzdump: backup limit: only count unprotected backups
since they are the ones relevant for pruning and protected backups
have their own separate limit.
Since get_backup_file_list is only used in places where the
unprotected backups are needed, adapt the helper accordingly.
If there is a storage, use PVE::Storage::volume_list to count the
unprotected backups. This avoids a direct invocation of the
proxmox-backup-client for PBS and the limit check can also work for
external storage plugins which might not be dir-based or name the
backups differently.
fix #3976: api/backup: make schedule/starttime truly optional on update
on create we require either starttime (+dow) or a schedule, but when
updating an existing job, this is not necessary
before we changed to schedules, the starttime was not optional either on
update, but i think there is no reason to require the user to send the
schedule/startime along every time.
the gui will send all values every time, so that was never a problem there
We support external storage plugins, e.g., for proprietary
technology, so a "unknown" value here may not actually mean that we
missed anything, so just return the type value 1:1 as fallback, that
gives the user a better idea about such a storage entry.
Reported-by: Joshua Huber <jhuber@blockbridge.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Jobs: don't schedule jobs with no computable next event
if we have a schedule that has no 'next event' we should skip the scheduling
instead of schedule every round
this can happen if someone sets an schedule that has no next match.
some examples:
* 2-31 00:00 (there is not February 31st)
* mon 2022-04-02 (this would be a saturday, not monday)
* 1970-1-1 (or every other exact date in the past)