Re: [pve-devel] [PATCH] prepare code for more generic firewall logging

2017-09-18 Thread Tom Weber
Am Montag, den 18.09.2017, 13:34 +0200 schrieb Dietmar Maurer: > > > > With that in mind, I have no objections to this patch (or a version > > of > > it, see the inline comments below). > But logging all Dropped package would produce an incredible amount of > logs? That's why I'd like to have a f

Re: [pve-devel] [PATCH] prepare code for more generic firewall logging

2017-09-18 Thread Wolfgang Bumiller
> On September 18, 2017 at 1:34 PM Dietmar Maurer wrote: > > > > With that in mind, I have no objections to this patch (or a version of > > it, see the inline comments below). > > But logging all Dropped package would produce an incredible amount of logs? That's where the log level comes in.

Re: [pve-devel] [PATCH] prepare code for more generic firewall logging

2017-09-18 Thread Tom Weber
Am Montag, den 18.09.2017, 12:21 +0200 schrieb Wolfgang Bumiller: > Improving logging makes sense, the current state might be confuse for > some (given that drop-rules simply generate a `-j DROP` iptables > rules > and therefore don't get logged). > This seems to be a good first step, although I'd

Re: [pve-devel] [PATCH] prepare code for more generic firewall logging

2017-09-18 Thread Dietmar Maurer
> With that in mind, I have no objections to this patch (or a version of > it, see the inline comments below). But logging all Dropped package would produce an incredible amount of logs? ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.p

Re: [pve-devel] [PATCH] prepare code for more generic firewall logging

2017-09-18 Thread Wolfgang Bumiller
Improving logging makes sense, the current state might be confuse for some (given that drop-rules simply generate a `-j DROP` iptables rules and therefore don't get logged). This seems to be a good first step, although I'd be much happier if iptables would allow setting the log-prefix and performin

[pve-devel] [PATCH V5 pve-common 2/2] Extend the JSON format schema with pve-base-snapshot.

2017-09-18 Thread Wolfgang Link
A base snapshot can be a replication snapshot or a normal snapshot. --- src/PVE/JSONSchema.pm | 13 + 1 file changed, 13 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 996aef2..2ed5b9a 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -1

[pve-devel] [PATCH V5 pve-storage] Use a json format instead of hard code regex.

2017-09-18 Thread Wolfgang Link
--- PVE/CLI/pvesm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 9455595..57d10f4 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -183,7 +183,7 @@ __PACKAGE__->register_method ({ base => { des

[pve-devel] [PATCH V5 pve-container] Move option 'pve-lxc-snapshot-name' to PVE::JSONSchema.

2017-09-18 Thread Wolfgang Link
Rename pve-lxc-snapshot-name to pve-snapshotname to have a unified name schema. --- src/PVE/API2/LXC.pm | 4 ++-- src/PVE/API2/LXC/Snapshot.pm | 12 ++-- src/PVE/LXC/Config.pm| 6 -- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/PVE/API2/LXC.pm

[pve-devel] [PATCH V5 qemu-server] Move option 'pve-snapshot-name' to PVE::JSONSchema.

2017-09-18 Thread Wolfgang Link
To avoid update problems rename pve-snapshot-name to pve-snapshotname. --- PVE/API2/Qemu.pm | 16 PVE/QemuServer.pm | 8 +--- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 66ffc07..761120c 100644 --- a/PVE/API2/Qemu

[pve-devel] [PATCH V5 pve-common 1/2] merge pve-snapshot-name and pve-lxc-snapshot-name to pve-snapshotname.

2017-09-18 Thread Wolfgang Link
This format was two time declared in PVE::LXC::Config and PVE::QemuServer. It is necessary to call the new option different to avoid upgrade problems. --- src/PVE/JSONSchema.pm | 17 + 1 file changed, 17 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm inde

[pve-devel] Adapt regex in pvesm import/export.

2017-09-18 Thread Wolfgang Link
We allow uppercase characters in snapshot names. pvesm import and export must allow uppercase characters too. [PATCH V2] Use JSON schema instead of hardcoding. [PATCH V3 pve-storage] Correct typo. [PATCH V4] Make base snapshot more specific. [PATCH V5] Merge pve-lxc-snapshot-name and pve-snapsh

[pve-devel] [PATCH V5 pve-manager] Adjust the option name to a new name scheme.

2017-09-18 Thread Wolfgang Link
--- PVE/CLI/pvesr.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/CLI/pvesr.pm b/PVE/CLI/pvesr.pm index 7da94404..1ed3d535 100644 --- a/PVE/CLI/pvesr.pm +++ b/PVE/CLI/pvesr.pm @@ -75,7 +75,7 @@ __PACKAGE__->register_method ({ minimum => 0,

[pve-devel] [PATCH cluster v3 5/7] corosync: add atomic_write_conf and cleanup

2017-09-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- changes v2 -> v3: * add comments * atomic_write_conf 'increase version parameter' changed to negated 'no_increase_version'. Almost all of the time we want to increase the version so this makes sense data/PVE/Corosync.pm | 42 ++-

[pve-devel] [PATCH cluster v3 6/7] WIP: add foreach_member

2017-09-18 Thread Thomas Lamprecht
Add a method to execute a sub for each cluster member, passing its name and cluster ip to the $code sub. This is similar to our foreach_disk or foreach_storage Signed-off-by: Thomas Lamprecht --- data/PVE/Cluster.pm | 16 1 file changed, 16 insertions(+) diff --git a/data/PVE/C

[pve-devel] [PATCH cluster v3 4/7] corosync: transform config to allow easier access

2017-09-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- changes v2 -> v3: * use map instead of foreach in transform helpers * rename those helper to conciser names data/PVE/Corosync.pm | 51 +++ 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/data/P

[pve-devel] [PATCH cluster v3 3/7] corosync config parser: move to hash format

2017-09-18 Thread Thomas Lamprecht
The old parser itself was simple and easy but resulted in quite a bit of headache when changing corosync config sections, especially if multiple section levelsshould be touched. Move to a more practical internal format which represents the corosync configuration in hash Some Perl auto-vivificatio

[pve-devel] [PATCH cluster v3 1/7] pvecm: remove Data::Dumper

2017-09-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- no changes data/PVE/CLI/pvecm.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index 7ca98f7..41c2f9c 100755 --- a/data/PVE/CLI/pvecm.pm +++ b/data/PVE/CLI/pvecm.pm @@ -10,7 +10,6 @@ use POSIX; use Net::IP;

[pve-devel] [PATCH cluster v3 2/7] pvecm: import often needed run_command

2017-09-18 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- no changes data/PVE/CLI/pvecm.pm | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index 41c2f9c..5a93a66 100755 --- a/data/PVE/CLI/pvecm.pm +++ b/data/PVE/CLI/pvecm.pm @@ -10,7

[pve-devel] [PATCH cluster v3 7/7] WIP: add and delete qdevice

2017-09-18 Thread Thomas Lamprecht
Allow to add and delete qdevice through the pvecm CLI tool. Signed-off-by: Thomas Lamprecht --- data/PVE/CLI/pvecm.pm | 208 ++ 1 file changed, 208 insertions(+) diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index 5a93a66..23b174a 100

[pve-devel] [PATCH cluster v3 0/7] corosync config parser refactoring and a WIP of QDevice

2017-09-18 Thread Thomas Lamprecht
This iteration should address comments from Fabian and Wolfgang (thanks for those!) Main change is how I transform arrays to hashes and vice versa in patch 4 (corosync: transform config to allow easier access), this saves us not only some lines of codes but should be also faster. Additional to th