Commit Graph

6313 Commits

Author SHA1 Message Date
Aaron Lauterer
3bd128d7a0 ceph pools: allow to create erasure code pools
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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-04-28 20:26:38 +02:00
Aaron Lauterer
34a2222dd8 ceph tools: add erasure code management functions
Functions to manage erasure code (EC) profiles:
* add
* remove
* check if exists
* get default prefixed name
* get pool properties
* destroy crush rule

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-04-28 20:26:38 +02:00
Aaron Lauterer
29fe1eea7a api: ceph: $get_storages check if data-pool too
When removing a pool, we check against any storage that might have that
pool configured.
We need to check if that pool is used as data-pool too.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-04-28 20:26:38 +02:00
Thomas Lamprecht
24f3f2bc29 ceph tools: make rados open if not reused shorter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 20:26:38 +02:00
Thomas Lamprecht
0ac20586ac vzdump: transform hook script checks to post-if notation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 18:44:20 +02:00
Dylan Whyte
941ed98edd 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.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2022-04-28 18:38:53 +02:00
Thomas Lamprecht
7d72d62f9c ui: add virgl GPU to possible VGA drivers
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 16:36:31 +02:00
Fabian Ebner
010ff16e9f 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 14:16:33 +02:00
Fabian Ebner
31213d61d3 vzdump: generate notes: die upon unexpected escape character or variable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 14:16:33 +02:00
Fabian Ebner
34721757e7 close #438: ui: backup job: allow setting a notes-template for a job
Add a tooltip to the comment field, to better distinguish it from the
notes-template.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 14:16:04 +02:00
Fabian Ebner
5e73ffe680 ui: backup: allow setting protected and notes-template for manual backup
Setting a width, so the text area can fill the horizontal space.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 13:45:53 +02:00
Fabian Ebner
7c8ff459a8 ui: util: add helpers for (un)escaping notes-template
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 13:45:53 +02:00
Fabian Ebner
e01438a744 partially close #438: vzdump: support setting notes-template
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 13:45:53 +02:00
Fabian Ebner
b61d079afc ui: restore: fix syntax error introduced in previous commit
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 11:29:42 +02:00
Thomas Lamprecht
8ce4c52480 ui: restore overrides: switch from column to hbox+panel layout
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 11:12:19 +02:00
Fabian Ebner
6161093e26 ui: restore: display "Hostname" for container
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 10:45:17 +02:00
Fabian Ebner
c7f66bd038 ui: restore: group override settings in a fieldset
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 10:45:17 +02:00
Fabian Ebner
1ad2651202 ui: restore: allow override of some settings
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 08:43:36 +02:00
Fabian Ebner
47520da33a ui: restore: disallow empty storage selection if it wouldn't work
Namely, if there is a storage in the backup configuration that's not
available on the current node.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 08:43:36 +02:00
Thomas Lamprecht
47353b27df ui; datacenter options: add next-id editor
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 20:34:37 +02:00
Thomas Lamprecht
89c0452d6e fix replication fail count tests & bump libpve-guest-common-perl b-d
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 18:53:27 +02:00
Fabian Grünbichler
c971330601 api2: network: anybridge: re-add regular bridges
commit 89d146f207 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.

CC: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-04-27 13:55:57 +02:00
Thomas Lamprecht
ca65e09904 api: next-id: honor new datacenter.cfg upper/lower range option
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 13:52:01 +02:00
Fabian Ebner
bbd4cdd845 vzdump: support setting protected status
Check the number of protected backups early if the protected flag
is set.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-27 11:37:26 +02:00
Fabian Ebner
c527d28f0c fix #3955: vzdump: new: also send mail for error during job-init hook
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-27 10:36:19 +02:00
Fabian Ebner
3c5a7616cf vzdump: new: add add_error helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-27 10:36:19 +02:00
Alexandre Derumier
fef32ce05c ui: sdn: zone evpn: delete exitnodes-primary if empty
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-04-27 10:35:15 +02:00
Thomas Lamprecht
5ac1eaa041 replication: split out error handling and include more info in mail
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 10:18:30 +02:00
Thomas Lamprecht
fa4bb659a3 replication: sent always mail for first three tries and move helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 09:48:28 +02:00
Fabian Ebner
237f00be03 api: replication: don't send mails about failed replication only once
but rather multiple times becoming exponentially less frequent.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-26 16:09:43 +02:00
Thomas Lamprecht
dcc7676af7 d/control: bump proxmox-widget-toolkit dependency to 3.4-9
to have the moved markdown notes component available, among other
things

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 16:06:04 +02:00
Dominik Csapak
a8e22a83ab ui: dont show '__default__' in renderer
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)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-26 15:31:11 +02:00
Thomas Lamprecht
04f27b64d9 ui: realm sync: use fieldset for remove-vanished & ux/wording
Use fieldsets, which are just way nicer for grouping these things.

Disable the "remove properties" checkbox if we'd remove the whole
user anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 14:26:11 +02:00
Dominik Csapak
3e43739f57 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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-26 13:35:03 +02:00
Thomas Lamprecht
6e6a64a47a d/control: drop unused liblocale-po-perl build dependency
Became unused with commit 2bb03197d3
that moved the locale stuff to its own repo proxmox-i18n

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 13:34:50 +02:00
Thomas Lamprecht
56148f253e ui: utils: drop some useles _array helpers, just use Object.entries
if we need to enforce ordering it may help to reintroduce them
though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:07:14 +02:00
Thomas Lamprecht
b7004b4682 ui: utils: rework kvm-vga/keymaps and console-viewer schema handling
shave off some bloat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:01:13 +02:00
Dominik Csapak
f3d8ca24b5 ui: Utils: remove unnecessary render_kvm_vga_driver
the 'value' here is already the rendered text, passing it through
render again does not make sense

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-26 08:32:48 +02:00
Fabian Ebner
25bea05733 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-26 08:29:58 +02:00
Dominik Csapak
dd8b3252af ui: fix adding hostpci > 5
by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-25 18:22:24 +02:00
Thomas Lamprecht
c8e171a8bd ui: vm display: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-24 12:03:34 +02:00
Thomas Lamprecht
70aaf893b8 ui: backup restore: add hint to window title on overwrite restore
we prompt for confirmation in that case anyway, but some subtle, but
extra difference may still help

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:46 +02:00
Thomas Lamprecht
0e593799aa ui: backup restore: show "make unique" field also for self-overrride-existing
For example, relevant if the filterVMID checkbox got turned off. But
a user may also want to make the restored VM unique in other cases
too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:45 +02:00
Thomas Lamprecht
ce60366ff3 ui: backup restore: use displayEdit field for guest selector
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:27 +02:00
Thomas Lamprecht
d3de9b555a ui: backup restore: rework to leverage more viewcontroller and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:25 +02:00
Fabian Ebner
db8aa0f468 ui: disk storage selector: support storage with multiple formats without qcow2
For future or external storages where the assumption "multiple formats implies
qcow2 is supported" doesn't hold.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-20 15:01:28 +02:00
Fabian Ebner
faef846c22 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-20 15:01:28 +02:00
Thomas Lamprecht
716c30438b ui: lxc resources: modernize & simplify
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-14 07:50:25 +02:00
Stefan Sterz
742de03d5a ui: move NotesView panel and NotesEdit window to widget kit
this removes the NotesView panel and NotesEdit and replaces them with
with the version from the widget kit. requires a bump of the widget
toolkit.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-04-13 11:35:30 +02:00
Thomas Lamprecht
6c06783930 ui: disk reasign: condense code, some style improvements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-13 11:34:31 +02:00