[pve-devel] [PATCH common v6 0/3] CLI: Sub-commands and aliases

2017-10-17 Thread Philip Abernethy
/listinfo/pve-devel Philip Abernethy (3): cli: code cleanup cli: whitespace cleanup cli: prepare CLIHandler for handling sub-commands src/PVE/CLIHandler.pm | 379 +- 1 file changed, 253 insertions(+), 126 deletions(-) -- 2.11.0

[pve-devel] [PATCH common v6 1/3] cli: code cleanup

2017-10-17 Thread Philip Abernethy
Removes obsolete subroutine and unused Dumper --- src/PVE/CLIHandler.pm | 24 1 file changed, 24 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index e61fa6a..0c48335 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -2,7 +2,6 @@

[pve-devel] [PATCH common v6 3/3] cli: prepare CLIHandler for handling sub-commands

2017-10-17 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd and

[pve-devel] [PATCH common v6 2/3] cli: whitespace cleanup

2017-10-17 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 0c48335..73e8ee6 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -48,12 +48,12 @@ my $complete_command_names = sub { };

[pve-devel] [PATCH common v5 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-16 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd and

[pve-devel] [PATCH common v2 4/4] Remove deprecated run_cli subroutine

2017-10-16 Thread Philip Abernethy
--- v2: Corrects commit msg src/PVE/CLIHandler.pm | 11 --- 1 file changed, 11 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index e61fa6a..77c71a4 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -472,17 +472,6 @@ my $handle_simple_cmd = sub {

[pve-devel] [PATCH ha-manager 2/4] Use run_cli_handler instead of deprecated run_cli

2017-10-16 Thread Philip Abernethy
--- src/pve-ha-crm | 2 +- src/pve-ha-lrm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pve-ha-crm b/src/pve-ha-crm index 93dfc1f..6454f3d 100755 --- a/src/pve-ha-crm +++ b/src/pve-ha-crm @@ -26,4 +26,4 @@ my $prepare = sub { };

[pve-devel] [PATCH common 4/4] Use run_cli_handler instead of deprecated run_cli

2017-10-16 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 11 --- 1 file changed, 11 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index e61fa6a..77c71a4 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -472,17 +472,6 @@ my $handle_simple_cmd = sub { &$outsub($res) if

[pve-devel] [PATCH manager 3/4] Use run_cli_handler instead of deprecated run_cli

2017-10-16 Thread Philip Abernethy
--- bin/pveam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pveam b/bin/pveam index 8b55adfa..43608e5f 100755 --- a/bin/pveam +++ b/bin/pveam @@ -5,4 +5,4 @@ use warnings; use PVE::CLI::pveam; -PVE::CLI::pveam->run_cli(); +PVE::CLI::pveam->run_cli_handler(); --

[pve-devel] [PATCH firewall 1/4] Use run_cli_handler instead of deprecated run_cli

2017-10-16 Thread Philip Abernethy
--- src/pve-firewall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pve-firewall b/src/pve-firewall index 0fbef27..601d638 100755 --- a/src/pve-firewall +++ b/src/pve-firewall @@ -22,4 +22,4 @@ my $prepare = sub { $rpcenv->set_user('root@pam'); };

[pve-devel] [PATCH common 0/4] Retire deprecated run_cli subroutine

2017-10-16 Thread Philip Abernethy
Migrates the few remaining calls to the new run_cli_handler and removes the function. Philip Abernethy (1): Use run_cli_handler instead of deprecated run_cli src/pve-firewall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0

[pve-devel] [PATCH common v4 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-16 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd and

[pve-devel] [PATCH common v4 0/3] CLI: Sub-commands and aliases

2017-10-16 Thread Philip Abernethy
Options are parsed correctly: # pveum help acl delete -v 0 USAGE: pveum acl delete --roles [OPTIONS] Philip Abernethy (3): cli: prepare CLIHandler for handling sub-commands cli: code cleanup cli: whitespace cleanup src/PVE/CLIHandler.pm | 347

[pve-devel] [PATCH common v4 3/3] cli: whitespace cleanup

2017-10-16 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index ac83972..0dc50e8 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -162,12 +162,12 @@ $generate_usage_str = sub { };

[pve-devel] [PATCH common v4 2/3] cli: code cleanup

2017-10-16 Thread Philip Abernethy
Removes obsolete subroutine and unused Dumper --- src/PVE/CLIHandler.pm | 24 1 file changed, 24 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 84cefa3..ac83972 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -2,7 +2,6 @@

[pve-devel] [PATCH common v2 2/3] cli: code cleanup

2017-10-11 Thread Philip Abernethy
Removes obsolete subroutine and some unnecessary parameters for command handlers. --- src/PVE/CLIHandler.pm | 96 ++- 1 file changed, 34 insertions(+), 62 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index

[pve-devel] [PATCH common v2 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-11 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd and

[pve-devel] [PATCH common v2 3/3] cli: whitespace cleanup

2017-10-11 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 7131bf8..f0f83dc 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -127,12 +127,12 @@ $generate_usage_str = sub { };

[pve-devel] [PATCH common v2 0/3] CLI: Sub-commands and aliases

2017-10-11 Thread Philip Abernethy
ole d test Options are parsed correctly: # pveum help "acl delete" -v 0 USAGE: pveum acl delete --roles [OPTIONS] Philip Abernethy (3): cli: prepare CLIHandler for handling sub-commands cli: code cleanup cli: whitespace cleanup src/PVE

Re: [pve-devel] [PATCH access-control] pveum: introduce sub-commands

2017-10-10 Thread Philip Abernethy
ing could work: > # pveum help user add This too. > > As with just the quoted version working it can confuse users. > > * bash completion does not seem to work anymore Using zsh completion never worked for me :D I'll look into it. > > On 10/09/2017 02:35 PM, Philip Abernethy w

Re: [pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Philip Abernethy
On Tue, Oct 10, 2017 at 03:53:45PM +0200, Thomas Lamprecht wrote: > On 10/10/2017 03:44 PM, Philip Abernethy wrote: > > Checks ACL paths for logical validity before application. Checks of > > the various IDs are done by the existing format checkers to avoid code > >

[pve-devel] [PATCH access-control 1/2] properly register pve-poolid format

2017-10-10 Thread Philip Abernethy
was erroneously registered as verify_groupname, overriding the previous registration --- PVE/AccessControl.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index 07f0c21..f0fb7dc 100644 --- a/PVE/AccessControl.pm +++

[pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Philip Abernethy
Checks ACL paths for logical validity before application. Checks of the various IDs are done by the existing format checkers to avoid code duplication. Also introduces a distinction between malformed (syntactically incorrect) and invalid (syntactically correct, but contextually wrong) paths. ---

[pve-devel] [PATCH access-control] pveum: introduce sub-commands

2017-10-09 Thread Philip Abernethy
use a sub-command structure instead of abbreviated words, where useful. Keep old commands as aliases. --- In case the sub-commands patch gets applied, here is the first use case. PVE/CLI/pveum.pm | 41 ++--- 1 file changed, 30 insertions(+), 11 deletions(-)

[pve-devel] [PATCH qemu-server v2] correct cpuunits range

2017-10-09 Thread Philip Abernethy
'These options take an integer value and control the "cpu.shares" control group attribute. The allowed range is 2 to 262144. Defaults to 1024.' – man 5 systemd.resource-control --- Indeed. We seem to have no way to disable fair scheduling now. PVE/QemuServer.pm | 6 +++--- 1 file changed, 3

[pve-devel] [PATCH qemu-server] correct cpuunits range

2017-10-09 Thread Philip Abernethy
'These options take an integer value and control the "cpu.shares" control group attribute. The allowed range is 2 to 262144. Defaults to 1024.' – man 5 systemd.resource-control --- Concerns #1321 PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[pve-devel] [PATCH container] fixes #1227: include ns/ dir in read_cgroup_value

2017-10-06 Thread Philip Abernethy
this fixes the disk I/O graph and now also correctly sums the values. --- This fix is already somewhat obsoleted by cgroup v2, but targetting that will me much more effort. src/PVE/LXC.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm

[pve-devel] [PATCH common 0/3] CLI: Sub-commands and aliases

2017-10-06 Thread Philip Abernethy
ole d test Options are parsed correctly: # pveum help "acl delete" -v 0 USAGE: pveum acl delete --roles [OPTIONS] Philip Abernethy (3): cli: prepare CLIHandler for handling sub-commands cli: code cleanup cli: whitespace cleanup src/PVE

[pve-devel] [PATCH common 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-06 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd to

[pve-devel] [PATCH common 3/3] cli: whitespace cleanup

2017-10-06 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index d480e70..2ccc15c 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -124,12 +124,12 @@ $generate_usage_str = sub { };

[pve-devel] [PATCH common 2/3] cli: code cleanup

2017-10-06 Thread Philip Abernethy
Removes obsolete subroutine and some unnecessary parameters for command handlers. --- src/PVE/CLIHandler.pm | 89 +-- 1 file changed, 30 insertions(+), 59 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index

[pve-devel] [PATCH 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-04 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd to allow for

[pve-devel] [PATCH 2/3] cli: code cleanup

2017-10-04 Thread Philip Abernethy
Removes obsolete subroutine and some unnecessary parameters for command handlers. --- src/PVE/CLIHandler.pm | 72 --- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index

[pve-devel] [PATCH 3/3] cli: whitespace cleanup

2017-10-04 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index b1e8de8..04f5a3f 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -129,12 +129,12 @@ $generate_usage_str = sub { };

[pve-devel] [PATCH 0/3] CLI: support for sub-commands

2017-10-04 Thread Philip Abernethy
offering sub-commands. Philip Abernethy (3): cli: prepare CLIHandler for handling sub-commands cli: code cleanup cli: whitespace cleanup src/PVE/CLIHandler.pm | 271 ++ 1 file changed, 163 insertions(+), 108 deletions(-) -- 2.11.0

Re: [pve-devel] [PATCH guest-common] Send email when a replication job fails.

2017-10-03 Thread Philip Abernethy
On Tue, Oct 03, 2017 at 11:42:03AM +0200, Wolfgang Link wrote: > > Philip Abernethy <p.aberne...@proxmox.com> hat am 3. Oktober 2017 um 10:20 > > geschrieben: > > > > > > On Tue, Oct 03, 2017 at 09:55:06AM +0200, Wolfgang Link wrote: > > > A emai

Re: [pve-devel] [PATCH guest-common] Send email when a replication job fails.

2017-10-03 Thread Philip Abernethy
On Tue, Oct 03, 2017 at 09:55:06AM +0200, Wolfgang Link wrote: > A email notification will be send for each job when the job fails. > This message will continued as long the job is failing. > --- > PVE/Replication.pm | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

Re: [pve-devel] Spice Server

2017-10-02 Thread Philip Abernethy
On Sun, Oct 01, 2017 at 06:54:03PM -0300, Gilberto Nunes wrote: > Hi guys... > > I am trying to recompile spice-server in PVE 4.4, in order to make > SPICE_DEBUG_ALLOW_MC=1 > works, but it seems I have no success. > In README file, I saw this: > > Experimental Features > - >

Re: [pve-devel] [PATCH v3 common] CLIHandler: add a default read_password implementation

2017-09-26 Thread Philip Abernethy
On Tue, Sep 26, 2017 at 02:01:02PM +0200, Wolfgang Bumiller wrote: > Moved here from pvesh, pveum and pct. They all need the same > functionality currently. 'pvesh' wants to pass the > Term::ReadLine instance, and it's possible we might want to > skip verification in some use cases in the future,

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-25 Thread Philip Abernethy
On Mon, Sep 25, 2017 at 10:13:29AM +0200, Thomas Lamprecht wrote: > On 09/25/2017 07:05 AM, Dietmar Maurer wrote: > > > > > + sub { > > > + my ($res) = @_; > > > + my $longest = 0; > > > + foreach my $role(map($_->{roleid}, @$res)) { > > > + my $len = length $role; > > > +

[pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-22 Thread Philip Abernethy
Use the existing 'index' API call from PVE::API2::Role to produce a tidy list of all available roles and their associated privileges. --- Concerns #1502 but doesn't fix it completely. PVE/CLI/pveum.pm | 31 +++ 1 file changed, 31 insertions(+) diff --git

[pve-devel] [PATCH access-control v3 2/3] Remove unused Dumper uses

2017-09-21 Thread Philip Abernethy
--- PVE/API2/ACL.pm | 2 -- PVE/API2/Role.pm | 2 -- PVE/API2/User.pm | 2 -- PVE/AccessControl.pm | 2 -- PVE/Auth/Plugin.pm | 2 -- 5 files changed, 10 deletions(-) diff --git a/PVE/API2/ACL.pm b/PVE/API2/ACL.pm index 84d7549..fb4fbce 100644 --- a/PVE/API2/ACL.pm +++

[pve-devel] [PATCH access-control v3 3/3] Whitespace fixes

2017-09-21 Thread Philip Abernethy
--- PVE/API2/ACL.pm | 44 +++--- PVE/API2/Role.pm | 71 ++- PVE/API2/User.pm | 102 +-- PVE/AccessControl.pm | 3 -- PVE/Auth/Plugin.pm | 14 +++ 5 files changed, 115

[pve-devel] [PATCH access-control v3 1/3] fix #1501: pveum: die when deleting special role

2017-09-21 Thread Philip Abernethy
Die with a helpful error message instead of silently ignoring the user when trying to delete a special role. Also add a property to the API answer for possible later use by the WebUI. --- PVE/API2/Role.pm | 6 +- PVE/AccessControl.pm | 5 + 2 files changed, 10 insertions(+), 1

Re: [pve-devel] [PATCH access-control] api: fix typo in 'GET ticket' description

2017-09-21 Thread Philip Abernethy
On Thu, Sep 21, 2017 at 08:44:17AM +0200, Thomas Lamprecht wrote: > Signed-off-by: Thomas Lamprecht > --- > PVE/API2/AccessControl.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/PVE/API2/AccessControl.pm b/PVE/API2/AccessControl.pm > index

[pve-devel] [PATCH access-control v2 3/3] Whitespace fixes

2017-09-20 Thread Philip Abernethy
--- PVE/API2/Role.pm | 71 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index 107523e..4ee023b 100644 --- a/PVE/API2/Role.pm +++ b/PVE/API2/Role.pm @@ -12,11 +12,11 @@ use

[pve-devel] [PATCH access-control v2 2/3] Remove unused Dumper use

2017-09-20 Thread Philip Abernethy
--- PVE/API2/Role.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index d6d17db..107523e 100644 --- a/PVE/API2/Role.pm +++ b/PVE/API2/Role.pm @@ -7,8 +7,6 @@ use PVE::AccessControl; use PVE::SafeSyslog; -use Data::Dumper; # fixme: remove - use

[pve-devel] [PATCH access-control v2 1/3] fix #1501: pveum: die when deleting special role

2017-09-20 Thread Philip Abernethy
Die with a helpful error message instead of silently ignoring the user when trying to delete a special role. --- v2: Fixed 'special' appearing in WebUI roles list PVE/API2/Role.pm | 7 ++- PVE/AccessControl.pm | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

[pve-devel] [PATCH access-control 1/3] fix #1501: pveum: die when deleting special role

2017-09-20 Thread Philip Abernethy
Die with a helpful error message instead of silently ignoring the user when trying to delete a special role. --- PVE/API2/Role.pm | 3 +++ PVE/AccessControl.pm | 1 + 2 files changed, 4 insertions(+) diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index 6392e13..d8d8e17 100644 ---

[pve-devel] [PATCH access-control 2/3] Remove unused Dumper use

2017-09-20 Thread Philip Abernethy
--- PVE/API2/Role.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index d8d8e17..b218e67 100644 --- a/PVE/API2/Role.pm +++ b/PVE/API2/Role.pm @@ -7,8 +7,6 @@ use PVE::AccessControl; use PVE::SafeSyslog; -use Data::Dumper; # fixme: remove - use

[pve-devel] [PATCH access-control 3/3] Whitespace fixes

2017-09-20 Thread Philip Abernethy
--- PVE/API2/Role.pm | 71 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/PVE/API2/Role.pm b/PVE/API2/Role.pm index b218e67..9e8b7b8 100644 --- a/PVE/API2/Role.pm +++ b/PVE/API2/Role.pm @@ -12,11 +12,11 @@ use

[pve-devel] [PATCH ha-manager v2] fix #1347: let postfix fill in FQDN in fence mails

2017-09-14 Thread Philip Abernethy
Using the nodename in $mailto is not correct and can lead to mails not forwarding in restrictive mail server configurations. Also changes $mailfrom to 'root' instead of 'root@localhost', which results in postfix appending the proper FQDN there, too. As a result the Delivered-to header reads

[pve-devel] [PATCH manager v2 1/2] vzdump: handle backup to stdout correctly

2017-09-14 Thread Philip Abernethy
Checks for dumpdir or tmpdir backups don't apply to stdout, so we can skip the checks involved in those methods. --- changes from v1: * Added an explanation for tmpdir. I'm not sure there's much more we can do. If the user/admin configures the backup to save a 30G container into 16G memory

[pve-devel] [PATCH manager v2 2/2] vzdump: whitespace and style cleanup, typo fix

2017-09-14 Thread Philip Abernethy
Mostly whitespace fixes, a stray semicolon, some style fixes and a grammar correction --- PVE/VZDump.pm | 111 -- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index c6a4b449..844a9449 100644

Re: [pve-devel] [PATCH ha-manager] fix #1347: let postfix fill in FQDN in fence mails

2017-09-14 Thread Philip Abernethy
On Wed, 2017-09-13 at 08:11 +0200, Thomas Lamprecht wrote: > On 09/08/2017 02:56 PM, Philip Abernethy wrote: > > Using the nodename is not correct and can lead to mails not > > forwarding > > in restrictive mail server configurations. > > --- > >   src/PVE/HA/

[pve-devel] [PATCH manager 1/2] vzdump: handle backup to stdout correctly

2017-09-12 Thread Philip Abernethy
Checks for dumpdir or tmpdir backups don't apply to stdout, so we can skip the checks involved in those methods. --- PVE/VZDump.pm | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 004672d1..e5777ea5 100644 --- a/PVE/VZDump.pm +++

[pve-devel] [PATCH manager 2/2] vzdump: whitespace and style cleanup, typo fix

2017-09-12 Thread Philip Abernethy
Mostly whitespace fixes, a stray semicolon, some style fixes and a grammar correction --- PVE/VZDump.pm | 113 -- 1 file changed, 54 insertions(+), 59 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index e5777ea5..86b8960d 100644

[pve-devel] [PATCH manager 2/2] Disallow quotas for unprivileged containers

2017-09-11 Thread Philip Abernethy
Disables the quota checkbox for unprivileged containers in the creation wizard, as well as when editing or adding mountpoints. --- www/manager6/lxc/CreateWizard.js | 11 +++ www/manager6/lxc/ResourceEdit.js | 8 +++- www/manager6/lxc/Resources.js| 5 + 3 files changed, 23

[pve-devel] [PATCH manager 1/2] Whitespace and typo fix

2017-09-11 Thread Philip Abernethy
--- www/manager6/lxc/CreateWizard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js index 8515877a..9b25db5e 100644 --- a/www/manager6/lxc/CreateWizard.js +++ b/www/manager6/lxc/CreateWizard.js @@

Re: [pve-devel] [PATCH manager v4 2/2] Introduce check to disable quota usage for unprivileged containers

2017-09-11 Thread Philip Abernethy
Are we getting this? On Fri, 2017-08-25 at 11:50 +0200, Philip Abernethy wrote: > Disables the quota checkbox for unprivileged containers in the > creation wizard, > as well as when editing or adding mountpoints. > --- > I figured I should actually fix *all* instances accordingly.

[pve-devel] [PATCH ha-manager] fix #1347: let postfix fill in FQDN in fence mails

2017-09-08 Thread Philip Abernethy
Using the nodename is not correct and can lead to mails not forwarding in restrictive mail server configurations. --- src/PVE/HA/Env/PVE2.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index fdfadd7..722d1b7 100644 ---

[pve-devel] [PATCH manager 1/3] get_filtered_vmlist: save VM conf in own subhash

2017-09-05 Thread Philip Abernethy
From: Thomas Lamprecht small refactoring in get_filtered_vmlist: save a VMs config in its own subhash to avoid collisions with other data which we want to save in the vmid list, for now this is only `type` but in the next patch I want to save also the class

[pve-devel] [PATCH manager 2/3] remove backup locks when starting all VMs on boot

2017-09-05 Thread Philip Abernethy
From: Thomas Lamprecht If on bootup one of our VMs is locked by an backup we safely can assume that this backup job does not run anymore and that the lock has no reason anymore and just hinders uptime of services. As at this time we (the node) have quorum so we may

[pve-devel] [PATCH manager 3/3] fix start on boot

2017-09-05 Thread Philip Abernethy
From: Fabian Grünbichler fix the fix for #1024 Signed-off-by: Fabian Grünbichler --- PVE/API2/Nodes.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index eb1ef69b..8d828436

[pve-devel] [PATCH manager v2] ceph: Allow specifying cluster network separately

2017-09-04 Thread Philip Abernethy
We always recommend putting ceph-internal communication into a separate cluster network. Now pveceph init allows specifying a separate cluster network. The prior behaviour is retained, so -network sets both networks and -cluster_network overrides the cluster network if it is set. --- Removed

[pve-devel] [PATCH manager] ceph: Allow specifying cluster network separately

2017-09-04 Thread Philip Abernethy
We always recommend putting ceph-internal communication into a separate cluster network. Now pveceph init allows specifying a separate cluster network. The prior behaviour is retained, so -network sets both networks and -cluster_network overrides the cluster network if it is set. ---

[pve-devel] [RFC manager 2/4] Add a pool-centered bulk action

2017-08-30 Thread Philip Abernethy
Uses the memberVSSelector to get a list of all VMs and containers in the selected pool. --- www/manager6/window/PoolBulkAction.js | 100 ++ 1 file changed, 100 insertions(+) create mode 100644 www/manager6/window/PoolBulkAction.js diff --git

[pve-devel] [RFC manager 1/4] Add new selector for pool-wide bulk actions

2017-08-30 Thread Philip Abernethy
The new selector is functionally identical to the VMSelector, except that it filters the resource list with a pool name, instead of a node name. --- www/manager6/form/MemberVMSelector.js | 207 ++ 1 file changed, 207 insertions(+) create mode 100644

[pve-devel] [RFC manager 0/4] Allow bulk start/stop for pools

2017-08-30 Thread Philip Abernethy
I added a context menu for pools to allow for bulk start and stop of machines in a selected pool. I'm pondering whether or not to add bulk migration as well. Our current bulk migration makes all machines migrate to the same target. In pools the machines can reside on many different nodes, so

[pve-devel] [RFC manager 4/4] Allow for right-click actions on pools

2017-08-30 Thread Philip Abernethy
Links the pool.CmdMenu in createCmdMenu to make it available. Makefile updated to include all necessary files. --- www/manager6/Makefile | 3 +++ www/manager6/Utils.js | 5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/www/manager6/Makefile b/www/manager6/Makefile index

[pve-devel] [RFC manager 3/4] Add a context menu to pools

2017-08-30 Thread Philip Abernethy
Adds a CmdMenu for pools to allow for right-click actions on a selected pool. --- www/manager6/pool/CmdMenu.js | 57 1 file changed, 57 insertions(+) create mode 100644 www/manager6/pool/CmdMenu.js diff --git a/www/manager6/pool/CmdMenu.js

[pve-devel] [RFC manager v2] ceph: Allow specifying cluster network separately

2017-08-30 Thread Philip Abernethy
We always recommend putting ceph-internal communication into a separate cluster network. Yet pveceph init does not allow to specify one, leading to difficulties if one were to follow the setup guide on the wiki, which proceeds to create monitors after the ceph network was initialised. --- That

[pve-devel] [RFC manager] Allow specifying cluster and public network separately

2017-08-30 Thread Philip Abernethy
--- We always recommend putting ceph-internal communication into a separate cluster network. Yet pveceph init does not allow to specify one, leading to difficulties if one were to follow the setup guide on the wiki, which proceeds to create monitors after the ceph network was initialised. In case

[pve-devel] [PATCH manager v4 1/2] Whitespace and typo fix

2017-08-25 Thread Philip Abernethy
--- www/manager6/lxc/CreateWizard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js index c2f16a1a..86e710ee 100644 --- a/www/manager6/lxc/CreateWizard.js +++ b/www/manager6/lxc/CreateWizard.js @@

[pve-devel] [PATCH manager v4 2/2] Introduce check to disable quota usage for unprivileged containers

2017-08-25 Thread Philip Abernethy
Disables the quota checkbox for unprivileged containers in the creation wizard, as well as when editing or adding mountpoints. --- I figured I should actually fix *all* instances accordingly. www/manager6/lxc/CreateWizard.js | 10 ++ www/manager6/lxc/ResourceEdit.js | 8 +++-

[pve-devel] [PATCH manager v3] Introduce check to disable quota usage for unprivileged containers

2017-08-24 Thread Philip Abernethy
Disables the quota checkbox for unprivileged containers in the creation wizard, as well as when editing or adding mountpoints. --- So it shall be done. www/manager6/lxc/CreateWizard.js | 18 ++ www/manager6/lxc/ResourceEdit.js | 10 -- www/manager6/lxc/Resources.js| 7

[pve-devel] [PATCH manager v2] Introduce check to disable quota usage for unprivileged containers

2017-08-23 Thread Philip Abernethy
Disables the quota checkbox for unprivileged containers in the creation wizard, as well as when editing or adding mountpoints. --- With the editor windows I got confused by the caps.vms['Config.VM.Disk'] earlier, but that's access control. Removed the distinction altogether. Recarding the commas

[pve-devel] [PATCH container v4] close #1478: add check for unsupported config

2017-08-23 Thread Philip Abernethy
Adds a check if an unprivileged container is configured to use quota on any of its mountpoints. If so an understandable error message is given. Ideally I'd like to catch those configurations on the GUI, too, to avoid users just running into it. --- That suggestion evidently slipped my mind.

[pve-devel] [PATCH container v3] close #1478: add check for unsupported config

2017-08-23 Thread Philip Abernethy
Adds a check if an unprivileged container is configured to use quota on any of its mountpoints. If so an understandable error message is given. Ideally I'd like to catch those configurations on the GUI, too, to avoid users just running into it. --- Done. GUI fix coming up.

[pve-devel] [PATCH container v2] start/fix #1478: add check for unsupported config

2017-08-22 Thread Philip Abernethy
Adds a check if an unprivileged container is configured to use quota on any of its mountpoints. If so an understandable error message is given. Ideally I'd like to catch those configurations on the GUI, too, to avoid users just running into it. --- Applied your suggestions. $unprivileged doesn't

[pve-devel] [PATCH qemu-server v2 0/3] Typo fix, refactoring and new check

2017-08-21 Thread Philip Abernethy
tch unprivileged containers with mountpoints configured with quotas. Philip Abernethy (3): Refactor HyperV enlightenments Refactors $nokvm to $kvm Fix #1125. Check for KVM support before starting VM PVE/QemuServer.pm | 27 +-- 1 file changed, 13 insertions(+), 14 deleti

[pve-devel] [PATCH qemu-server v2 1/3] Refactor HyperV enlightenments

2017-08-21 Thread Philip Abernethy
Fixes a typo in the function name and removes the $nokvm parameter, as it's only used to immideately exit the function. Instead calling the function conditionally. --- PVE/QemuServer.pm | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server v2 3/3] Fix #1125. Check for KVM support before starting VM

2017-08-21 Thread Philip Abernethy
Moved the check to the beginning of the function. VMs configured to use KVM won't start if KVM is not available. VMs not configured to use KVM will start regardless. --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server v2 2/3] Refactors $nokvm to $kvm

2017-08-21 Thread Philip Abernethy
for improved readability and consistency with the option name. --- PVE/QemuServer.pm | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index ee5e467..d6ddb1d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@

[pve-devel] [PATCH container] start/fix #1478: add check for unsupported config

2017-08-18 Thread Philip Abernethy
Adds a check if an unprivileged container is configured to use quota on any of its mountpoints. If so an understandable error message is given. Ideally I'd like to catch those configurations on the GUI, too, to avoid users just running into it. --- src/PVE/API2/LXC/Status.pm | 10 ++ 1

[pve-devel] [PATCH 2/2] Fix #1125. Check for KVM support before starting VM

2017-08-16 Thread Philip Abernethy
Moved the check to the beginning of the function. VMs configured to use KVM won't start if KVM is not available. VMs not configured to use KVM will start regardless. --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm

[pve-devel] [PATCH 1/2] Refactored $nokvm to $kvm

2017-08-16 Thread Philip Abernethy
Where possible I reworked the code to remove the resulting inversion. The result should be easier to read and understand. I also fixed a type in the process. --- PVE/QemuServer.pm | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/PVE/QemuServer.pm

[pve-devel] [PATCH storage] Fix #1474: Fixes input and output of print_storage

2017-08-10 Thread Philip Abernethy
Accommodates changes in 44ae567 and d40e27d by reordering checks to allow for proper filtering of disabled storages. Also reorders two checks to prevent autovivification resulting in disabled storages always showing in output. --- PVE/Storage.pm | 9 + 1 file changed, 5 insertions(+), 4