Re: [pve-devel] appllied: [PATCH] read firstline: only map ENOENT to undef, raise error otherwise

2023-06-12 Thread Thomas Lamprecht
Am 13/06/2023 um 07:27 schrieb Dietmar Maurer: >> One could argue that the case for not existent should return undef, >> while an empty file should return an empty string, but for that we >> might want to check all use-sites first. > > AFAIR I use this function many times assuming that it does not

Re: [pve-devel] appllied: [PATCH] read firstline: only map ENOENT to undef, raise error otherwise

2023-06-12 Thread Dietmar Maurer
> One could argue that the case for not existent should return undef, > while an empty file should return an empty string, but for that we > might want to check all use-sites first. AFAIR I use this function many times assuming that it does not throw errors in case of empty files. That is quite c

[pve-devel] appllied: [PATCH] read firstline: only map ENOENT to undef, raise error otherwise

2023-06-12 Thread Thomas Lamprecht
Errors like permission denied or I/O ones should bubble up, otherwise it might hide serious issues and seemingly continue to work, with a wrong state or the like. One could argue that the case for not existent should return undef, while an empty file should return an empty string, but for that we

[pve-devel] [PATCH pve-network 0/2] fix zones status

2023-06-12 Thread Alexandre Derumier
fix reported bug by Fabian https://lists.proxmox.com/pipermail/pve-devel/2023-June/057433.html Alexandre Derumier (2): zones: fix status zones: status: add a special message if vnet is not generated src/PVE/Network/SDN/Zones.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[pve-devel] [PATCH pve-network 1/2] zones: fix status

2023-06-12 Thread Alexandre Derumier
Vnets were wrongly displayed in the main tree because of this, and error was not set on zone Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Zones.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Zones.pm b/src/PVE/Network/SDN/Zones.pm index f8

[pve-devel] [PATCH pve-network 2/2] zones: status: add a special message if vnet is not generated

2023-06-12 Thread Alexandre Derumier
if vnet has not been generated (this should never happend) warn the user to check if "source /etc/network/interfaces.d/sdn' exist Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Zones.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Zones.

[pve-devel] applied-series: [PATCH-SERIES v6 qemu-server/manager] add and set x86-64-v2-AES as default model for new vms

2023-06-12 Thread Fiona Ebner
Am 08.06.23 um 11:51 schrieb Alexandre Derumier: > > Hi, > > we used kvm64 as default cpumodel since the begin of proxmox. (basically, > it's like a pentium4 cpu flags). > > New distros like rhel9 are compiled to use more modern cpu flags. > (and windows already use new flags since year, and we

Re: [pve-devel] applied: [PATCH pve-network] fix permissions && use new /sdn/zones// path

2023-06-12 Thread DERUMIER, Alexandre
Le lundi 12 juin 2023 à 16:36 +0200, Fabian Grünbichler a écrit : > one more thing I realized while testing that might be worthy of a > follow > up - if you configure SDN, but for some reason, your > /etc/network/interfaces is missing the "source .." line, the error > handling behaviour is very str

[pve-devel] [PATCH v2 ha-manager 1/2] tests: simulate stale maintainance node caused by simultaneous cluster shutdown

2023-06-12 Thread Fiona Ebner
In the test log, it can be seen that the service will unexpectedly be migrated back. This is caused by the service's maintainance node property being set by the initial shutdown, but never cleared, because that currently happens only when the service is started on a different node. The next commit

[pve-devel] [PATCH v2 ha-manager 2/2] manager: clear stale maintenance node caused by simultaneous cluster shutdown

2023-06-12 Thread Fiona Ebner
Currently, the maintenance node for a service is only cleared when the service is started on another node. In the edge case of a simultaneous cluster shutdown however, it might be that the service never was started anywhere else after the maintenance node was recorded, because the other nodes were

[pve-devel] applied: [PATCH manager stable-7] pve7to8: add check for nvidia-vgpu-mgr

2023-06-12 Thread Thomas Lamprecht
Am 12/06/2023 um 12:00 schrieb Dominik Csapak: > Currently the nvidia vgpu host driver (15.2) does not support kernels > > 6.0 and thus will not work with bookworm based releases for now. > > Fail when the service is running, and warn if it only exists, but is > disabled/stopped (in case a user in

Re: [pve-devel] [PATCH qemu-server] fix #4549: capture and bubble up qemu errors correctly

2023-06-12 Thread Thomas Lamprecht
Am 12/06/2023 um 13:22 schrieb Fiona Ebner: > Am 09.05.23 um 10:46 schrieb Christoph Heiss: >> @@ -5922,13 +5916,19 @@ sub vm_start_nolock { >> $tpmpid = start_swtpm($storecfg, $vmid, $tpm, $migratedfrom); >> } >> >> +# '\r\n' needs to be used as a line separator her

[pve-devel] applied: [PATCH v2 manager] pve7to8: Improve systemd unified cgroupv2 support check

2023-06-12 Thread Thomas Lamprecht
Am 12/06/2023 um 12:31 schrieb Christian Ebner: > Checking /lib/systemd if it is present and a directory is not enough, as > the shared object file used to check the version might nevertheless be > located at /usr/lib/systemd, or under /usr/lib/x86_64-linux-gnu/systemd. > So check also the latter p

[pve-devel] applied-series: [PATCH-SERIE pve-access-control/pve-manager/pve-guest-common/qemu-server/pve-network] check permissions on local bridge

2023-06-12 Thread Fabian Grünbichler
applied the pve-manager and pve-network patches (and your pve-network follow-up, plus some fixes of my own). some more things that might be worthy of a follow-up: - for the ACL panel of a zone, also displaying the vnet + vlan ACLs might be nice - for the ACL panel fo a vnet, also displaying zone

[pve-devel] applied: [PATCH pve-network] fix permissions && use new /sdn/zones// path

2023-06-12 Thread Fabian Grünbichler
one more thing I realized while testing that might be worthy of a follow up - if you configure SDN, but for some reason, your /etc/network/interfaces is missing the "source .." line, the error handling behaviour is very strange: - vnets are displayed in the resource tree next to zones - no proper i

[pve-devel] [PATCH v2 storage] api: config: add/update storage: check for type mismatch first

2023-06-12 Thread Fiona Ebner
This avoids confusing errors about other properties when the storage type doesn't match. By highlighting that the type doesn't match, users should know right away what the issue is. Signed-off-by: Fiona Ebner --- Changes in v2: * Avoid unshift, prepend type directly to loop list. src/PVE/A

[pve-devel] [PATCH manager 1/3] ui: realm sync edit: improve ux when there is no ldap/ad realm

2023-06-12 Thread Dominik Csapak
by adding an empty text to the dropdown, and disabling the other possibly invalid fields, so that it's clear why the panel is invalid as soon as there is an ldap/ad realm, it gets autoselected anyway and the fields get re-enabled. Signed-off-by: Dominik Csapak --- www/manager6/dc/RealmSyncJob.j

[pve-devel] [PATCH manager 3/3] ui: realm: move sync job panel into realm panel

2023-06-12 Thread Dominik Csapak
and make it collapsible, so that users can hide it if they're not interested in it Signed-off-by: Dominik Csapak --- www/manager6/dc/AuthView.js | 2 +- www/manager6/dc/Config.js | 28 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/www/manager6/dc

[pve-devel] [PATCH manager 2/3] ui: realm sync: change enabled column rendering

2023-06-12 Thread Dominik Csapak
to make it consistent with the repositories ui, since having a checkbox that is not clickable is confusing Signed-off-by: Dominik Csapak --- www/manager6/dc/RealmSyncJob.js | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/manager6/dc/RealmSyncJob.js b/www/manager6

[pve-devel] [PATCH manager 0/3] improve ui for reaml sync jobs

2023-06-12 Thread Dominik Csapak
by implementing @thomas suggestions. The only thing not done for now is a 'run now' button, but for that we either have to create a new api call, or change the existing 'sync' call to read the job config with an extra parameter (i'd lean to do the latter) Dominik Csapak (3): ui: realm sync edit

Re: [pve-devel] [PATCH qemu-server] fix #4549: capture and bubble up qemu errors correctly

2023-06-12 Thread Fiona Ebner
Am 12.06.23 um 13:22 schrieb Fiona Ebner: > Am 09.05.23 um 10:46 schrieb Christoph Heiss: >> +my $err = ''; >> +$run_params{logfunc} = sub { $err .= "QEMU: $1\r\n"; }; > > Style nit: please use $run_params->{logfunc} Please ignore me here, didn't realize it wasn't a hash reference

Re: [pve-devel] [PATCH qemu-server] fix #4549: capture and bubble up qemu errors correctly

2023-06-12 Thread Fiona Ebner
Am 09.05.23 um 10:46 schrieb Christoph Heiss: > @@ -5922,13 +5916,19 @@ sub vm_start_nolock { > $tpmpid = start_swtpm($storecfg, $vmid, $tpm, $migratedfrom); > } > > + # '\r\n' needs to be used as a line separator here, as that is what > run_command() splits > +

[pve-devel] [PATCH v2 manager] pve7to8: Improve systemd unified cgroupv2 support check

2023-06-12 Thread Christian Ebner
Checking /lib/systemd if it is present and a directory is not enough, as the shared object file used to check the version might nevertheless be located at /usr/lib/systemd, or under /usr/lib/x86_64-linux-gnu/systemd. So check also the latter paths, if the former returned no match. Further, Arch Li

Re: [pve-devel] [PATCH] pve7to8: Improve systemd unified cgroupv2 support check

2023-06-12 Thread Christian Ebner
Ignore this one, it is still incomplete as Debian 12 stores the shared object at /usr/lib/x86_64-linux-gnu/systemd. Will include that too and send a v2. > On 12.06.2023 12:06 CEST Christian Ebner wrote: > > > Checking /lib/systemd if it is present and a directory is not enough, as > the share

[pve-devel] [PATCH] pve7to8: Improve systemd unified cgroupv2 support check

2023-06-12 Thread Christian Ebner
Checking /lib/systemd if it is present and a directory is not enough, as the shared object file used to check the version might nevertheless be located at /usr/lib/systemd. So check also the latter, if the former returned no match. Further, Arch Linux appends the minor version and release version

[pve-devel] [PATCH manager stable-7] pve7to8: add check for nvidia-vgpu-mgr

2023-06-12 Thread Dominik Csapak
Currently the nvidia vgpu host driver (15.2) does not support kernels > 6.0 and thus will not work with bookworm based releases for now. Fail when the service is running, and warn if it only exists, but is disabled/stopped (in case a user installed it sometime but did not need it and disabled it).