[pve-devel] applied: [RFC PATCH 2/2] add ver get parameter for js/css files to improve cache behaviour

2017-11-06 Thread Wolfgang Bumiller
applied On Wed, Aug 09, 2017 at 02:08:26PM +0200, Dominik Csapak wrote: > we do not set an Expire header for our js files, and certain browsers > do not even make the request then (on which we would answer > with a correct 304 not modified) > > so to force the browser to load a new version of the

[pve-devel] applied: [RFC PATCH 1/2] do not use PVE::API2 in spiceproxy.pm

2017-11-06 Thread Wolfgang Bumiller
On Thu, Aug 10, 2017 at 09:34:00AM +0200, Fabian Grünbichler wrote: > On Wed, Aug 09, 2017 at 06:17:20PM +0200, Dietmar Maurer wrote: > > Looks quite strange to me, because PVE::HTTPServer calls: > > > > PVE::API2->find_handler > > > > so we should use PVE::API2 in PVE::HTTPServer? > > > > Not

[pve-devel] applied: [PATCH qemu-server] update ostype documentation

2017-11-06 Thread Wolfgang Bumiller
applied On Tue, Nov 07, 2017 at 08:27:37AM +0100, Thomas Lamprecht wrote: > Signed-off-by: Thomas Lamprecht > --- > PVE/QemuServer.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index 321c9f6..4586a3d 100644 > --- a/PVE/Qemu

[pve-devel] applied: [PATCH qemu-server v2] include format for efidisk

2017-11-06 Thread Wolfgang Bumiller
applied On Tue, Nov 07, 2017 at 08:18:56AM +0100, Dominik Csapak wrote: > if the efidisk is in 'raw' format, qemu will prevent writes > on block zero if the format is not explicitely given > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * make sure $format is not undefined > PVE/Qe

[pve-devel] [PATCH qemu-server] update ostype documentation

2017-11-06 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 321c9f6..4586a3d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -281,7 +281,8 @@ w2k3;; Microsoft Windows 2003 w2k8;;

[pve-devel] [PATCH qemu-server v2] include format for efidisk

2017-11-06 Thread Dominik Csapak
if the efidisk is in 'raw' format, qemu will prevent writes on block zero if the format is not explicitely given Signed-off-by: Dominik Csapak --- changes from v1: * make sure $format is not undefined PVE/QemuServer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/Qe

Re: [pve-devel] [PATCH qemu-server] include format for efidisk

2017-11-06 Thread Wolfgang Bumiller
On Fri, Nov 03, 2017 at 02:58:41PM +0100, Dominik Csapak wrote: > if the efidisk is in 'raw' format, qemu will prevent writes > on block zero if the format is not explicitely given > > Signed-off-by: Dominik Csapak > --- > PVE/QemuServer.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion

Re: [pve-devel] [RFC PATCH 2/2] add ver get parameter for js/css files to improve cache behaviour

2017-11-06 Thread Thomas Lamprecht
On 08/09/2017 02:08 PM, Dominik Csapak wrote: > we do not set an Expire header for our js files, and certain browsers > do not even make the request then (on which we would answer > with a correct 304 not modified) > > so to force the browser to load a new version of the gui when we change > somet

Re: [pve-devel] [PATCH qemu-server] include format for efidisk

2017-11-06 Thread Thomas Lamprecht
On 11/03/2017 02:58 PM, Dominik Csapak wrote: > if the efidisk is in 'raw' format, qemu will prevent writes > on block zero if the format is not explicitely given > > Signed-off-by: Dominik Csapak > --- > PVE/QemuServer.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --gi

[pve-devel] [PATCH qemu-server v3] implement 'edit' command for qm

2017-11-06 Thread Dominik Csapak
edit the vm config via PVE::Tools::edit_file minus the snapshot sections (we do not want to update those manually) Signed-off-by: Dominik Csapak --- changes since v2: * use PVE::Tools::edit_file * do not remove pending section, as one might want to edit that directly * use correct completion help

[pve-devel] [PATCH container v2] implement 'edit' command for pct

2017-11-06 Thread Dominik Csapak
this opens the container config file via PVE::Tools::edit_file, minus the snapshot section Signed-off-by: Dominik Csapak --- changes since v1: * open temp file instead of real file * warn and die when digest is different on write than on read * use PVE::Tools::edit_file src/PVE/CLI/pct.pm | 60 +

[pve-devel] [PATCH] implement pct/qm edit

2017-11-06 Thread Dominik Csapak
this series implements pct/qm edit incorporated the feedback from thomas from qemu-servers v2 and includes a new version for pct now the editing deleting part is done in a wrapper in PVE::Tools so that we can reuse that logic [PATCH common] add edit_file subroutine [PATCH container v2] implement

[pve-devel] [PATCH common] add edit_file subroutine

2017-11-06 Thread Dominik Csapak
this is a wrapper for editing a file via a temporary file in /run/pve-edit.tmp.PID with the editor set with update-alternatives (/usr/bin/editor) Signed-off-by: Dominik Csapak --- src/PVE/Tools.pm | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/PVE/To

[pve-devel] [RFC common 7/9] cli: allow specifying sub commands through $cmddef

2017-11-06 Thread Thomas Lamprecht
allow to use sub commands alá # pveum user add The new resolve_cmd traverses $cmddef, resolves one level of aliases and returns the respective sub command, its cmddef, arguments and if it was expanded (e.g., pveum u d ... => pveum user delete ...) which allows quite easy integration in the usage/

[pve-devel] [RFC common 5/9] cli: factor out abort

2017-11-06 Thread Thomas Lamprecht
will be reused in later patches too --- src/PVE/CLIHandler.pm | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 311cc69..4e3342f 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -20,6 +

[pve-devel] [RFC common 6/9] cli: factor out generate usage string

2017-11-06 Thread Thomas Lamprecht
reduce code reuse and prepare for sub commands --- src/PVE/CLIHandler.pm | 137 -- 1 file changed, 76 insertions(+), 61 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 4e3342f..64a35c1 100644 --- a/src/PVE/CLIHandler.pm

[pve-devel] [RFC common 8/9] cli: allow to pass sub commands to help as array

2017-11-06 Thread Thomas Lamprecht
Improves usabillity by allowing to pass a sub command unquoted to the help command, e.g.: # pveum help user delete without this only a quoted version worked, e.g.: # pveum help "user delete" --- src/PVE/CLIHandler.pm | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --

[pve-devel] [RFC common 9/9] cli: document $cmddef structure

2017-11-06 Thread Thomas Lamprecht
--- src/PVE/CLIHandler.pm | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 5111b7a..a771e40 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -10,6 +10,28 @@ use PVE::INotify; use base qw(PVE::RESTHan

[pve-devel] [RFC common 1/9] cli: refactor and use $cmddef directly

2017-11-06 Thread Thomas Lamprecht
passing one param less to the helper methods --- src/PVE/CLIHandler.pm | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 73e8ee6..29a7f57 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandle

[pve-devel] [RFC common 3/9] cli: refactor comand name helper

2017-11-06 Thread Thomas Lamprecht
use shorter and also a bit faster methods to expand and get comand names --- src/PVE/CLIHandler.pm | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index c787ac4..ab1440c 100644 --- a/src/PVE/CLIHandler.pm

[pve-devel] [RFC common 4/9] cli: refactor print_bash_completion

2017-11-06 Thread Thomas Lamprecht
move variables nearer to where they actually used. drop program name early from argv array drop unnecessary variables --- src/PVE/CLIHandler.pm | 39 +++ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.p

[pve-devel] [RFC common 2/9] cli: factor out initialisation check

2017-11-06 Thread Thomas Lamprecht
--- src/PVE/CLIHandler.pm | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 29a7f57..c787ac4 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -14,6 +14,12 @@ my $cmddef; my $exename; my $cli_

[pve-devel] [RFC common 0/9] respinned: sub command for CLI helper

2017-11-06 Thread Thomas Lamprecht
I picked up Philips sub command patch, tried to split it up in digestible chunks, refactored a few things and tried to address the open comments from my last review where this series was still owned by Philip. I'm at the point where I a looked at the code a bit to long without getting inspiration t

Re: [pve-devel] [PATCH qemu-server v2] implement 'edit' command for qm

2017-11-06 Thread Thomas Lamprecht
On 10/30/2017 01:52 PM, Dominik Csapak wrote: > edit the vm config via /usr/bin/editor (this can be set via > update-alternatives) minus the pending and snapshot sections (we do not > want to update those manually) > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * use a tmpfile in /r

Re: [pve-devel] [RFC PATCH 2/2] add ver get parameter for js/css files to improve cache behaviour

2017-11-06 Thread Dominik Csapak
any comments? i believe this will vastly improve the cache behavior of the gui, so it i would be a shame if this does not get applied in one form or another ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/l

[pve-devel] Using zstd for backup

2017-11-06 Thread Oliver Jaksch
Some users, including me, are discussing about the possibilities to extend the backup routines to offer more compression programs: https://forum.proxmox.com/threads/suggestion-add-lrzip-to-backup-compression-options.29496 I've made a small set of patches to be able to use zstd (https://github.co

[pve-devel] [PATCH cluster v2 3/3] cfs_lock: save and restore outer alarm

2017-11-06 Thread Thomas Lamprecht
allow our caller to set alarm on us. Ensure that the new alarm sub gets assigned before the new alarm gets set. --- new in v2 maybe there should be even: alarm(0) local $SIG{ALRM} = sub {...}; alarm(60); to ensure we always call the matching alarm sub, but as this is not a likely nor big prob

[pve-devel] [PATCH cluster v2 1/3] cfs_lock: swap checks for specific errors with $got_lock

2017-11-06 Thread Thomas Lamprecht
We checked if a specific error was set or, respectively, not set to know if we got the lock or not. The check if we may unlock again was negated and thus could lead to problems, in specific - rather unlikely - cases. Add a $got_lock variable which only gets set when we really got the lock, this is

[pve-devel] [PATCH cluster v2 2/3] cfs_lock: include lockid in timeout error

2017-11-06 Thread Thomas Lamprecht
helps debugging --- new in v2 data/PVE/Cluster.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index f0708a0..f634c84 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -878,8 +878,7 @@ my $cfs_lock = sub {

[pve-devel] [PATCH cluster] cfs_lock: fix error handling for lock aquistion

2017-11-06 Thread Thomas Lamprecht
We checked if a specific error was set or, respectively, not set to know if we got the lock or not. The check if we may unlock again was negated and thus could lead to problems, in specific - rather unlikely - cases. Add a $got_lock variable which only gets set when we really got the lock, this is

Re: [pve-devel] [PATCH cluster 1/3] check correct error before releasing lock in cfs_lock

2017-11-06 Thread Thomas Lamprecht
On 11/02/2017 02:22 PM, Dominik Csapak wrote: > after finishing the code in cfs_lock, we want to release the lock only > when we got it before, so we need to check the correct lock > > Signed-off-by: Dominik Csapak > --- > note: better would be a different approach than parsing the > error messag