[pve-devel] [PATCH manager 1/7] replace systemd timer with pvescheduler daemon

2021-10-07 Thread Dominik Csapak
From: Thomas Lamprecht The whole thing is already prepared for this, the systemd timer was just a fixed periodic timer with a frequency of one minute. And we just introduced it as the assumption was made that less memory usage would be generated with this approach, AFAIK. But logging 4+ lines ju

[pve-devel] [PATCH cluster 1/1] add 'jobs.cfg' to observed files

2021-10-07 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 1 + data/src/status.c | 1 + 2 files changed, 2 insertions(+) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index 4d09c60..ab8f713 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -45,6 +45,7 @@ my $dbbackupdir = "/

[pve-devel] [PATCH manager 2/7] postinst: use reload-or-restart instead of reload-or-try-restart

2021-10-07 Thread Dominik Csapak
the only difference is that reload-or-try-restart does not do anything if the service is not started already. on upgrade, we explicitely check if the service is enabled, and only then do this action. so it would now start daemons that were stopped but not disabled (which is not really valid state

[pve-devel] [PATCH cluster/manager] add scheduling daemon for pvesr + vzdump (and more)

2021-10-07 Thread Dominik Csapak
with this series, we implement a new daemon (pvescheduler) that takes over from pvesrs' systemd timer (original patch from thomas[0]) and extends it with a generic job handling mechanism then i convert the vzdump cron jobs to these jobs, the immediate gain is that users can use calendarevent sched

[pve-devel] [PATCH manager 5/7] pvescheduler: run jobs from jobs.cfg

2021-10-07 Thread Dominik Csapak
PVE/Jobs is responsible to decide if the job must run (e.g. with a schedule) Signed-off-by: Dominik Csapak --- PVE/Service/pvescheduler.pm | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/PVE/Service/pvescheduler.pm b/PVE/Service/pvescheduler.pm index ce55

[pve-devel] [PATCH manager 4/7] add PVE/Jobs to handle VZDump jobs

2021-10-07 Thread Dominik Csapak
this adds a SectionConfig handling for jobs (only 'vzdump' for now) that represents a job that will be handled by pvescheduler and a basic 'job-state' handling for reading/writing state json files this has some intersections with pvesrs state handling, but does not use a single state file for all

[pve-devel] [PATCH manager 6/7] api/backup: handle new vzdump jobs

2021-10-07 Thread Dominik Csapak
in addition to listing the vzdump.cron jobs, also list from the jobs.cfg file. updates/creations go into the new jobs.cfg only now and on update, starttime+dow get converted to a schedule this transformation is straight forward, since 'dow' is already in a compatible format (e.g. 'mon,tue') and we

[pve-devel] [PATCH manager 3/7] api/backup: refactor string for all days

2021-10-07 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- PVE/API2/Backup.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm index 3b343636..9dc3b48e 100644 --- a/PVE/API2/Backup.pm +++ b/PVE/API2/Backup.pm @@ -17,6 +17,8 @@ use PVE::VZDump::Common; us

[pve-devel] [PATCH manager 7/7] ui: dc/backup: show id+schedule instead of dow+starttime

2021-10-07 Thread Dominik Csapak
we can now show the id (since its not autogenerated anymore), and we can always show/edit the schedule instead of the dow+starttime also add an 'ID' field to the edit/create window and update the backupinfo window as well Signed-off-by: Dominik Csapak --- www/manager6/dc/Backup.js | 47

[pve-devel] applied: [PATCH manager 2/7] postinst: use reload-or-restart instead of reload-or-try-restart

2021-10-07 Thread Thomas Lamprecht
we normally use `d/` for changes to the debian/ folder, iow, packaging changes. On 07.10.21 10:27, Dominik Csapak wrote: > the only difference is that reload-or-try-restart does not > do anything if the service is not started already. > > on upgrade, we explicitely check if the service is enable

[pve-devel] [PATCH qemu-server v2 1/2] pci: add helpers to (un)reserve pciids for a vm

2021-10-07 Thread Dominik Csapak
saves a list of pciid <-> vmid mappings in /var/run that we can check when we start a vm if we're not given a pid but a timeout, we save the time when the reservation will run out (current time + timeout + 5s) since each vm start (until we can save the pid) varies from config to config Signed-off

[pve-devel] [PATCH qemu-server v2 0/2] fix #3258: check for in-use pci devices on vm start

2021-10-07 Thread Dominik Csapak
by having a vmid <-> pciid mapping in /var/run i did not check if the vm has the pci device really in the config, but we should not need that, since we remove the reservation again in the cleanup step and check the running pid anyway. changes from v1: * use time-based reservation before starting (

[pve-devel] [PATCH qemu-server v2 2/2] fix #3258: block vm start when pci device is already in use

2021-10-07 Thread Dominik Csapak
on vm start, we reserve all pciids that we use, and remove the reservation again in vm_stop_cleanup first with only a time-based reservation but after the vm is started, we reserve again but with the pid. for this, we have to move the start_timeout calculation above the hostpci handling. this wa

[pve-devel] [PATCH container 2/2] setup: also set contents of /etc/timezone

2021-10-07 Thread Fabian Ebner
Some distributions like CentOS 8 and Gentoo don't have the file, so only update if it already existed. A slight change in behavior in set_timezone is that the warning will now trigger if /etc/localtime is a link to $tz_path, but $tz_path does not exist. Previously, it would return early if the lin

[pve-devel] [PATCH container 1/2] setup: untaint path to host timezone

2021-10-07 Thread Fabian Ebner
To avoid an error with 'pct create ... --timezone host'. Reported in the community forum: https://forum.proxmox.com/threads/pct-create-command-with-timezone-host-option-fails-to-create-a-container.97538/ Signed-off-by: Fabian Ebner --- src/PVE/LXC/Setup.pm | 4 +++- 1 file changed, 3 insertions

Re: [pve-devel] [PATCH qemu-server v2 1/2] pci: add helpers to (un)reserve pciids for a vm

2021-10-07 Thread Thomas Lamprecht
On 07.10.21 11:37, Dominik Csapak wrote: > saves a list of pciid <-> vmid mappings in /var/run > that we can check when we start a vm > > if we're not given a pid but a timeout, we save the time when the > reservation will run out (current time + timeout + 5s) since each > vm start (until we can s

[pve-devel] applied: [PATCH container 1/2] setup: untaint path to host timezone

2021-10-07 Thread Thomas Lamprecht
On 07.10.21 12:48, Fabian Ebner wrote: > To avoid an error with 'pct create ... --timezone host'. > > Reported in the community forum: > https://forum.proxmox.com/threads/pct-create-command-with-timezone-host-option-fails-to-create-a-container.97538/ > > Signed-off-by: Fabian Ebner > --- > src/

[pve-devel] applied: [PATCH container 2/2] setup: also set contents of /etc/timezone

2021-10-07 Thread Thomas Lamprecht
On 07.10.21 12:48, Fabian Ebner wrote: > Some distributions like CentOS 8 and Gentoo don't have the file, so > only update if it already existed. > > A slight change in behavior in set_timezone is that the warning will > now trigger if /etc/localtime is a link to $tz_path, but $tz_path does > not

[pve-devel] applied: [PATCH docs 1/2] qm: add note about secure boot and new efidisk behaviour

2021-10-07 Thread Thomas Lamprecht
On 06.10.21 17:52, Stefan Reiter wrote: > Signed-off-by: Stefan Reiter > --- > qm.adoc | 30 -- > 1 file changed, 24 insertions(+), 6 deletions(-) > > applied, thanks! ___ pve-devel mailing list pve-devel@lists.proxmox.co

[pve-devel] applied: [PATCH docs 2/2] qm: add section about TPM

2021-10-07 Thread Thomas Lamprecht
On 06.10.21 17:52, Stefan Reiter wrote: > Signed-off-by: Stefan Reiter > --- > qm.adoc | 30 ++ > 1 file changed, 30 insertions(+) > > applied, thanks! ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.

[pve-devel] [PATCH manager] ui: storage/PBSEdit: add port field

2021-10-07 Thread Lorenz Stechauner
Signed-off-by: Lorenz Stechauner --- www/manager6/storage/PBSEdit.js | 7 +++ 1 file changed, 7 insertions(+) diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js index fcbc9548..0d7b8033 100644 --- a/www/manager6/storage/PBSEdit.js +++ b/www/manager6/storage/PBSEdi

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

2021-10-07 Thread Fabian Ebner
Am 28.09.21 um 15:07 schrieb 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 w

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

2021-10-07 Thread Fabian Ebner
Am 28.09.21 um 15:07 schrieb 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 delet

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

2021-10-07 Thread Fabian Ebner
Series looks good to me, except for a small nit. Reviewed-by: Fabian Ebner Am 28.09.21 um 15:07 schrieb Lorenz Stechauner: changes to v1: * adjusted preallocation api description * moved sub preallocation_cmd_option above `# Storage implementation` * updated PreallocationSelector to work with

Re: [pve-devel] [PATCH manager] ui: storage/PBSEdit: add port field

2021-10-07 Thread Thomas Lamprecht
there are a few ways to implement that and the commit message gives zero reasoning about the chosen one, I do not really like that... why not allowing one to enter it as suffix in the host field like we do in PBS for the remotes. An extra field is always distracting for newer users as it's yet

Re: [pve-devel] [PATCH manager] ui: storage/PBSEdit: add port field

2021-10-07 Thread Thomas Lamprecht
On 07.10.21 14:55, Thomas Lamprecht wrote: > there are a few ways to implement that and the commit message gives zero > reasoning > about the chosen one, I do not really like that... > > why not allowing one to enter it as suffix in the host field like we do in > PBS for > the remotes. > > An e

[pve-devel] [PATCH proxmox-acme] support downloading alternate chains

2021-10-07 Thread Fabian Grünbichler
the current default chains end with an expired root certificate for maximum compatibility with old Android versions. this breaks some other older clients (openssl, gnutls) which don't expect chains to contain any expired certificates, even if they are 'above' the trust anchor. setting $root will d

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

2021-10-07 Thread Thomas Lamprecht
On 06.10.21 11:18, Fabian Ebner wrote: > pve-storage: > > Fabian Ebner (6): > diskmanage: add change_parttype and is_partition helpers > diskmanage: wipe blockdev: also change partition type > diskmanage: don't set usage for unused partitions > api: disks: initgpt: explicitly abort for par

[pve-devel] [PATCH qemu-server v3 1/3] pci: refactor pci device preparation

2021-10-07 Thread Dominik Csapak
makes the vm start a bit less crowded Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 14 +- PVE/QemuServer/PCI.pm | 20 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e5175b3..f78b2cc 100644

[pve-devel] [PATCH qemu-server v3 2/3] pci: add helpers to (un)reserve pciids for a vm

2021-10-07 Thread Dominik Csapak
saves a list of pciid <-> vmid mappings in /var/run that we can check when we start a vm if we're not given a pid but a timeout, we save the time when the reservation will run out (current time + timeout + 5s) since each vm start (until we can save the pid) varies from config to config reserve_pc

[pve-devel] [PATCH qemu-server v3 3/3] fix #3258: block vm start when pci device is already in use

2021-10-07 Thread Dominik Csapak
on vm start, we reserve all pciids that we use, and remove the reservation again in vm_stop_cleanup first with only a time-based reservation but after the vm is started, we reserve again but with the pid. for this, we have to move the start_timeout calculation above the hostpci handling. also mo

[pve-devel] [PATCH qemu-server v3 0/3] fix #3258: check for in-use pci devices on vm start

2021-10-07 Thread Dominik Csapak
by having a vmid <-> pciid mapping in /var/run i did not check if the vm has the pci device really in the config, but we should not need that, since we remove the reservation again in the cleanup step and check the running pid anyway. notes: 1/3 is more or less independent, but made the code less

Re: [pve-devel] [PATCH proxmox-acme] support downloading alternate chains

2021-10-07 Thread Stoiko Ivanov
Huge Thanks for addressing this so fast! quickly tested it on a (publicly accessible) system of mine against Let's Encrypt official API (boulder) It works as advertised and fetches the (shorter) certificate chain without the signed ISRG X1 as intermediate (signed by DST Root CA X3) So this fixes