[pve-devel] [PATCH qemu-server] drives: expose 'readonly' flag of qemu

2021-09-28 Thread Dominik Csapak
this allows a user to set a drive to read only. This can be useful if a disk should not be written to, or if the backing file/source is not writable (like a mapped pbs backup to /dev/loopX). while this could also be achieved by setting 'snapshot=1', this would create a temporary file in /var/tmp w

Re: [pve-devel] [PATCH qemu-server] drives: expose 'readonly' flag of qemu

2021-09-28 Thread Dominik Csapak
On 9/28/21 09:48, Dominik Csapak wrote: while forward migration (old->new) worked without issue, i noticed that ofc here i meant migration new->new with the 'readonly' flag enabled ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lis

[pve-devel] [PATCH manager] ui: dc/OptionView: maximal -> maximum

2021-09-28 Thread Lorenz Stechauner
Signed-off-by: Lorenz Stechauner --- www/manager6/dc/OptionView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js index edae97ea..a8f1ea6a 100644 --- a/www/manager6/dc/OptionView.js +++ b/www/manager6/dc/OptionView

[pve-devel] [PATCH i18n] update Maximal Workers -> Maximum Workers

2021-09-28 Thread Lorenz Stechauner
Signed-off-by: Lorenz Stechauner --- ar.po| 2 +- ca.po| 2 +- da.po| 2 +- de.po| 2 +- es.po| 2 +- eu.po| 2 +- fa.po| 2 +- fr.po| 2 +- gl.po| 2 +- he.po| 2 +- hu.po| 2 +- it.po| 2 +- ja.po| 2 +- kr.po| 2 +- nb.po| 2 +- nl.po

[pve-devel] [PATCH qemu-server v2] drives: expose 'readonly' flag of qemu for scsi/virtio

2021-09-28 Thread Dominik Csapak
this allows a user to set a drive to 'read-only'. This can be useful if a disk should not be written to, or if the backing file/source is not writable (like a mapped pbs backup to /dev/loopX). while this could also be achieved by setting 'snapshot=1', this would create a temporary file in /var/tmp

Re: [pve-devel] [PATCH qemu-server v2] drives: expose 'readonly' flag of qemu for scsi/virtio

2021-09-28 Thread Fabian Grünbichler
On September 28, 2021 11:02 am, Dominik Csapak wrote: > this allows a user to set a drive to 'read-only'. This can be useful > if a disk should not be written to, or if the backing file/source is > not writable (like a mapped pbs backup to /dev/loopX). > > while this could also be achieved by sett

[pve-devel] [PATCH pve-kernel-meta/pve-kernel-5.4] boot-tool: prefer PVE for systemd-boot loader title

2021-09-28 Thread Stoiko Ivanov
From: Fabian Grünbichler like for Grub where this is handled via snippets with PVE > PMG > PBS. Reported-by: Oguz Bektas Signed-off-by: Fabian Grünbichler (cherry picked from commit 40d8d36eef7935ee386edbdf5328f3b6421ff899) Signed-off-by: Stoiko Ivanov --- this patch is the only relevant one

[pve-devel] [PATCH storage 03/10] diskmanage: add change_parttype helper

2021-09-28 Thread Fabian Ebner
Only supports GPT-partitioned disks as I didn't see an option for sgdisk to make it also work with MBR-partitioned disks. And while sfdisk could be used instead (or additionally) it would be a new dependency, and AFAICS require some conversion of partition type GUIDs to MBR types on our part. Sign

[pve-devel] [PATCH storage 07/10] diskmanage: allow partitions for get_udev_info

2021-09-28 Thread Fabian Ebner
both existing callers only call this with non-partitions currently, so the change should be backwards compatible. In preparation to enable ZFS creation on top of partitions (where the udev info is used to get the stable by-id path of a device). Signed-off-by: Fabian Ebner --- PVE/Diskmanage.pm

[pve-devel] [PATCH storage 08/10] diskmanage: allow passing partitions to get_disks

2021-09-28 Thread Fabian Ebner
Requires that the $include_partitions parameter is set too, which: 1. Makes sense, because the partition won't be included in the result otherwise. 2. Ensures backwards compatibility for existing callers that don't use $include_partitions. No existing callers use both $disks and $include_p

[pve-devel] [PATCH widget-toolkit 2/2] disk list: allow wiping individual partitions

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/panel/DiskList.js | 8 1 file changed, 8 deletions(-) diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js index 90a6553..eb8b1a8 100644 --- a/src/panel/DiskList.js +++ b/src/panel/DiskList.js @@ -399,14 +399,6 @@ Ext.define('Proxmox.DiskList',

[pve-devel] [PATCH-SERIES storage/widget-toolkit/manager] disk creation and wiping improvements

2021-09-28 Thread Fabian Ebner
which also fixes the remaining parts of #2285, i.e. extending the diskmanage module and creation to support partitions. The series consists of: Tighten the checks in the disk creation paths by re-doing them after forking/locking. Work around a udev bug[0] leading to outdated device info from lsb

[pve-devel] [PATCH storage 06/10] api: disks: initgpt: explicitly abort for partitions

2021-09-28 Thread Fabian Ebner
In preparation to extend disk_is_used to support partitions. Without this new check, initgpt would also allow partitions once disk_is_used supports partitions, which is not desirable. Signed-off-by: Fabian Ebner --- PVE/API2/Disks.pm | 1 + PVE/Diskmanage.pm | 10 -- 2 files changed, 9

[pve-devel] [RFC manager 7/9] partially fix #2285: ui: ceph: allow selecting partitions

2021-09-28 Thread Fabian Ebner
For DB and WAL disks, not only partitions will show up now, but one more type of disk, that didn't show up before: Namely, GPT-partitioned disks with any partitions detected as used. It's confusing as the size shown is of the full disk, with no indication that a new partition will be appended at t

[pve-devel] [RFC manager 6/9] api: ceph: create osd: set correct partition type

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- RFC, because the previous one is and this only makes sense with it. Dependency bump for pve-storage is needed for the new helpers. PVE/API2/Ceph/OSD.pm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm in

[pve-devel] [PATCH manager 1/9] api: ceph: create osd: re-check disk requirements after fork/lock

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Ceph/OSD.pm | 54 +--- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index 79548b2f..83a9c932 100644 --- a/PVE/API2/Ceph/OSD.pm +++ b/PVE/API2/Ceph/OSD.pm

[pve-devel] [PATCH manager 8/9] ui: zfs create: switch to using widget-toolkit's multiDiskSelector

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- For this one, the dependency requirement is already new enough. www/manager6/node/ZFS.js | 80 ++-- 1 file changed, 4 insertions(+), 76 deletions(-) diff --git a/www/manager6/node/ZFS.js b/www/manager6/node/ZFS.js index 8ea364

[pve-devel] [PATCH manager 3/9] api: ceph: create osd: work around udev bug

2021-09-28 Thread Fabian Ebner
There is a udev bug [0] which can ultimately lead to the udev database for certain devices not being actively updated. The Diskmanage package relies upon lsblk for certain info, and lsblk queries the udev database. Ensure the information is updated by manually calling 'udevadm trigger' for the chan

[pve-devel] [PATCH storage 05/10] diskmanage: don't set usage for unused partitions

2021-09-28 Thread Fabian Ebner
The disk type is already 'partition' so there's no additional information here. And it would need to serve as a code-word for unused partitions. The cleaner approach is to not set the usage. Signed-off-by: Fabian Ebner --- Was not a smart decision back then...If this is considered a breaking cha

[pve-devel] [PATCH storage 04/10] diskmanage: wipe blockdev: also change partition type

2021-09-28 Thread Fabian Ebner
when called with a partition. Since get_disks uses the partition type (among other things) to detect LVM and ZFS volumes, such volumes would still be seen as in-use after wiping. Thus, also change the partition type and simply use 0x83 "Linux filesystem". Signed-off-by: Fabian Ebner --- PVE/Disk

[pve-devel] [PATCH storage 10/10] api: disks: create: set correct partition type

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Disks/Directory.pm | 5 - PVE/API2/Disks/LVM.pm | 5 + PVE/API2/Disks/LVMThin.pm | 5 + PVE/API2/Disks/ZFS.pm | 11 +++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Disks/Directory.pm b/PVE/AP

[pve-devel] [PATCH storage 09/10] partially fix #2285: api: disks: allow partitions for creation paths

2021-09-28 Thread Fabian Ebner
The calls for directory and ZFS need slight adaptations. Except for those, the only thing that needs to be done is support partitions in the disk_is_used helper. Signed-off-by: Fabian Ebner --- PVE/API2/Disks/Directory.pm | 28 PVE/API2/Disks/ZFS.pm | 11 ++

[pve-devel] [PATCH storage 02/10] api: disk: work around udev bug to ensure its database is updated

2021-09-28 Thread Fabian Ebner
There is a udev bug [0] which can ultimately lead to the udev database for certain devices not being actively updated. Determining whether a disk is used or not in get_disks() (in part) relies upon lsblk, which queries the udev database. Ensure the information is updated by manually calling 'udevad

[pve-devel] [RFC manager 5/9] partially fix #2285: api: ceph: create osd: allow using partitions

2021-09-28 Thread Fabian Ebner
Note that this does not only allow partitions to be used, but for DB and WAL disks, one more type of disk, that wasn't allowed before. Namely, GPT-partitioned disks with any partitions detected as used. The reason is get_disks' behavior: * Without $include_partitions=1, the disk will have the sam

[pve-devel] [PATCH widget-toolkit 1/2] (multi) disk selector: allow requesting partitions too

2021-09-28 Thread Fabian Ebner
No functional change for existing users is intended. Signed-off-by: Fabian Ebner --- src/form/DiskSelector.js | 7 +++ src/form/MultiDiskSelector.js | 22 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/form/DiskSelector.js b/src/form/DiskSele

[pve-devel] [PATCH manager 4/9] api: ceph: create osd: set correct parttype for DB/WAL

2021-09-28 Thread Fabian Ebner
The get_ceph_journals function in pve-storage uses this information. Signed-off-by: Fabian Ebner --- Dependency bump for pve-storage for the new helper needed. PVE/API2/Ceph/OSD.pm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index

[pve-devel] [PATCH storage 01/10] api: disks: create: re-check disk after fork/lock

2021-09-28 Thread Fabian Ebner
Because then it might not be unused anymore. If there really is a race, this prevents e.g. sgdisk creating a partition on a device already in use by LVM or LVM destroying a partitioned device. For ZFS, also get the latest udev info once inside the worker. Signed-off-by: Fabian Ebner --- PVE/API

[pve-devel] [PATCH manager 9/9] partially fix #2285: ui: disk create: allow selecting partitions

2021-09-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Depends on new widget-toolkit to have an effect. www/manager6/node/Directory.js | 1 + www/manager6/node/LVM.js | 1 + www/manager6/node/LVMThin.js | 1 + www/manager6/node/ZFS.js | 1 + 4 files changed, 4 insertions(+) diff --git a/www/manager6/no

[pve-devel] [PATCH manager 2/9] api: check: create osd: use wipe_blockdev from the Diskmanage package

2021-09-28 Thread Fabian Ebner
which is mostly a copy of the wipe_disks helper with the difference that it also uses wipefs on the device and its partitions. Remove the wipe_disks helper as no users remain. Signed-off-by: Fabian Ebner --- For this one, the dependency on libpve-storage-perl is already new enough. PVE/API2/C

[pve-devel] [PATCH v2 firewall] implement fail2ban backend & API

2021-09-28 Thread Oguz Bektas
adds a section "[FAIL2BAN]" in the hostfw configuration, which allows the properties 'maxretry' and 'bantime' (in minutes) for the GUI ports. enable: whether fail2ban jail is enabled or not maxretry: amount of login tries allowed bantime: amount of minutes to ban suspicious host the configuration

[pve-devel] [PATCH v2 manager 2/2] fix 3850: ui: storage: using PreallocationSelector for file based storage types

2021-09-28 Thread Lorenz Stechauner
Signed-off-by: Lorenz Stechauner --- www/manager6/controller/StorageEdit.js | 6 ++ www/manager6/storage/Base.js | 18 ++ www/manager6/storage/NFSEdit.js| 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/www/manager6/controller/StorageEd

[pve-devel] [PATCH-SERIES v2 storage/manager] fix #3580: make preallocation mode selectable for qcow2 and raw images

2021-09-28 Thread Lorenz Stechauner
changes to v1: * adjusted preallocation api description * moved sub preallocation_cmd_option above `# Storage implementation` * updated PreallocationSelector to work with `default` * reworked placement of Prealloc.Selector in Base.js pve-storage Lorenz Stechauner (1): fix #3580: plugins: make pr

[pve-devel] [PATCH v2 manager 1/2] ui: add PreallocationSelector

2021-09-28 Thread Lorenz Stechauner
Signed-off-by: Lorenz Stechauner --- www/manager6/Makefile | 1 + www/manager6/form/PreallocationSelector.js | 11 +++ 2 files changed, 12 insertions(+) create mode 100644 www/manager6/form/PreallocationSelector.js diff --git a/www/manager6/Makefile b/www/manager6/

[pve-devel] [PATCH v2 storage 1/1] fix #3580: plugins: make preallocation mode selectable for qcow2 and raw images

2021-09-28 Thread Lorenz Stechauner
the plugins for file based storages * BTRFS * CIFS * Dir * Glusterfs * NFS now allow the option 'preallocation'. 'preallocation' can have four values: * default * off * metadata * falloc * full see man pages for `qemu-img` for what these mean exactly. [0] the defualt value was chosen to

[pve-devel] [PATCH pve-docs 1/1] pvecm.adoc, pve-firewall.adoc: add info about ports used by corosync and others

2021-09-28 Thread Sylvain Faivre
--- pve-firewall.adoc | 9 ++--- pvecm.adoc| 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pve-firewall.adoc b/pve-firewall.adoc index f59c302..ca8acfe 100644 --- a/pve-firewall.adoc +++ b/pve-firewall.adoc @@ -426,7 +426,7 @@ following traffic is still allow

[pve-devel] [PATCH pve-docs 0/1] pvecm.adoc, pve-firewall.adoc: add info about ports used by corosync and others

2021-09-28 Thread Sylvain Faivre
*** BLURB HERE *** Sylvain Faivre (1): pvecm.adoc,pve-firewall.adoc: add info about ports used by corosync and others Following discussion at https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/ pve-firewall.adoc | 9 ++--- pvecm.adoc