Re: [pve-devel] [RFC PATCH guest-common 1/2] ReplicationState: purge state from non local vms

2022-06-02 Thread Thomas Lamprecht
Am 02/06/2022 um 16:33 schrieb Fabian Grünbichler: >> Replicate vm 100 from node A to node B and C, and activate HA. When node >> A dies, it will be relocated to e.g. node B and start replicate from >> there. If node B now had an old state lying around for it's sync to node >> C, it might delete th

Re: [pve-devel] [RFC PATCH guest-common 1/2] ReplicationState: purge state from non local vms

2022-06-02 Thread Fabian Grünbichler
On May 24, 2022 1:41 pm, Dominik Csapak wrote: > when running replication, we don't want to keep replication states for > non-local vms. Normally this would not be a problem, since on migration, > we transfer the states anyway, but when the ha-manager steals a vm, it > cannot do that. In that case,

Re: [pve-devel] [PATCH manager] ceph install wizard: fix #3597: don't autofill network

2022-06-02 Thread Stefan Hrdlicka
Tried it and works as expected. I can't answer the original mail, since I joined the mailing list a bit later :). Tested-by: Stefan Hrdlicka On 6/1/22 12:27, Aaron Lauterer wrote: Can someone take a look at this? Patch should still apply. On 5/2/22 16:05, Aaron Lauterer wrote: By not auto f

Re: [pve-devel] [PATCH pve-docs 3/3] fix #3967: add ZFS dRAID documentation

2022-06-02 Thread Matthias Heiserer
I found a few typos :) 8<--- +ZFS dRAID +~ + +In a ZFS dRAID (declustered RAID) the hot spare drive(s) participate in the RAID. +Their spare capacity is reservered and used for rebuilding when one drive fails. typo: reservered -> reserved +This provides depending on the configuration

[pve-devel] [PATCH pve-docs 3/3] fix #3967: add ZFS dRAID documentation

2022-06-02 Thread Stefan Hrdlicka
add some basic explanation how ZFS dRAID works including links to openZFS for more details add documentation for two dRAID parameters used in code Signed-off-by: Stefan Hrdlicka --- local-zfs.adoc | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) di

[pve-devel] [PATCH pve-storage 1/3] fix #3967: enable ZFS dRAID creation via API

2022-06-02 Thread Stefan Hrdlicka
It is possible to set the number of spares and the size of data stripes via draidspares & dreaddata parameters. Signed-off-by: Stefan Hrdlicka --- PVE/API2/Disks/ZFS.pm | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Disks/ZFS

[pve-devel] [PATCH pve-manager 2/3] fix #3967: enable ZFS dRAID creation in WebGUI

2022-06-02 Thread Stefan Hrdlicka
add fields for additional settings required by ZFS dRAID Signed-off-by: Stefan Hrdlicka --- requires the changes in pve-storageto work www/manager6/node/ZFS.js | 47 1 file changed, 47 insertions(+) diff --git a/www/manager6/node/ZFS.js b/www/manager6/n

[pve-devel] [PATCH SERIES storage/manager/docs 0/3] add ZFS dRAID creation

2022-06-02 Thread Stefan Hrdlicka
The patch series adds dRAID configuration to the API and WebGUI. Besides that there is an update to the documenation adding some basic info about dRAID. -- PVE/API2/Disks/ZFS.pm | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) -- www/manager6/node

[pve-devel] [PATCH docs v2 2/3] network: adapt apply config section to PVE 7

2022-06-02 Thread Aaron Lauterer
ifupdown2 is now installed by default, we can therefore omit the whole installation part except a small note for people who installed PVE on top of Debian. also mention the CLI variant for users who like to edit the network config directly or are using some config management tools Signed-off-by:

[pve-devel] [PATCH docs v2 0/3] network: update & reword

2022-06-02 Thread Aaron Lauterer
Update the network section to - remove mentioning ifup & ifdown as it can break connections of running guests - ifupdown2 is default now, we can remove the verbose install guide - rework the introduction to make a few conecpts clear to people that are not used to it yet changes since v1: * add not

[pve-devel] [PATCH docs v2 3/3] network: rework introduction for people with less experience

2022-06-02 Thread Aaron Lauterer
Mentioning explicitly, that the vmbr interfaces can be thought of as a virtual switch and what can be done overall in the introduction will hopefully help new users to grasp the networking more quickly. Also mention the SDN to point people in that direction if they need it Signed-off-by: Aaron La

[pve-devel] [PATCH docs v2 1/3] network: remove ifup ifdown as it won't reattach guests

2022-06-02 Thread Aaron Lauterer
Mentioning 'ifup' and 'ifdown' can lead to users running into situations where they take down one interface, for example an vmbrX. In this situation the connection to the guests will be lost and not reestablished automatically if the interface is brought up again with 'ifup'. The better way to appl

[pve-devel] [PATCH storage v3 1/2] DirPlugin: update_volume_attribute: don't use update_volume_notes

2022-06-02 Thread Dominik Csapak
by refactoring it into a helper and use that. With this, we can omit the 'update_volume_notes' in subclasses Signed-off-by: Dominik Csapak --- PVE/Storage/DirPlugin.pm | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/PVE/Storage/DirPlugin.pm b/PVE

[pve-devel] [PATCH storage v3 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute

2022-06-02 Thread Dominik Csapak
this allows setting notes+protected for backups on btrfs Signed-off-by: Dominik Csapak Acked-by: Wolfgang Bumiller --- changes from v2: * parameter style fix * added Acked-by PVE/Storage/BTRFSPlugin.pm | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/PVE/S

Re: [pve-devel] [PATCH storage v2 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute

2022-06-02 Thread Wolfgang Bumiller
On Thu, Jun 02, 2022 at 10:03:32AM +0200, Wolfgang Bumiller wrote: > On Thu, Jun 02, 2022 at 09:14:59AM +0200, Thomas Lamprecht wrote: > > Am 27/05/2022 um 14:31 schrieb Dominik Csapak: > > > this allows setting notes+protected for backups on btrfs > > > > > > Signed-off-by: Dominik Csapak > > >

Re: [pve-devel] [PATCH storage v2 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute

2022-06-02 Thread Dominik Csapak
On 6/2/22 10:03, Wolfgang Bumiller wrote: On Thu, Jun 02, 2022 at 09:14:59AM +0200, Thomas Lamprecht wrote: Am 27/05/2022 um 14:31 schrieb Dominik Csapak: this allows setting notes+protected for backups on btrfs Signed-off-by: Dominik Csapak --- PVE/Storage/BTRFSPlugin.pm | 11 +--

Re: [pve-devel] [PATCH storage v2 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute

2022-06-02 Thread Wolfgang Bumiller
On Thu, Jun 02, 2022 at 09:14:59AM +0200, Thomas Lamprecht wrote: > Am 27/05/2022 um 14:31 schrieb Dominik Csapak: > > this allows setting notes+protected for backups on btrfs > > > > Signed-off-by: Dominik Csapak > > --- > > PVE/Storage/BTRFSPlugin.pm | 11 +-- > > 1 file changed, 9 ins

[pve-devel] [PATCH manager v2 1/3] fix #4026: add 'repeat-missed' option for jobs

2022-06-02 Thread Dominik Csapak
like systemd-timers 'persistent'. so that the user can configure it to not be run after powering up when it was previously missed this reverses the default behaviour to not run missed jobs after pvescheduler was started, since most of the time that's not the desired behaviour Signed-off-by: Domin

[pve-devel] [PATCH manager v2 2/3] fix #4053: don't run vzdump jobs when they change from disabled->enabled

2022-06-02 Thread Dominik Csapak
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. Signed-off-by: Dominik Csapak --- PVE/API2/Backup.pm | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/

[pve-devel] [PATCH manager v2 3/3] ui: dc/Backup: add 'repeat-missed' checkbox

2022-06-02 Thread Dominik Csapak
so that the users can configure how to handle missed job runs move the vmgrid inside the ipanel in 'columnB', so that the advanced items show below the vmgrid (not above) Signed-off-by: Dominik Csapak --- www/manager6/dc/Backup.js | 13 - 1 file changed, 12 insertions(+), 1 deletion(

[pve-devel] [PATCH docs v2 1/1] vzdump: add section about 'repeat-missed'

2022-06-02 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- vzdump.adoc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/vzdump.adoc b/vzdump.adoc index 544ed5e..add40dc 100644 --- a/vzdump.adoc +++ b/vzdump.adoc @@ -54,6 +54,12 @@ will in turn be parsed and executed by the `pvescheduler` daemon. These jobs use

[pve-devel] [PATCH manager/docs v2] handle missed jobs better

2022-06-02 Thread Dominik Csapak
by adding a config option 'repeat-missed' for jobs that repeats the jobs on pvescheduler start. new default is 0, which is reverse to current behaviour (but the more expected one) also always skips "missed" jobs when changing from disabled to enabled, since that is not expected changes from v1: *

[pve-devel] [PATCH v4 container 16/18] fix #2582: api: add checks for 'SuperUser' privilege for root-only options

2022-06-02 Thread Oguz Bektas
this way we can allow regular users to act as superuser on specific paths by giving them the (new) builtin 'SuperAdministrator' role or a custom role with the 'SuperUser' privilege Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm| 19 +-- src/PVE/API2/LXC/Config.pm | 2

[pve-devel] [PATCH v4 qemu-server 06/18] api: allow SU privileged users to edit root-only options for VM configs

2022-06-02 Thread Oguz Bektas
we now allow users with SU privilege to edit real device configurations for VMs. they still need the required privilege to edit the corresponding configuration options (e.g. `VM.Config.HWType`), as well as the SU privilege. Co-authored-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- v3->v

[pve-devel] [PATCH v4 access-control 05/18] api: allow superusers to edit tfa and password settings

2022-06-02 Thread Oguz Bektas
- prevent non-SU to change SU passwords - warning messages on raise_perm_exc() - log who did the password change - has_superuser_anywhere helper Suggested-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- src/PVE/API2/AccessControl.pm | 24 ++-- src/PVE/API2/TFA.pm

[pve-devel] [PATCH v4 manager 10/18] api: backup: allow SUs to use 'tmpdir', 'dumpdir' and 'script' options

2022-06-02 Thread Oguz Bektas
previously limited to root@pam; we can allow SUs to use these options if they have the privilege on the whole API path. Signed-off-by: Oguz Bektas --- PVE/API2/Backup.pm | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm index

[pve-devel] [PATCH v4 manager 15/18] ui: adapt sensible 'root@pam' checks to SU

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- * left off ceph since we drop to a /bin/login shell anyways www/manager6/lxc/Resources.js | 6 +++--- www/manager6/window/Migrate.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources

[pve-devel] [PATCH v4 manager 12/18] api: always drop to login prompt for non-root users on terminal proxy calls

2022-06-02 Thread Oguz Bektas
we should still drop to a login prompt on our spice/vnc/termproxy for SUs. also updated a comment about missing superuser role. Suggested-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- v3->v4: * changed wrong condition check (eq 'login' vs. ne 'login') PVE/API2/Nodes.pm | 11 -

[pve-devel] [PATCH v4 manager 11/18] api: vzdump: allow SUs to use 'bwlimit' and 'ionice' parameters

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/API2/VZDump.pm | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 13b6cd46..1c9c3631 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -27,7 +27,7 @@ __PACKAGE__->register_method ({

[pve-devel] [PATCH v4 qemu-server 09/18] parse_backup_hints: add comment for root shortcut and fix typos

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e9aa248..05b2f29 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6290,11 +6290,11 @@ my $restore_cleanup_oldconf = sub

[pve-devel] [PATCH v4 access-control 04/18] api: roles: only allow modifying roles to add/remove SU if user has SU themselves

2022-06-02 Thread Oguz Bektas
Suggested-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- src/PVE/API2/Role.pm | 21 + 1 file changed, 21 insertions(+) diff --git a/src/PVE/API2/Role.pm b/src/PVE/API2/Role.pm index 70a92b6..4a09ad6 100644 --- a/src/PVE/API2/Role.pm +++ b/src/PVE/API2/Role.pm @@ -4,6

[pve-devel] [PATCH v4 access-control 01/18] add "SuperAdministrator" role with the new "SuperUser" privilege

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/AccessControl.pm | 9 ++--- src/PVE/RPCEnvironment.pm | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index d0dbabc..aeda951 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/A

[pve-devel] [PATCH v4 qemu-server 08/18] api: allow superusers to use 'skiplock' option

2022-06-02 Thread Oguz Bektas
also mark the intentionally root-only migration related options in param descriptions and leave a reminder comment. Suggested-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 71 1 file changed, 48 insertions(+), 23 deleti

[pve-devel] [PATCH v4 docs 18/18] pveum: add SU privilege and SA role

2022-06-02 Thread Oguz Bektas
with some warnings about imposed restrictions and the danger of giving this role/privilege to untrusted users. Suggested-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- pveum.adoc | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pveum.adoc b/pveum.adoc in

[pve-devel] [PATCH v4 storage 17/18] check_volume_access: allow superusers to pass arbitrary fs paths

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/Storage.pm | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 72458cf..f6da63d 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -510,6 +510,11 @@ sub parse_volume_id { sub check_volume_access {

[pve-devel] [PATCH v4 manager 14/18] ui: lxc features: check for SU instead of 'root@pam'

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- www/manager6/lxc/Options.js | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js index d0a53fc7..7aa18447 100644 --- a/www/manager6/lxc/Options.js +++ b/www/manager6/lxc/Options.js @@ -

[pve-devel] [PATCH v4 access-control++ 00/18] SuperUser privilege

2022-06-02 Thread Oguz Bektas
big thanks to Fabian G. for the earlier reviews :) v3 was not reviewed but i thought i should rebase it to make it easier. i also noticed some things that weren't addressed or were incorrect, so those are hopefully fixed now. please note that the privilege columns of the role selector in widget-t

[pve-devel] [PATCH v4 qemu-server 07/18] migration tests: mock $rpcenv->check subroutine

2022-06-02 Thread Oguz Bektas
missing mock routine is causes the tests to fail at build time when $rpcenv->check is called. previous assumption was returning 'root@pam' to get_user() so we can do the same here. Signed-off-by: Oguz Bektas --- test/MigrationTest/QmMock.pm | 5 + 1 file changed, 5 insertions(+) diff --git

[pve-devel] [PATCH v4 manager 13/18] ui: include "SuperUser" in privilege selector

2022-06-02 Thread Oguz Bektas
only the 'SuperAdministrator' role has full privileges including SU, that's why we use that role to generate all the privileges. Signed-off-by: Oguz Bektas --- www/manager6/form/PrivilegesSelector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/form/Privileges

[pve-devel] [PATCH v4 access-control 03/18] api: acl: only allow granting SU privilege if user already has it

2022-06-02 Thread Oguz Bektas
also check for 'propagate' bit on the target path to verify if the user can grant SU privileges on there. Co-authored-by: Fabian Grünbichler Signed-off-by: Oguz Bektas --- src/PVE/API2/ACL.pm | 16 1 file changed, 16 insertions(+) diff --git a/src/PVE/API2/ACL.pm b/src/PVE/API

[pve-devel] [PATCH v4 access-control 02/18] RPC env: add SuperUser API permission for GUI capabilities

2022-06-02 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/RPCEnvironment.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm index f5d2219..4c55b25 100644 --- a/src/PVE/RPCEnvironment.pm +++ b/src/PVE/RPCEnvironment.pm @@ -139,12

Re: [pve-devel] [PATCH storage v2 2/2] BTRFSPlugin: reuse DirPlugin update/get_volume_attribute

2022-06-02 Thread Thomas Lamprecht
Am 27/05/2022 um 14:31 schrieb Dominik Csapak: > this allows setting notes+protected for backups on btrfs > > Signed-off-by: Dominik Csapak > --- > PVE/Storage/BTRFSPlugin.pm | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) looks OK, but the whole situation with that and ofte

[pve-devel] applied: [PATCH manager] report: add ceph device list

2022-06-02 Thread Thomas Lamprecht
Am 31/05/2022 um 14:44 schrieb Aaron Lauterer: > Can help a lot to identify which OSD is using which physical disk > > Signed-off-by: Aaron Lauterer > --- > PVE/Report.pm | 1 + > 1 file changed, 1 insertion(+) > > applied, thanks! ___ pve-devel ma

Re: [pve-devel] [PATCH manager/docs] handle missed jobs better

2022-06-02 Thread Thomas Lamprecht
Am 01/06/2022 um 12:23 schrieb Dominik Csapak: > by adding a config option 'skip-missed' for jobs that skips the jobs > on pvescheduler start and when changing from disabled -> enabled > > i did not use the systemd name 'persistent' since the name does > not really convey what it means, so i tried