[pve-devel] [PATCH arch-pacman] updated to 5.1.3-1

2019-08-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- Makefile | 2 +- debian/changelog | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 014851c..b58177c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE=arch-pacman -PACMANVER=5.1.2 +PACMANVER

[pve-devel] [RFC qemu-server] rewrite description for vm_config

2019-09-04 Thread Oguz Bektas
the description doesn't match the default behaviour, which is to replace the current values with pending ones in the returned config, unless the 'current' option is passed. Signed-off-by: Oguz Bektas --- i tried to come up with a reasonable description, but sending it as R

[pve-devel] [PATCH 0/2] code refactoring for lxc pending changes feature

2019-09-04 Thread Oguz Bektas
and vmconfig_hotplug_pending are left to be implemented in the respective Config classes, since there are different special cases between Qemu and LXC to be handled. pve-guest-common: Oguz Bektas (1): move pending changes related functions into AbstractConfig PVE/AbstractConfig.pm | 79

[pve-devel] [PATCH guest-common 1/2] move pending changes related functions into AbstractConfig

2019-09-04 Thread Oguz Bektas
some functions from Qemu w.r.t. pending changes can be moved to AbstractConfig, in order to make them available for both QemuConfig and LXC::Config. Signed-off-by: Oguz Bektas --- PVE/AbstractConfig.pm | 79 +++ 1 file changed, 79 insertions(+) diff

[pve-devel] [PATCH qemu-server 2/2] move pending changes related functions from QemuServer to QemuConfig

2019-09-04 Thread Oguz Bektas
we now inherit these from AbstractConfig, so they need to be defined/overwritten in QemuConfig instead of QemuServer. Signed-off-by: Oguz Bektas --- this patch requires my previous patch from pve-guest-common. everything should work the same as before when both patches are applied. PVE/API2

Re: [pve-devel] [RFC qemu-server] rewrite description for vm_config

2019-09-05 Thread Oguz Bektas
hi, On Thu, Sep 05, 2019 at 09:54:22AM +0200, Fabian Grünbichler wrote: > On September 4, 2019 3:59 pm, Oguz Bektas wrote: > > the description doesn't match the default behaviour, which is to replace > > the current values with pending ones in the returned config, unless the

Re: [pve-devel] [PATCH 0/2] code refactoring for lxc pending changes feature

2019-09-05 Thread Oguz Bektas
hi, On Thu, Sep 05, 2019 at 11:01:57AM +0200, Thomas Lamprecht wrote: > On 04.09.19 18:00, Oguz Bektas wrote: > > this patch series moves some pending changes related functions into > > AbstractConfig. the only thing that changes is that these are now class > > methods, >

[pve-devel] [PATCH container 3/9] adapt config PUT to use 'revert' and 'force' parameters

2019-09-05 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 13 + 1 file changed, 13 insertions(+) diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm index 6e67186..405a079 100644 --- a/src/PVE/API2/LXC/Config.pm +++ b/src/PVE/API2/LXC/Config.pm @@ -20,6 +20,8

[pve-devel] [PATCH container 2/9] adapt config GET call for taking pending changes

2019-09-05 Thread Oguz Bektas
the default behaviour is the same as in Qemu, so without the 'current' flag set, current values will be replaced with their respective pending counterparts. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 23 +++ 1 file changed, 23 insertions(+) diff -

[pve-devel] [PATCH container 6/9] add 'pct pending' command

2019-09-05 Thread Oguz Bektas
analog to 'qm pending', it shows a list of keys and values defined in configuration. cur: current change new: pending change del: pending delete Signed-off-by: Oguz Bektas --- src/PVE/CLI/pct.pm | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/PVE/

[pve-devel] [PATCH container 7/9] add vmconfig_hotplug_pending and vmconfig_apply_pending

2019-09-05 Thread Oguz Bektas
vmconfig_hotplug_pending is responsible for checking if a key in the pending section is hotpluggable, if yes; perform a generic config value replace or perform specific actions if a special case. vmconfig_apply_pending is only supposed to be called when ct isn't live. Signed-off-by: Oguz B

[pve-devel] [PATCH container 0/9] lxc pending changes

2019-09-05 Thread Oguz Bektas
e ct is running, memory.memsw.limit_in_bytes is set to infinite instead of zero. the other one is the --force implementation. Oguz Bektas (9): add pending section to lxc config parser/writer adapt config GET call for taking pending changes adapt config PUT to use 'revert' and 'force' parameters

[pve-devel] [PATCH container 1/9] add pending section to lxc config parser/writer

2019-09-05 Thread Oguz Bektas
allow parsing and writing of the pending changes section in CTID.conf files. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 9790345

[pve-devel] [PATCH container 8/9] rework update_pct_config to write and apply pending changes

2019-09-05 Thread Oguz Bektas
use vmconfig_hotplug_pending (when ct up) and vmconfig_apply_pending (when ct down) to apply or write pending changes. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 52 +- src/PVE/LXC/Config.pm | 328 + 2 files changed, 147 insertions

[pve-devel] [PATCH container 4/9] remove trailing whitespace

2019-09-05 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 6ddff9c..9ddaf58 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -35,7 +35,7 @@ BEGIN { __PACKAGE__

[pve-devel] [PATCH container 9/9] apply pending changes when container is started

2019-09-05 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/LXC.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 475d9be..9dd5bc9 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1939,6 +1939,13 @@ sub vm_start { close($fh); } +# apply pending

[pve-devel] [PATCH container 5/9] add 'pending' API method to LXC

2019-09-05 Thread Oguz Bektas
analog to Qemu, it returns an array of elements, which shows the current value, pending value, and delete requests. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 88 + 1 file changed, 88 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE

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

2019-09-05 Thread Oguz Bektas
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 ++-- www/manager6/lxc/Resources.js | 4 ++-- 3 files

Re: [pve-devel] [PATCH docs 3/9] Rewrite Translation

2019-09-10 Thread Oguz Bektas
hi, comments inline On Tue, Sep 10, 2019 at 11:22:00AM +0200, Aaron Lauterer wrote: > Polished phrasing > > Signed-off-by: Aaron Lauterer > --- > translation.adoc | 38 -- > 1 file changed, 20 insertions(+), 18 deletions(-) > > diff --git a/translation.ado

Re: [pve-devel] [PATCH docs 5/9] Rewrite System Requirements

2019-09-10 Thread Oguz Bektas
hi, On Tue, Sep 10, 2019 at 11:22:02AM +0200, Aaron Lauterer wrote: > Polished phrasing and restructured the requirements list a little bit > > Signed-off-by: Aaron Lauterer > --- > pve-system-requirements.adoc | 69 +++- > 1 file changed, 36 insertions(+), 33 de

[pve-devel] [PATCH container] fix issue where ttys aren't correctly set after restore

2019-09-10 Thread Oguz Bektas
uring restore. instead we call template_fixup by itself to fix the ttys on some distributions. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 26c4f88..738556b 100644 --- a/sr

Re: [pve-devel] [PATCH docs 4/9] Rewrite Installation

2019-09-10 Thread Oguz Bektas
hi, On Tue, Sep 10, 2019 at 11:22:01AM +0200, Aaron Lauterer wrote: > Polished phrasing, added mentions of the EULA and summary page in the > installer, unified style of cli commands. > > Signed-off-by: Aaron Lauterer > --- > pve-installation.adoc | 278 -

Re: [pve-devel] [PATCH docs 9/9] Rewrite System Software Updates

2019-09-10 Thread Oguz Bektas
hi, On Tue, Sep 10, 2019 at 11:22:06AM +0200, Aaron Lauterer wrote: > Polished phrasing and aligned cli command styling > > Signed-off-by: Aaron Lauterer > --- > system-software-updates.adoc | 25 ++--- > 1 file changed, 10 insertions(+), 15 deletions(-) > > diff --git a/sy

Re: [pve-devel] [PATCH docs 7/9] Rewrite Sysadmin

2019-09-10 Thread Oguz Bektas
hi, On Tue, Sep 10, 2019 at 11:22:04AM +0200, Aaron Lauterer wrote: > Polished phrasing > > Signed-off-by: Aaron Lauterer > --- > sysadmin.adoc | 40 +++- > 1 file changed, 15 insertions(+), 25 deletions(-) > > diff --git a/sysadmin.adoc b/sysadmin.adoc >

[pve-devel] [PATCH v2 container] fix issue where ttys aren't correctly set after restore

2019-09-13 Thread Oguz Bektas
l the hook with during the restore. instead we call template_fixup by itself to fix the ttys on some distributions. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 6ddff9c..dab959f 100644 ---

[pve-devel] [PATCH aab] added description to aab.conf for aplinfo

2019-09-20 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7712f6d..1fd888e 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ aab.conf: echo 'Source: http://archlinux.cu.be/$$repo/os/$$arch' >> aab.c

[pve-devel] [PATCH v2 aab] added description to aab.conf for aplinfo

2019-09-20 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7712f6d..80ba9b1 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ aab.conf: echo 'Maintainer: Proxmox Support Team ' >> aab.c

Re: [pve-devel] [PATCH aab] added description to aab.conf for aplinfo

2019-09-20 Thread Oguz Bektas
On Fri, Sep 20, 2019 at 12:56:11PM +0200, Thomas Lamprecht wrote: > On 20.09.19 12:53, Oguz Bektas wrote: > > Signed-off-by: Oguz Bektas > > --- > > Makefile | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/Makefile b/Makefile > > ind

[pve-devel] [PATCH container] don't duplicate lxc.idmap entries during restore

2019-09-24 Thread Oguz Bektas
art) Co-developed-by: Stefan Reiter Signed-off-by: Oguz Bektas --- src/PVE/LXC/Create.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm index a46a50c..4add540 100644 --- a/src/PVE/LXC/Create.pm +++ b/src/PVE/LXC/Create.pm @@ -186,

[pve-devel] [PATCH v2 container] don't duplicate lxc.idmap entries during restore

2019-09-25 Thread Oguz Bektas
art) Co-developed-by: Stefan Reiter Signed-off-by: Oguz Bektas --- src/PVE/LXC/Create.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm index a46a50c..8b2cfc9 100644 --- a/src/PVE/LXC/Create.pm +++ b/src/PVE/LXC/Create.pm @@ -186,

Re: [pve-devel] [PATCH v2 container] don't duplicate lxc.idmap entries during restore

2019-09-30 Thread Oguz Bektas
seems good to me. (note: maybe send in again as separate mail? had to edit the mail because commit message wasn't picked up right and apply with --ignore-whitespace) Tested-by: Oguz Bektas On Wed, Sep 25, 2019 at 02:37:32PM +0200, Fabian Grünbichler wrote: > On September 25, 2019 1:30

[pve-devel] [PATCH v2 guest-common 01/18] refactor pending changes related config code into AbstractConfig

2019-09-30 Thread Oguz Bektas
cleanup_pending Signed-off-by: Oguz Bektas --- PVE/AbstractConfig.pm | 68 +++ 1 file changed, 68 insertions(+) diff --git a/PVE/AbstractConfig.pm b/PVE/AbstractConfig.pm index e0d0f10..910ca86 100644 --- a/PVE/AbstractConfig.pm +++ b/PVE/AbstractConfig.pm

[pve-devel] [PATCH v2 qemu-server 06/18] refactor pending changes related code

2019-09-30 Thread Oguz Bektas
most of the pending changes related code has been moved into AbstractConfig, so we have to call them as class methods from QemuConfig instead. Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 14 - PVE/QemuServer.pm | 79 +-- 2 files

[pve-devel] [PATCH v2 qemu-server 05/18] use load_current_config for config GET call

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 35 +-- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 267a08e..aa1cd16 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -865,40 +865,7 @@ __PACKAGE__

[pve-devel] [PATCH v2 qemu-server 07/18] use format_pending from GuestHelpers for 'qm pending' command

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/CLI/qm.pm | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index 17935d0..2f1969a 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm @@ -898,33 +898,7 @@ our $cmddef

[pve-devel] [PATCH v2 00/18] lxc pending changes

2019-09-30 Thread Oguz Bektas
sks can still be removed directly. * some other small changes around helper functions, mainly adding them support for handling $conf->{pending} pve-container: Oguz Bektas (11): add lxc/pending API path add 'pct pending' adapt CT config parser for pending changes use load_cur

[pve-devel] [PATCH v2 qemu-server 04/18] overwrite load_current_config from AbstractConfig

2019-09-30 Thread Oguz Bektas
we overwrite the load_current_config method from AbstractConfig, in order to handle cipassword. Signed-off-by: Oguz Bektas --- PVE/QemuConfig.pm | 14 ++ 1 file changed, 14 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index edbf1a7..7f229b3 100644 --- a/PVE

[pve-devel] [PATCH v2 container 11/18] use load_current_config for config GET call

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm index 769fc3b..7eaef74 100644 --- a/src/PVE/API2/LXC/Config.pm +++ b/src/PVE/API2/LXC

[pve-devel] [PATCH v2 guest-common 02/18] refactor method used by config GET calls into AbstractConfig

2019-09-30 Thread Oguz Bektas
since this method will be both used by qemu and lxc config GET calls, it makes sense to move it into AbstractConfig. only difference is that qemu also hides the cipassword when it's set. this can be handled by having qemu overwrite the method and add the cipassword code. Signed-off-by:

[pve-devel] [PATCH v2 guest-common 03/18] refactor code from qm/pct 'pending' call into AbstractConfig

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/GuestHelpers.pm | 26 ++ 1 file changed, 26 insertions(+) diff --git a/PVE/GuestHelpers.pm b/PVE/GuestHelpers.pm index ebe2781..a16433f 100644 --- a/PVE/GuestHelpers.pm +++ b/PVE/GuestHelpers.pm @@ -60,4 +60,30 @@ sub exec_hookscript

[pve-devel] [PATCH v2 container 10/18] adapt CT config parser for pending changes

2019-09-30 Thread Oguz Bektas
be supported in PVE 7.0 Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 37 - 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 9790345..47bd4bb 100644 --- a/src/PVE/LXC/Config.pm +++ b/src

[pve-devel] [PATCH v2 container 08/18] add lxc/pending API path

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 88 + 1 file changed, 88 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 07280fb..9c040d1 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -515,6 +515,7

[pve-devel] [PATCH v2 container 09/18] add 'pct pending'

2019-09-30 Thread Oguz Bektas
same as 'qm pending', the code is shared via GuestHelpers Signed-off-by: Oguz Bektas --- src/PVE/CLI/pct.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm index 35ad72f..476f44d 100755 --- a/src/PVE/CLI/pct.pm +++ b/src/PVE/CLI/pct.pm @@

[pve-devel] [PATCH v2 container 12/18] skip pending changes while cloning

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 9c040d1..2cb9f9d 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -1441,6 +1441,7 @@ __PACKAGE__->register_met

[pve-devel] [PATCH v2 container 15/18] add revert parameter to config PUT

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 5 + 1 file changed, 5 insertions(+) diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm index 7eaef74..2c036f5 100644 --- a/src/PVE/API2/LXC/Config.pm +++ b/src/PVE/API2/LXC/Config.pm @@ -102,6 +102,11

[pve-devel] [PATCH v2 container 18/18] add vmconfig_hotplug_pending and vmconfig_apply_pending

2019-09-30 Thread Oguz Bektas
d-off-by: Oguz Bektas --- src/PVE/LXC.pm| 14 +-- src/PVE/LXC/Config.pm | 199 -- 2 files changed, 203 insertions(+), 10 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 65c41f5..f91e27d 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/L

[pve-devel] [PATCH v2 container 16/18] adapt config PUT method for the new update_pct_config

2019-09-30 Thread Oguz Bektas
we don't need to extract 'delete' here, instead we pass it all as $param and extract 'delete', 'revert' and most other things in update_pct_config Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 55 -- 1 file cha

[pve-devel] [PATCH v2 container 14/18] apply pending changes during container start

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/LXC.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 475d9be..65c41f5 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1930,6 +1930,13 @@ sub userns_command { sub vm_start { my ($vmid, $conf

[pve-devel] [PATCH v2 container 13/18] skip pending changes while taking backup

2019-09-30 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/VZDump/LXC.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm index ad5ecc8..2a6449c 100644 --- a/src/PVE/VZDump/LXC.pm +++ b/src/PVE/VZDump/LXC.pm @@ -288,6 +288,7 @@ sub assemble { delete $conf->{l

[pve-devel] [PATCH v2 container 17/18] rework update_pct_config to write into pending section

2019-09-30 Thread Oguz Bektas
use vmconfig_hotplug_pending or vmconfig_apply_pending to apply the pending changes, depending on whether the CT is on- or offline. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 334 ++ 1 file changed, 106 insertions(+), 228 deletions(-) diff

[pve-devel] [PATCH container 3/3] use snapshot_tree guest helper for pct listsnapshot

2019-10-01 Thread Oguz Bektas
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(-) diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm index 35ad72f..0dd6

[pve-devel] [PATCH qemu-server 2/3] use snapshot_tree guest helper for qm listsnapshot

2019-10-01 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/CLI/qm.pm | 53 +-- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index 17935d0..40571ce 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm @@ -933,58 +933,7 @@ our

[pve-devel] [PATCH guest-common 1/3] reformat code for snapshot tree into GuestHelpers

2019-10-01 Thread Oguz Bektas
qm/pct listsnapshot lack feature parity w.r.t. showing snapshots in a tree ordered by the date. by moving this code into GuestHelpers, it can be shared. Signed-off-by: Oguz Bektas --- PVE/GuestHelpers.pm | 54 + 1 file changed, 54 insertions(+) diff

Re: [pve-devel] [PATCH guest-common 1/3] reformat code for snapshot tree into GuestHelpers

2019-10-01 Thread Oguz Bektas
correction: s/reformat/refactor On Tue, Oct 01, 2019 at 09:32:45AM +0200, Oguz Bektas wrote: > qm/pct listsnapshot lack feature parity w.r.t. showing snapshots in a > tree ordered by the date. by moving this code into GuestHelpers, it can > be shared. > > Signed-off-by: Oguz Bekta

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

2019-10-02 Thread Oguz Bektas
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(-) diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm index 35ad72f..705a

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

2019-10-02 Thread Oguz Bektas
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(-) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index 17935d0..bc9e227 100755 --- a/PVE/CLI

Re: [pve-devel] [PATCH v2 guest-common 02/18] refactor method used by config GET calls into AbstractConfig

2019-10-03 Thread Oguz Bektas
hi, On Wed, Oct 02, 2019 at 01:49:23PM +0200, Fabian Grünbichler wrote: > On September 30, 2019 2:44 pm, Oguz Bektas wrote: > > since this method will be both used by qemu and lxc config GET calls, it > > makes sense to move it into AbstractConfig. only difference is that qemu >

Re: [pve-devel] [PATCH v2 container 16/18] adapt config PUT method for the new update_pct_config

2019-10-03 Thread Oguz Bektas
On Wed, Oct 02, 2019 at 01:52:58PM +0200, Fabian Grünbichler wrote: > On September 30, 2019 2:44 pm, Oguz Bektas wrote: > > we don't need to extract 'delete' here, instead we pass it all as $param > > and extract 'delete', 'revert' and most ot

[pve-devel] [PATCH v3 qemu-server 05/19] api: use shared methods in config GET

2019-10-14 Thread Oguz Bektas
in config GET call, we can now use the new shared methods from guest-common, namely load_current_config and load_snapshot_config. the correct method is called depending on the parameters 'current' or 'snapshot' Signed-off-by: Oguz Bektas --- P

[pve-devel] [PATCH v3 guest-common 03/19] helpers: add pending-aware guest config printer from qemu-server

2019-10-14 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- PVE/GuestHelpers.pm | 26 ++ 1 file changed, 26 insertions(+) diff --git a/PVE/GuestHelpers.pm b/PVE/GuestHelpers.pm index 35059e6..a36b9bc 100644 --- a/PVE/GuestHelpers.pm +++ b/PVE/GuestHelpers.pm @@ -116,4 +116,30 @@ sub

[pve-devel] [PATCH v3 guest-common 04/19] helpers: add method to represent config as a table

2019-10-14 Thread Oguz Bektas
in vm_pending API, this method is used to represent the configuration as a table with current, pending and delete columns. by adding it as a guesthelper, we can also use it for container pending changes. Signed-off-by: Oguz Bektas --- PVE/GuestHelpers.pm | 35

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

2019-10-14 Thread Oguz Bektas
i.e. namespacing snapshots, which i'll send in another patch) * add conf_table_with_pending guesthelper for the vm_pending API call * move back $param checks to lxc API call instead of update_pct_config * error handling for vmconfig_apply_pending pve-guest-common: Oguz Bektas (4): abstractcon

[pve-devel] [PATCH v3 guest-common 02/19] abstractconfig: add load_current_config and load_snapshot_config

2019-10-14 Thread Oguz Bektas
d for containers once they can do pending changes. Signed-off-by: Oguz Bektas --- PVE/AbstractConfig.pm | 40 1 file changed, 40 insertions(+) diff --git a/PVE/AbstractConfig.pm b/PVE/AbstractConfig.pm index 4dce08a..f1e66a1 100644 --- a/PVE/AbstractConf

[pve-devel] [PATCH v3 guest-common 01/19] abstractconfig: add pending changes related helpers

2019-10-14 Thread Oguz Bektas
anup_pending -> cleanup_pending parse_pending_delete now has a better representation of the force value, which is encoded in a perl hash i.e. $conf->{$opt}->{force} = 1 or 0 depending on if the string in config has '!' or not. Signed-off-by: Oguz Bektas

[pve-devel] [PATCH v3 qemu-server 07/19] cli: use guesthelper for pending

2019-10-14 Thread Oguz Bektas
use the shared format_pending method from guesthelpers Signed-off-by: Oguz Bektas --- PVE/CLI/qm.pm | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index 17935d0..2f1969a 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI

[pve-devel] [PATCH v3 qemu-server 08/19] api: use guesthelper method for vm_pending path

2019-10-14 Thread Oguz Bektas
we can use the shared conf_table_with_pending guesthelper to produce the config table with the extra delete and pending columns. Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 44 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/PVE

[pve-devel] [PATCH v3 container 09/19] adapt CT config parser for pending changes

2019-10-14 Thread Oguz Bektas
config parser can now read/write [pve:pending] section. this was named such, instead of [PENDING], after on- and offline discussion regarding namespacing the pending section and snapshots. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 23 +-- 1 file changed, 21

[pve-devel] [PATCH v3 container 13/19] skip pending changes while cloning

2019-10-14 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 6832f83..71eb110 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -1441,6 +1441,7 @@ __PACKAGE__->register_met

[pve-devel] [PATCH v3 container 14/19] skip pending changes while taking backup

2019-10-14 Thread Oguz Bektas
we can only clone the current state of container (without pending changes), as otherwise the on-disk state might not match the configuration. this also makes it more consistent to qemu-server behavior. Signed-off-by: Oguz Bektas --- src/PVE/VZDump/LXC.pm | 1 + 1 file changed, 1 insertion

[pve-devel] [PATCH v3 container 15/19] prepend underscores for is_volume_in_use helper

2019-10-14 Thread Oguz Bektas
this helper was defined twice, once as 'my $is_volume_in_use' sub and second as a helper sub. as our other helpers with a similar structure, it is better to prepend the variable sub with two underscores. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 8 1 file

[pve-devel] [PATCH v3 container 19/19] implement pending changes

2019-10-14 Thread Oguz Bektas
nning. the non-hotpluggable changes are left as pending changes. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 31 - src/PVE/LXC/Config.pm | 276 ++--- 2 files changed, 66 insertions(+), 241 deletions(-) diff --git a/src/PVE/API2/LXC/Config

[pve-devel] [PATCH v3 container 10/19] add lxc/pending API path

2019-10-14 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC.pm | 56 + 1 file changed, 56 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 28c9047..6832f83 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -515,6 +515,7

[pve-devel] [PATCH v3 container 18/19] apply pending changes during container start

2019-10-14 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/LXC.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index fa66aaf..6b5bd44 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1934,6 +1934,13 @@ sub userns_command { sub vm_start { my ($vmid, $conf

[pve-devel] [PATCH v3 container 17/19] add vmconfig_hotplug_pending and vmconfig_apply_pending

2019-10-14 Thread Oguz Bektas
d-off-by: Oguz Bektas --- src/PVE/LXC.pm| 14 ++- src/PVE/LXC/Config.pm | 211 ++ 2 files changed, 220 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 475d9be..fa66aaf 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/L

[pve-devel] [PATCH v3 container 16/19] allow to check for in-use volumes in pending section

2019-10-14 Thread Oguz Bektas
Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index da5ef03..f73da1e 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -1326,9 +1326,10 @@ sub

[pve-devel] [PATCH v3 container 11/19] add 'pct pending'

2019-10-14 Thread Oguz Bektas
same as 'qm pending', the code is shared via GuestHelpers Signed-off-by: Oguz Bektas --- src/PVE/CLI/pct.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm index 35ad72f..476f44d 100755 --- a/src/PVE/CLI/pct.pm +++ b/src/PVE/CLI/pct.pm @@

[pve-devel] [PATCH v3 container 12/19] api: config: use shared guesthelpers in GET call

2019-10-14 Thread Oguz Bektas
onfig. to decide which method to call, we look at the parameters. Signed-off-by: Oguz Bektas --- src/PVE/API2/LXC/Config.pm | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm index 769fc3b..41e75a8 1

[pve-devel] [PATCH v3 qemu-server 06/19] use new config helpers from guest-common for pending changes

2019-10-14 Thread Oguz Bektas
most of the pending changes related code has been moved into AbstractConfig, so we have to call them as class methods from QemuConfig instead. Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 14 - PVE/QemuServer.pm | 79 +-- 2 files

[pve-devel] [PATCH kernel-meta] fix #2403: exclude initrd entries from /proc/cmdline

2019-10-15 Thread Oguz Bektas
if we fallback to /proc/cmdline, it can include the booted initrd. to avoid loader entries with (sometimes even multiple) initrd lines, we have to parse them out. Signed-off-by: Oguz Bektas --- efiboot/zz-pve-efiboot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/efiboot

Re: [pve-devel] [PATCH kernel-meta] fix #2403: exclude initrd entries from /proc/cmdline

2019-10-15 Thread Oguz Bektas
On Tue, Oct 15, 2019 at 03:54:14PM +0200, Thomas Lamprecht wrote: > On 10/15/19 3:22 PM, Oguz Bektas wrote: > > if we fallback to /proc/cmdline, it can include the booted initrd. > > > > to avoid loader entries with (sometimes even multiple) initrd lines, > >

[pve-devel] [PATCH v2 kernel-meta] fix #2403: exclude initrd entries from /proc/cmdline

2019-10-15 Thread Oguz Bektas
if we fallback to /proc/cmdline, it can include the booted initrd. to avoid loader entries with initrd 'options' lines, we have to parse them out. Signed-off-by: Oguz Bektas --- efiboot/zz-pve-efiboot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/efiboot/zz-p

[pve-devel] [PATCH v3 kernel-meta] fix #2403: exclude initrd entries from /proc/cmdline

2019-10-16 Thread Oguz Bektas
if we fallback to /proc/cmdline, it can include the booted initrd. to avoid loader entries with initrd 'options' lines, we have to parse them out. Signed-off-by: Oguz Bektas --- v2->v3: * match forward slashes * match underscore * match zero or more whitespace at the end e

[pve-devel] [PATCH manager] gui: add revert button for lxc pending changes

2019-10-21 Thread Oguz Bektas
adds the pending button for Resources, Options and DNS screens. Signed-off-by: Oguz Bektas --- www/manager6/lxc/DNS.js | 39 +++-- www/manager6/lxc/Options.js | 54 +-- www/manager6/lxc/Resources.js | 31 +++- 3 files

Re: [pve-devel] [PATCH manager] gui: add revert button for lxc pending changes

2019-10-22 Thread Oguz Bektas
found a small typo. lmk if you want a v2, probably better after being reviewed > diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js > index 8b924a49..b31e101a 100644 > --- a/www/manager6/lxc/Resources.js > +++ b/www/manager6/lxc/Resources.js > @@ -215,6 +215,31 @@ Ext.defin

[pve-devel] [PATCH qemu-server 2/2] fix #2367: do not allow snapshot with name PENDING

2019-10-22 Thread Oguz Bektas
or any other variant of the word 'pending' note that we can actually allow this snapshot after PVE 7.0, since pending section and snapshots will be properly namespaced. ([pve:pending] and [snap:$snapname] or similar) Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 5 - 1 file

[pve-devel] [PATCH qemu-server 1/2] parser/writer: namespace pending section

2019-10-22 Thread Oguz Bektas
to make the pct/qemu config formats more similar, we can namespace the pending section using the 'pve:' prefix like in pct parser. the new format is optional in the parser, but default in the writer. with PVE 7.0, we can make it default in parser too. Signed-off-by: Oguz Bektas

Re: [pve-devel] [PATCH qemu-server 2/2] fix #2367: do not allow snapshot with name PENDING

2019-10-22 Thread Oguz Bektas
On Tue, Oct 22, 2019 at 12:15:35PM +0200, Stefan Reiter wrote: > On 10/22/19 12:12 PM, Oguz Bektas wrote: > > or any other variant of the word 'pending' > > > > note that we can actually allow this snapshot after PVE 7.0, since > > pending section and

[pve-devel] [PATCH qemu-server] use the proper pending delete format while looping

2019-10-22 Thread Oguz Bektas
fixes a bug where 'detach' caused disks to be destroyed immediately, because $force parameter was always true since hash is true. Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/Qem

[pve-devel] [PATCH container] use the proper pending delete format while looping

2019-10-22 Thread Oguz Bektas
format of pending_delete_hash is changed in guest-common, so we have to use the new format while looping over the hash. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm

[pve-devel] [PATCH container] iterate pending config changes sorted

2019-10-23 Thread Oguz Bektas
since we sort them while going through the delete hash, we can do it for the other loops for consistency. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index b744d4f

[pve-devel] [PATCH v2 qemu-server 2/2] fix #2367: do not allow snapshot with name PENDING

2019-10-24 Thread Oguz Bektas
or any other variant of the word 'pending'. note that we can actually allow this snapshot after PVE 7.0, since pending section and snapshots will be properly namespaced. ([pve:pending] and [snap:$snapname] or similar). Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 5 - 1 fi

[pve-devel] [PATCH v2 qemu-server 1/2] parser/writer: namespace pending section

2019-10-24 Thread Oguz Bektas
to make the pct/qemu config formats more similar, we can namespace the pending section using the 'pve:' prefix like in pct parser. the new format is optional in the parser, but default in the writer. with PVE 7.0, we can make it default in parser too. Signed-off-by: Oguz Bektas

[pve-devel] [PATCH container] add 'lock' as a fastplug option

2019-10-24 Thread Oguz Bektas
lock option needs to be fastpluggable when modifying with 'pct set'. otherwise it registers as a pending change. Signed-off-by: Oguz Bektas --- src/PVE/LXC/Config.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index b744d4f..d624

Re: [pve-devel] [PATCH container] add 'lock' as a fastplug option

2019-10-24 Thread Oguz Bektas
On Thu, Oct 24, 2019 at 05:12:20PM +0200, Thomas Lamprecht wrote: > On 10/24/19 3:58 PM, Oguz Bektas wrote: > > lock option needs to be fastpluggable when modifying with 'pct set'. > > otherwise it registers as a pending change. > > > possible stupid question

[pve-devel] [PATCH v2 manager] gui: add revert button for lxc pending changes

2019-10-28 Thread Oguz Bektas
adds the pending button for Resources, Options and DNS screens. Signed-off-by: Oguz Bektas --- v1 -> v2: * fix typo * use 'datachanged' to track the status of the buttons, however: for some reason it takes a while to refresh the status of the button, also same on the qemu side so t

[pve-devel] [PATCH qemu-server 3/4] hotplug_pending: remove redundant write/load config calls

2019-10-29 Thread Oguz Bektas
instead of writing the config after every change, we can do it once for all the changes at the end to avoid redundant i/o. we also don't need to load_config after writing fastplug changes. Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 9 ++--- 1 file changed, 2 insertions(

[pve-devel] [PATCH qemu-server 1/4] rename fast_plug_options and check them earlier in pending delete

2019-10-29 Thread Oguz Bektas
the global variable is now called QEMU_FASTPLUG_OPTIONS. we can also check them earlier during the pending delete loop to speed up the change. Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer.pm b

[pve-devel] [PATCH qemu-server 2/4] use more verbose message for hotplug errors

2019-10-29 Thread Oguz Bektas
also rename $add_error to $add_hotplug_error to differentiate between apply_error (for vmconfig_apply_pending) and hotplug_error Signed-off-by: Oguz Bektas --- PVE/QemuServer.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server 4/4] apply_pending: add error handling and remove redundant config calls

2019-10-29 Thread Oguz Bektas
* add $errors parameter and error handling code to vmconfig_apply_pending. * replace redundant write/load config calls with a single write_config at the end Signed-off-by: Oguz Bektas --- PVE/API2/Qemu.pm | 6 ++--- PVE/QemuServer.pm | 60 +-- 2

[pve-devel] [PATCH v3 manager] gui: add revert button for lxc pending changes

2019-10-29 Thread Oguz Bektas
adds the pending button for Resources, Options and DNS screens. Co-developed-by: Dominik Csapak Signed-off-by: Oguz Bektas --- v2->v3: * use getStore() instead of rstore while checking for datachanged, in light of Dominik's debugging (thanks!) * add missing startUpdate to DNS.js * remo

  1   2   3   4   5   >