[pve-devel] [PATCH manager] ui: iso selector: fix disabling

2023-12-04 Thread Fiona Ebner
Otherwise, it's impossible to add no or a physical CD to an existing
VM.

Reported in the communiy forum:
https://forum.proxmox.com/threads/136960/post-611704

Fixes: fc7b556d ("ui: refactor iso-selector out of the cd input panel")
Signed-off-by: Fiona Ebner 
---
 www/manager6/form/IsoSelector.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/form/IsoSelector.js b/www/manager6/form/IsoSelector.js
index 0bc6346c..0f1bf744 100644
--- a/www/manager6/form/IsoSelector.js
+++ b/www/manager6/form/IsoSelector.js
@@ -61,7 +61,7 @@ Ext.define('PVE.form.IsoSelector', {
let me = this;
me.lookup('storage').setDisabled(disabled);
me.lookup('file').setDisabled(disabled);
-   me.callParent();
+   return me.callParent([disabled]);
 },
 
 referenceHolder: true,
-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH zfsonlinux 2/2] d/zfsutils-linux.install: add zfs_prepare_disk and manpage

2023-12-04 Thread Stoiko Ivanov
Signed-off-by: Stoiko Ivanov 
---
 debian/zfsutils-linux.install | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install
index e788e27c..2fd7aefe 100644
--- a/debian/zfsutils-linux.install
+++ b/debian/zfsutils-linux.install
@@ -35,6 +35,7 @@ sbin/zstreamdump
 usr/bin/zvol_wait
 usr/bin/zilstat
 usr/lib/modules-load.d/ lib/
+usr/lib/zfs-linux/zfs_prepare_disk
 usr/lib/zfs-linux/zpool.d/
 usr/lib/zfs-linux/zpool_influxdb
 usr/sbin/arc_summary
@@ -72,6 +73,7 @@ usr/share/man/man8/zfs-list.8
 usr/share/man/man8/zfs-load-key.8
 usr/share/man/man8/zfs-mount-generator.8
 usr/share/man/man8/zfs-mount.8
+usr/share/man/man8/zfs_prepare_disk.8
 usr/share/man/man8/zfs-program.8
 usr/share/man/man8/zfs-project.8
 usr/share/man/man8/zfs-projectspace.8
-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH zfsonlinux 0/2] update to 2.2.2

2023-12-04 Thread Stoiko Ivanov
Since ZFS 2.2.2 was released last week - and for now there were not
regressions noticed with it - updating to 2.2.2 should help
everyone to see that our version is not affected by the `dnode_is_dirty`
issue anymore.

The second patch was already present in my tests for 2.2.1:
https://lists.proxmox.com/pipermail/pve-devel/2023-November/060751.html

minimally tested on 2 VMs, with a few containers and storage-replication
configured.

Stoiko Ivanov (2):
  update zfs submodule to 2.2.2 and refresh patches
  d/zfsutils-linux.install: add zfs_prepare_disk and manpage

 ...-move-manpage-arcstat-1-to-arcstat-8.patch |   2 +-
 ...-guard-access-to-l2arc-MFU-MRU-stats.patch |   2 +-
 ...uncate_shares-without-etc-exports.d.patch} |   0
 ...ol-Remove-broken-blk-mq-optimization.patch |  99 -
 ...evert-zvol-Temporally-disable-blk-mq.patch | 123 ---
 ...ten-bounds-for-noalloc-stat-availab.patch} |   0
 ...und-UBSAN-errors-for-variable-arrays.patch |  72 ---
 ...g-between-unencrypted-and-encrypted-.patch |  44 
 ...Add-a-tunable-to-disable-BRT-support.patch | 201 --
 ...2.1-Disable-block-cloning-by-default.patch |  42 
 ...heck-dnode-and-its-data-for-dirtines.patch |  97 -
 debian/patches/series |  11 +-
 debian/zfsutils-linux.install |   2 +
 upstream  |   2 +-
 14 files changed, 7 insertions(+), 690 deletions(-)
 rename 
debian/patches/{0012-Fix-nfs_truncate_shares-without-etc-exports.d.patch => 
0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch} (100%)
 delete mode 100644 
debian/patches/0010-zvol-Remove-broken-blk-mq-optimization.patch
 delete mode 100644 
debian/patches/0011-Revert-zvol-Temporally-disable-blk-mq.patch
 rename 
debian/patches/{0014-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch 
=> 0011-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch} (100%)
 delete mode 100644 
debian/patches/0013-Workaround-UBSAN-errors-for-variable-arrays.patch
 delete mode 100644 
debian/patches/0015-Fix-block-cloning-between-unencrypted-and-encrypted-.patch
 delete mode 100644 
debian/patches/0016-Add-a-tunable-to-disable-BRT-support.patch
 delete mode 100644 
debian/patches/0017-zfs-2.2.1-Disable-block-cloning-by-default.patch
 delete mode 100644 
debian/patches/0018-dnode_is_dirty-check-dnode-and-its-data-for-dirtines.patch

-- 
2.39.2



___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] [PATCH zfsonlinux 1/2] update zfs submodule to 2.2.2 and refresh patches

2023-12-04 Thread Stoiko Ivanov
the removed patches were cherry-picks, which are included in 2.2.2

Signed-off-by: Stoiko Ivanov 
---
 ...-move-manpage-arcstat-1-to-arcstat-8.patch |   2 +-
 ...-guard-access-to-l2arc-MFU-MRU-stats.patch |   2 +-
 ...uncate_shares-without-etc-exports.d.patch} |   0
 ...ol-Remove-broken-blk-mq-optimization.patch |  99 -
 ...evert-zvol-Temporally-disable-blk-mq.patch | 123 ---
 ...ten-bounds-for-noalloc-stat-availab.patch} |   0
 ...und-UBSAN-errors-for-variable-arrays.patch |  72 ---
 ...g-between-unencrypted-and-encrypted-.patch |  44 
 ...Add-a-tunable-to-disable-BRT-support.patch | 201 --
 ...2.1-Disable-block-cloning-by-default.patch |  42 
 ...heck-dnode-and-its-data-for-dirtines.patch |  97 -
 debian/patches/series |  11 +-
 upstream  |   2 +-
 13 files changed, 5 insertions(+), 690 deletions(-)
 rename 
debian/patches/{0012-Fix-nfs_truncate_shares-without-etc-exports.d.patch => 
0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch} (100%)
 delete mode 100644 
debian/patches/0010-zvol-Remove-broken-blk-mq-optimization.patch
 delete mode 100644 
debian/patches/0011-Revert-zvol-Temporally-disable-blk-mq.patch
 rename 
debian/patches/{0014-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch 
=> 0011-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch} (100%)
 delete mode 100644 
debian/patches/0013-Workaround-UBSAN-errors-for-variable-arrays.patch
 delete mode 100644 
debian/patches/0015-Fix-block-cloning-between-unencrypted-and-encrypted-.patch
 delete mode 100644 
debian/patches/0016-Add-a-tunable-to-disable-BRT-support.patch
 delete mode 100644 
debian/patches/0017-zfs-2.2.1-Disable-block-cloning-by-default.patch
 delete mode 100644 
debian/patches/0018-dnode_is_dirty-check-dnode-and-its-data-for-dirtines.patch

diff --git 
a/debian/patches/0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch 
b/debian/patches/0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
index b21a301f..c11c1ae8 100644
--- a/debian/patches/0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
+++ b/debian/patches/0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
@@ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht 
  rename man/{man1/arcstat.1 => man8/arcstat.8} (99%)
 
 diff --git a/man/Makefile.am b/man/Makefile.am
-index 36c1aede1..94fd96e58 100644
+index 45156571e..3713e9371 100644
 --- a/man/Makefile.am
 +++ b/man/Makefile.am
 @@ -2,7 +2,6 @@ dist_noinst_man_MANS = \
diff --git 
a/debian/patches/0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
 
b/debian/patches/0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
index fde0529a..f8cb3539 100644
--- 
a/debian/patches/0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
+++ 
b/debian/patches/0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
@@ -27,7 +27,7 @@ Signed-off-by: Thomas Lamprecht 
  2 files changed, 21 insertions(+), 21 deletions(-)
 
 diff --git a/cmd/arc_summary b/cmd/arc_summary
-index 426e02070..9de198150 100755
+index 9c69ec4f8..edf94ea2a 100755
 --- a/cmd/arc_summary
 +++ b/cmd/arc_summary
 @@ -655,13 +655,13 @@ def section_arc(kstats_dict):
diff --git 
a/debian/patches/0012-Fix-nfs_truncate_shares-without-etc-exports.d.patch 
b/debian/patches/0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch
similarity index 100%
rename from 
debian/patches/0012-Fix-nfs_truncate_shares-without-etc-exports.d.patch
rename to 
debian/patches/0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch
diff --git a/debian/patches/0010-zvol-Remove-broken-blk-mq-optimization.patch 
b/debian/patches/0010-zvol-Remove-broken-blk-mq-optimization.patch
deleted file mode 100644
index 178e68ee..
--- a/debian/patches/0010-zvol-Remove-broken-blk-mq-optimization.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From  Mon Sep 17 00:00:00 2001
-From: Tony Hutter 
-Date: Mon, 23 Oct 2023 14:45:06 -0700
-Subject: [PATCH] zvol: Remove broken blk-mq optimization
-
-This fix removes a dubious optimization in zfs_uiomove_bvec_rq()
-that saved the iterator contents of a rq_for_each_segment().  This
-optimization allowed restoring the "saved state" from a previous
-rq_for_each_segment() call on the same uio so that you wouldn't
-need to iterate though each bvec on every zfs_uiomove_bvec_rq() call.
-However, if the kernel is manipulating the requests/bios/bvecs under
-the covers between zfs_uiomove_bvec_rq() calls, then it could result
-in corruption from using the "saved state".  This optimization
-results in an unbootable system after installing an OS on a zvol
-with blk-mq enabled.
-
-Reviewed-by: Brian Behlendorf 
-Signed-off-by: Tony Hutter 
-Closes #15351
-(cherry picked from commit 7c9b6fed16ed5034fd1cdfdaedfad93dc97b1557)
-Signed-off-by: Stoiko Ivanov 

- include/os/linux/spl/sys/uio.h |  8 
- module/os/linux/zfs/zfs_uio.c  | 29 -
- 2 f

Re: [pve-devel] [RFC manager] api: replication: allow users to enumerate accessible replication jobs

2023-12-04 Thread Fabian Grünbichler
On December 1, 2023 2:24 pm, Lukas Wagner wrote:
> Previously, the /cluster/replication API handler would fail completely
> with a HTTP 403 if a user does have VM.Audit permissions for
> a single VM/CT. That was due to the 'noerr' parameter not set for
> $rpcenv->check()
> 
> Signed-off-by: Lukas Wagner 
> ---
> Not sure if this violates our API stability guarantees, so I'm sending
> this as an RFC in advance. If this change is problematic, we could 
> hide the new behavior behind an optional flag.
> 
> This change is necessary for retrieving a list of known job-ids for
> enhancements to the notification matching rule edit window.

this seems very much in line with how we treat other, similar list calls
for various entities, and was also likely what was originally intended
(the `next if !` doesn't make any sense otherwise, after all).

going from a likely too strict check that is accidentally erroring out,
to the proper check not erroring out is definitely not an API breaking
change - if somebody was relying on this to error out if the calling
user doesn't have access to all replicated VMs, then they are relying on
undocumented behaviour..

consider this

Reviewed-by: Fabian Grünbichler 

>  PVE/API2/ReplicationConfig.pm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
> index 8af62621..d0e8a49e 100644
> --- a/PVE/API2/ReplicationConfig.pm
> +++ b/PVE/API2/ReplicationConfig.pm
> @@ -20,7 +20,8 @@ __PACKAGE__->register_method ({
>  method => 'GET',
>  description => "List replication jobs.",
>  permissions => {
> - description => "Requires the VM.Audit permission on /vms/.",
> + description => "Will only return replication jobs for which the calling 
> user has"
> + . " VM.Audit permission on /vms/.",
>   user => 'all',
>  },
>  parameters => {
> @@ -47,7 +48,7 @@ __PACKAGE__->register_method ({
>   foreach my $id (sort keys %{$cfg->{ids}}) {
>   my $d = $cfg->{ids}->{$id};
>   my $vmid = $d->{guest};
> - next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ]);
> + next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ], 1);
>   $d->{id} = $id;
>   push @$res, $d;
>   }
> -- 
> 2.39.2
> 
> 
> 
> ___
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] [PATCH proxmox-i18n] use xgettext to extract translatable strings

2023-12-04 Thread Alexander Zeidler
>From a brief look at it:

I also think it's a good idea to provide more information for translators
(where it actually adds value and doesn't just bloat code).

> Cons:
> - In total 3 translations were marked as fuzzy. Translators will have to
>   review and mark them as translated again.
since ~12k translations are already marked as fuzzy ...

> - If using -c, gettext can't distinguish if the comment above is useful
>   for translators. The common practice is to add a `TRANSLATORS:` tag to
>   these comments.
There's also "-cTAG"

> + find . -iname "*.js" -path "./$(2)*" | xargs xgettext -c -s \
rather: -name


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] applied: [PATCH manager] ui: iso selector: fix disabling

2023-12-04 Thread Thomas Lamprecht
Am 04/12/2023 um 10:29 schrieb Fiona Ebner:
> Otherwise, it's impossible to add no or a physical CD to an existing
> VM.
> 
> Reported in the communiy forum:
> https://forum.proxmox.com/threads/136960/post-611704
> 
> Fixes: fc7b556d ("ui: refactor iso-selector out of the cd input panel")
> Signed-off-by: Fiona Ebner 
> ---
>  www/manager6/form/IsoSelector.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!

But reworded the commit message and subject, as this was a bit lacking
IMO.


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



[pve-devel] applied: [RFC manager] api: replication: allow users to enumerate accessible replication jobs

2023-12-04 Thread Thomas Lamprecht
Am 01/12/2023 um 14:24 schrieb Lukas Wagner:
> Previously, the /cluster/replication API handler would fail completely
> with a HTTP 403 if a user does have VM.Audit permissions for
> a single VM/CT. That was due to the 'noerr' parameter not set for
> $rpcenv->check()
> 
> Signed-off-by: Lukas Wagner 
> ---
> Not sure if this violates our API stability guarantees, so I'm sending
> this as an RFC in advance. If this change is problematic, we could 
> hide the new behavior behind an optional flag.
> 
> This change is necessary for retrieving a list of known job-ids for
> enhancements to the notification matching rule edit window.
> 
>  PVE/API2/ReplicationConfig.pm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
>

applied, with Fabian's R-b tag, thanks!


___
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel