Re: [pve-devel] [PATCH v4 manager 2/2] fix #1291: add purge checkbox to VM/CT destroy dialog

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > Signed-off-by: Christian Ebner > --- > version 4: > * no changes since v3 > > www/manager6/window/SafeDestroy.js | 12 > 1 file changed, 12 insertions(+) > > diff --git a/www/manager6/window/SafeDestroy.js >

[pve-devel] applied: [PATCH manager] edit/show lxc pending changes in gui

2019-10-18 Thread Thomas Lamprecht
On 9/5/19 4:46 PM, Oguz Bektas wrote: > uses the new /pending and the adapted /config API endpoints > to get pending changes and show them in a PendingObjectGrid > > Signed-off-by: Oguz Bektas > --- > www/manager6/lxc/DNS.js | 11 +++ > www/manager6/lxc/Options.js | 4 ++-- >

[pve-devel] applied: [PATCH qemu-server] cloudinit: fix vm start hanging with disk on ZFS

2019-10-18 Thread Thomas Lamprecht
On 9/27/19 3:13 PM, Mira Limbeck wrote: > With the changes to pve-storage in commit 56362cf the startup hangs for > 5 minutes on ZFS if the cloudinit disk does not exist. Instead of > calling activate_volume followed by file_size_info we now call > volume_size_info. This should work reliably on

[pve-devel] applied: [PATCH v2 qemu-server] fix #2344: ignore cloudinit in replication check

2019-10-18 Thread Thomas Lamprecht
On 9/27/19 4:22 PM, Mira Limbeck wrote: > When adding a cloudinit disk it does not contain media=cdrom until it is > actually created. This means the check in check_replication fails to > detect cloudinit and it is recognized as normal disk. Then parse_volname > fails because it does not match the

Re: [pve-devel] [PATCH qemu-server] Fix #2390: Sort @ifaces array to avoid regeneration of instance-id

2019-10-18 Thread Thomas Lamprecht
On 9/30/19 8:43 AM, Dominik Csapak wrote: > hi, while this patch should work (did not test it), > this can be done better > > we could do something like: > > ---8<--- > for (my $id = 0; $id < MAX_NETS; $id++) { >     my $iface = "net$id"; >     next if !$conf->{$iface}; > --->8--- > > this way

[pve-devel] applied: [patch v4 container 1/1] fix #1291: add option purge for destroy_vm api call

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > When destroying a CT, we intentionally did not remove all related configs > such as > backup or replication jobs. > The intention of this flag is to allow the removal of such configs on destroy. > > Signed-off-by: Christian Ebner > --- > version 4:

Re: [pve-devel] [patch v4 qemu 1/1] fix #1291: add option purge for vm_destroy api call

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > When destroying a VM, we intentionally did not remove all related configs > such as > backup or replication jobs. > The intention of this flag is to allow the removal of such configs on destroy. > > Signed-off-by: Christian Ebner > --- > version 4:

[pve-devel] applied-series: [PATCH v3 00/19] lxc pending changes

2019-10-18 Thread Thomas Lamprecht
On 10/14/19 10:28 AM, Oguz Bektas wrote: > this patch series makes it possible to add/delete/revert pending changes > in the backend for containers. > > v2 -> v3: > * reorder and squash/split commits > * split load_current_config and load_snapshot_config > * use perl hash representation for the

[pve-devel] applied: [PATCH container 2/2] delete_mp: warn if we ignore a volume deletion due to wrong owner

2019-10-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- src/PVE/LXC.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 3921229..af6918a 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -731,7 +731,12 @@ sub delete_mountpoint_volume { return if

[pve-devel] applied: [PATCH container 1/2] fix #2412: ct destroy: only delete config after deleted from pools, fw

2019-10-18 Thread Thomas Lamprecht
commit message stolen from: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039594.html Between calling destroy_lxc_container and removing the ID from user.cfg (remove_vm_access) creating a new CT with this ID was possible. CTs could go missing from pools as a consequence. unlinking

[pve-devel] applied: [PATCH v2 container] use print_snapshot_tree guest helper for pct listsnapshot

2019-10-18 Thread Thomas Lamprecht
On 10/2/19 11:39 AM, Oguz Bektas wrote: > adds feature parity between qm/pct 'listsnapshot' w.r.t. showing > snapshot tree ordered by date. > > Signed-off-by: Oguz Bektas > --- > src/PVE/CLI/pct.pm | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) > applied, thanks!

[pve-devel] applied: [PATCH v2 qemu-server] use print_snapshot_tree guest helper for qm listsnapshot

2019-10-18 Thread Thomas Lamprecht
On 10/2/19 11:40 AM, Oguz Bektas wrote: > moved code to GuestHelpers for feature parity with pct > > Signed-off-by: Oguz Bektas > --- > PVE/CLI/qm.pm | 53 +-- > 1 file changed, 1 insertion(+), 52 deletions(-) > applied, thanks!

Re: [pve-devel] applied: [PATCH qemu-server 2/2] destroy_vm: use write_config from our Config module to set an "empty" config

2019-10-18 Thread Thomas Lamprecht
On 10/18/19 11:36 AM, Fabian Grünbichler wrote: >> @@ -2663,7 +2661,7 @@ sub destroy_vm { >> }); >> >> if ($keep_empty_config) { >> -PVE::Tools::file_set_contents($conffile, "memory: 128\n"); >> +PVE::QemuConfig->write_config($vmid, "memory: 128\n"); > shouldn't that be > >

Re: [pve-devel] applied: [PATCH qemu-server 2/2] destroy_vm: use write_config from our Config module to set an "empty" config

2019-10-18 Thread Fabian Grünbichler
On October 18, 2019 11:23 am, Thomas Lamprecht wrote: > brings us more in line with what we do in pve-container, also it's > good to not use file_set_contents directly if we have all those nice > wrapper interface methods to do things in a safe and guaranteed way. > > Signed-off-by: Thomas

Re: [pve-devel] [PATCH v2 manager] fix #2364: allow offline migration with local cloudinit disk

2019-10-18 Thread Tim Marx
looks ok for me too. > Thomas Lamprecht hat am 17. Oktober 2019 19:32 > geschrieben: > > > On 10/7/19 12:07 PM, Mira Limbeck wrote: > > As the cloudinit disk itself does not get copied on an offline > > migration, just the config, there's no conflict. Ignore the local > > cloudinit disk on

Re: [pve-devel] RFC for ACME DNS Challenge

2019-10-18 Thread Fabian Grünbichler
so this got a bit longer than expected - just a high-level feedback, I haven't actually tested anything yet since there are too many open general design questions for that to make sense. On October 14, 2019 1:08 pm, Wolfgang Link wrote: > This series also includes a new GIT repository on

Re: [pve-devel] [common 8/9] implement the teardown function for DNS challenge

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > --- > src/PVE/ACME/ACME_sh.pm | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/PVE/ACME/ACME_sh.pm b/src/PVE/ACME/ACME_sh.pm > index e60fd93..fc2881c 100644 > --- a/src/PVE/ACME/ACME_sh.pm > +++ b/src/PVE/ACME/ACME_sh.pm > @@

Re: [pve-devel] [common 7/9] implement the setup function for DNS challenge

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > --- > src/PVE/ACME/ACME_sh.pm | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/src/PVE/ACME/ACME_sh.pm b/src/PVE/ACME/ACME_sh.pm > index 40be772..e60fd93 100644 > --- a/src/PVE/ACME/ACME_sh.pm > +++

Re: [pve-devel] [common 6/9] command composer for acme.sh

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > This composer supports two different operations. > pve-setup: this operation adds the DNS TXT record. > pve-teardown: this operation removes the DNS TXT record > --- > src/PVE/ACME/ACME_sh.pm | 16 > 1 file changed, 16

Re: [pve-devel] [common 5/9] dynamically search for the DNS API credential file.

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > This function search for credential files. > The file must end with .cred and named as the API plugin. > The presumption is that every cluster uses the same DNS API credential file. > Also, only one credential file exists in the directory.

Re: [pve-devel] [manager 6/6] Add dns_api_config.

2019-10-18 Thread Fabian Grünbichler
I don't understand how this relates to #5 ? it's also seemingly not used anywhere? On October 14, 2019 1:08 pm, Wolfgang Link wrote: > The DNS challenge uses this parameter for API authentication. > --- > PVE/NodeConfig.pm | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git

Re: [pve-devel] [manager 3/6] refactor validating_url

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > The validating have to be done in the Plugin to be generic. NAK - this was already designed with plugins in mind? 1.) call plugin->setup() 2.) request validation by ACME server 3.) check validation status 4.) repeat 3 until OK or error 5.) call

Re: [pve-devel] [common 3/9] Add ACME_sh plugin

2019-10-18 Thread Fabian Grünbichler
why add a new, half-empty plugin instead of the full one? the whole file is < 100 lines if you remove the duplication with validating_url.. IMHO there are some commits that could be squashed here ;) On October 14, 2019 1:08 pm, Wolfgang Link wrote: > --- > src/Makefile| 1 + >

Re: [pve-devel] [common 4/9] refactor extract_callenge for code reuse.

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > --- > src/PVE/ACME.pm| 16 > src/PVE/ACME/StandAlone.pm | 9 + > 2 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/src/PVE/ACME.pm b/src/PVE/ACME.pm > index d6b6e99..173af69 100644 > ---

[pve-devel] applied: [PATCH qemu-server 2/2] destroy_vm: use write_config from our Config module to set an "empty" config

2019-10-18 Thread Thomas Lamprecht
brings us more in line with what we do in pve-container, also it's good to not use file_set_contents directly if we have all those nice wrapper interface methods to do things in a safe and guaranteed way. Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 4 +--- 1 file changed, 1

[pve-devel] applied: [PATCH qemu-server 1/2] followup: use new base config provided destroy_config method

2019-10-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 5 +++-- PVE/QemuServer.pm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 7e1d314..db436b3 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1498,8 +1498,9 @@

Re: [pve-devel] [common 2/9] refactor validating_url

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > --- > src/PVE/ACME.pm| 12 > src/PVE/ACME/Challenge.pm | 6 ++ > src/PVE/ACME/StandAlone.pm | 32 +++- > 3 files changed, 49 insertions(+), 1 deletion(-) > > diff --git

Re: [pve-devel] [common 1/9] Add dynamic plugin lookup for ACME

2019-10-18 Thread Fabian Grünbichler
note: the comment here is not just for this patch, but also references stuff that comes in later patches.. On October 14, 2019 1:08 pm, Wolfgang Link wrote: > The dynamic approach reduces failure if new plugins will included. > --- > src/PVE/ACME.pm| 4 >

Re: [pve-devel] [manager 1/6] Add plugin property for choosing different ACME modes.

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > With this property, different methods for ACME challenges are possible. > > At the moment we will only support HTTP-01 through StandAlone > and DNS-01 through ACME_sh Plugin. > --- > PVE/NodeConfig.pm | 7 +++ > 1 file changed, 7

Re: [pve-devel] [manager 2/6] Pass parameters for use in plugin.

2019-10-18 Thread Fabian Grünbichler
On October 14, 2019 1:08 pm, Wolfgang Link wrote: > The node config is required to determine the plugin > and possibly to pass plugin specific parameters. > --- > PVE/API2/ACME.pm | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/PVE/API2/ACME.pm b/PVE/API2/ACME.pm

Re: [pve-devel] [PATCH v4 manager 1/2] vzdump: move code needed for cfs register of vzdump.cron to guest-common

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > This removes the cfs register code for vzdump.cron, now located in > pve-guest-common. > It therefore relies on the corresponding patches in pve-guest-common > be6bd58a51f2bba931136595b93cb1ad41b0abdd > and pve-docs >

[pve-devel] applied: [PATCH v4 manager 1/2] vzdump: move code needed for cfs register of vzdump.cron to guest-common

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > This removes the cfs register code for vzdump.cron, now located in > pve-guest-common. > It therefore relies on the corresponding patches in pve-guest-common > be6bd58a51f2bba931136595b93cb1ad41b0abdd > and pve-docs >

[pve-devel] applied: [PATCH v4 pve-docs 1/1] gen vzdump: json_config_properties() moved from VZDump to VZDump::Common

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > Signed-off-by: Christian Ebner > --- > version 4: > * not present in v3 > > gen-vzdump.conf.5-opts.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gen-vzdump.conf.5-opts.pl b/gen-vzdump.conf.5-opts.pl > index

[pve-devel] applied: [PATCH guest-common] base guest config: add common destroy_config implementation

2019-10-18 Thread Thomas Lamprecht
copied over from pve-containers implementation with the same name. Signed-off-by: Thomas Lamprecht --- PVE/AbstractConfig.pm | 9 + 1 file changed, 9 insertions(+) diff --git a/PVE/AbstractConfig.pm b/PVE/AbstractConfig.pm index e0d0f10..26235fa 100644 --- a/PVE/AbstractConfig.pm +++

[pve-devel] applied: [PATCH v4 guest-common 1/2] vzdump: move registration of vzdump.cron from manager to guest-common to avoid cyclic dependency

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > The registration of the vzdump.cron file was handled in pve-manager. > By moving the relevant code to pve-guest-common, cyclic dependencies > for cfs registration are avoided. > This makes this patch of guest-common a build dependency for the other >

[pve-devel] applied: [PATCH v4 guest-common 2/2] fix #1291: implement remove_vmid_from_backup_jobs

2019-10-18 Thread Thomas Lamprecht
On 10/15/19 1:00 PM, Christian Ebner wrote: > remove_vmid_from_backup_jobs updates the vzdump.cron backup jobs, > excluding the given vmid. > > Signed-off-by: Christian Ebner > --- > version 4: > * VZDump::Common cfs registers vzdump.cron instead of PVE::VZDump > > PVE/VZDump/Plugin.pm |