Dominik Csapak [Mon, 13 Jun 2022 13:24:09 +0000 (15:24 +0200)]
fix #4053: don't run vzdump jobs when they change from disabled->enabled
by updating the timestamp in the job state when enabled is changing
from 0 -> 1. We do it this way too in PBS for example, and is the more
sensible behaviour.
Fabian Ebner [Tue, 14 Jun 2022 09:47:32 +0000 (11:47 +0200)]
fix #4111: replication: don't send mail when fail count is zero
which can happen when failing to obtain the guest's migration lock.
This led to a lot of mails being sent during migration (timeout for
obtaining lock is only 2 seconds and we run it in a loop).
One could argue that obtaining the lock should increase the fail
count, but without the lock, the job state should not be touched and
even the first three mails upon migration could be considered spam.
Fixes: e6b8af20 ("replication: sent always mail for first three tries and move helper") Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Aaron Lauterer [Mon, 2 May 2022 14:05:05 +0000 (16:05 +0200)]
fix #3597: ui: ceph setup: avoid autofill of monitor network
By not auto filling the Ceph public network we can avoid accidental
clicks on 'Next' which will cause the first Mon to be created with a
potentially wrong network. While that is fixable, it is tedious and
can be easily avoided by making the user always select the network to
use.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Tested-by: Stefan Hrdlicka<s.hrdlicka@proxmox.com>
[ T: adapted commit subject to be more specific and match our common
style ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Fri, 4 Mar 2022 13:09:08 +0000 (14:09 +0100)]
api: ceph: mon: make checking for duplicate addresses more robust
Because $mon->{addr} might come with a port attached (affects monitors
created with PVE 5.4 as reported in the community forum [0]), or even
be a hostname (according to the code in Ceph/Services.pm). Although
the latter shouldn't happen for configurations created by PVE.
[0]: https://forum.proxmox.com/threads/105904/
Fixes: 86ed64f9 ("api: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites") Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Mon, 9 May 2022 10:34:11 +0000 (12:34 +0200)]
vzdump: avoid 'requires' constraint when parsing defaults
to avoid warnings like
parse error in '/etc/vzdump.conf' - 'storage': missing property -
'notes-template' requires this property
when there is no default for the required property configured.
In new(), the defaults are mixed in with the regular CLI/API
parameters, so re-check if the required property is set. If it's not,
the defaults do not apply to the current run, and can be dropped.
instead of just checking for a newline, do a full check already.
Also do the check at the beginning of generate_notes() for consistency
and remove the check after expansion to avoid failing late for things
like '{{cl{{node}}er}}' (which can even expand to a valid variable
making the error even more confusing).
Co-developed-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
fix #3994: ui: add Options entry in the node System menu
Add the subentry "Options" in the "System" menu to expose some
options in the GUI which were not exposed before.
Added a new file for displaying and editing the node config options
which were not exposed through the GUI yet. Namely those are the
settings for wakeonlan and startall-on-boot-delay. Edited the
Makefile to include the newly created file.
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
gui: VM Create wizard - display default scsi controller correctly
Fixed a cosmetic issue where in the VM creation wizard the SCSI
controller would not be displayed correctly if the default value
"Default (LSI 53C895A)" was selected. In this case, "__default__"
would be printed for the user after progressing into the next "Disks"
pane.
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
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.