Re: [pve-devel] [PATCH qemu-server] add discard_granularity to 4M for rbd storage

2018-06-28 Thread Alexandre DERUMIER
>>In my opinion it would be better to have Qemu figure it out automagically or >>use the discard config option to add the granularity. qemu seem to be able to get the value in qemu block/rbd.c static int qemu_rbd_getinfo(BlockDriverState *bs, BlockDriverInfo *bdi) { BDRVRBDState *s =

Re: [pve-devel] [PATCH container 0/2] Linux LIO/targetcli support

2018-06-28 Thread Udo Rader
On Fri, 2018-06-15 at 13:45 +0200, Dominik Csapak wrote: > > > during my initial tests, it worked (mostly) but i found some > > > strange > > > behaviours: > > > > > > when we execute a zfs request not in a worker (e.g. a content > > > listing) > > > and then create a lun in a worker, only that

[pve-devel] [PATCH V2 storage 3/3] expiring cached iSCSI configuration after 15 seconds, after which it is re-read from the portal

2018-06-28 Thread Udo Rader
Signed-off-by: Udo Rader --- PVE/Storage/LunCmd/LIO.pm | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm index 2d8c2ee..44dd508 100644 --- a/PVE/Storage/LunCmd/LIO.pm +++ b/PVE/Storage/LunCmd/LIO.pm @@ -1,4

[pve-devel] [PATCH V2 storage 2/3] adding linux LIO support

2018-06-28 Thread Udo Rader
--- PVE/Storage/LunCmd/LIO.pm | 398 ++ 1 file changed, 398 insertions(+) create mode 100644 PVE/Storage/LunCmd/LIO.pm diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm new file mode 100644 index 000..2d8c2ee --- /dev/null +++

[pve-devel] [PATCH V2 storage 1/3] adding linux LIO support

2018-06-28 Thread Udo Rader
--- PVE/Storage/LunCmd/Makefile | 2 +- PVE/Storage/ZFSPlugin.pm| 7 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/LunCmd/Makefile b/PVE/Storage/LunCmd/Makefile index b959255..a7209d1 100644 --- a/PVE/Storage/LunCmd/Makefile +++

[pve-devel] [PATCH V2 storage 0/3] updated Linux targetcli/LIO support

2018-06-28 Thread Udo Rader
As discussed on the ML, this patch tries to mitigate the scenario where PVE workers will have a stale version of the iSCSI portal config. This is done by expiring the cached settings after 15 seconds. Once expired, the configuration is re-read from the portal when some command is run against it.

Re: [pve-devel] [PATCH qemu-server] add discard_granularity to 4M for rbd storage

2018-06-28 Thread Thomas Lamprecht
On 6/28/18 2:56 PM, Alwin Antreich wrote: > On Thu, Jun 28, 2018 at 10:08:45AM +0200, Alexandre Derumier wrote: >> when we have snapshots on rbd and do a trim, the space is increasing >> http://tracker.ceph.com/issues/18352 >> >> we need to trim a full object (4MB by default), to be able to free

[pve-devel] [PATCH qemu-server v2 2/2] qemu_drive_mirror_monitor: refactor job status out in own variable

2018-06-28 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- no changes PVE/QemuServer.pm | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index ae7d503..9c69e76 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6271,28 +6271,28 @@ sub

[pve-devel] [PATCH qemu-server v2 1/2] move disk: simplify and remove progress output

2018-06-28 Thread Thomas Lamprecht
Add a small helper which transforms a byte value to the highest possible size unit. Remove redundant information from the for offline mirroring used qemu_img_convert and the for online mirroring used qemu_drive_mirror_monitor periodic progress outputs and use the new helper to print an, for

Re: [pve-devel] [PATCH qemu-server] add discard_granularity to 4M for rbd storage

2018-06-28 Thread Alwin Antreich
On Thu, Jun 28, 2018 at 10:08:45AM +0200, Alexandre Derumier wrote: > when we have snapshots on rbd and do a trim, the space is increasing > http://tracker.ceph.com/issues/18352 > > we need to trim a full object (4MB by default), to be able to free space. > > test: > > without

[pve-devel] applied: [PATCH firewall] ebtables: sort guest chains during rulecreation

2018-06-28 Thread Wolfgang Bumiller
applied On Thu, Jun 28, 2018 at 02:41:56PM +0200, Stoiko Ivanov wrote: > Signed-off-by: Stoiko Ivanov > --- > > * reported via forum: > https://forum.proxmox.com/threads/pve-firewall-keeps-rebuilding-due-to-changing-host-sort-order-code-changes-attached.44727/ > * the problem occurs if you have

[pve-devel] [PATCH firewall] ebtables: sort guest chains during rulecreation

2018-06-28 Thread Stoiko Ivanov
Signed-off-by: Stoiko Ivanov --- * reported via forum: https://forum.proxmox.com/threads/pve-firewall-keeps-rebuilding-due-to-changing-host-sort-order-code-changes-attached.44727/ * the problem occurs if you have more than 1 guest running * this patch seems to fix it for me src/PVE/Firewall.pm

[pve-devel] [RFC qemu-server 2/2] qemu_drive_mirror_monitor: refactor job status out in own variable

2018-06-28 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index b4fa30a..bd3307a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6280,28 +6280,28 @@ sub

[pve-devel] [RFC qemu-server 1/2] move disk: simplify and remove progress output

2018-06-28 Thread Thomas Lamprecht
Add a small helper which transforms a byte value to the highest possible size unit. Remove redundant information from the for offline mirroring used qemu_img_convert and the for online mirroring used qemu_drive_mirror_monitor periodic progress outputs and use the new helper to print an, for

[pve-devel] applied: [PATCH manager] fix correct call to 'usage_str'

2018-06-28 Thread Thomas Lamprecht
On 6/28/18 12:57 PM, Dominik Csapak wrote: > we forgot to give usage_str also the param_mapping sub, > else it fails on calling 'help' > > Signed-off-by: Dominik Csapak > --- > bin/pvesh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bin/pvesh b/bin/pvesh > index

[pve-devel] [pve-common 2/7] cli: print_api_result: use print_api_list to print objects

2018-06-28 Thread Dietmar Maurer
In order to draw the new asciiart border ... Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index b55861a..80504b2 100644 --- a/src/PVE/CLIFormatter.pm +++

[pve-devel] [pve-common 3/7] PVE::JSONSchema::register_renderer - allow to register renderers by name

2018-06-28 Thread Dietmar Maurer
We want to use those renderer to format CLI output nicely. Signed-off-by: Dietmar Maurer --- src/PVE/JSONSchema.pm | 16 1 file changed, 16 insertions(+) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 41a6652..f0ac441 100644 --- a/src/PVE/JSONSchema.pm +++

[pve-devel] [pve-common 0/7] CLIFormatter improvements

2018-06-28 Thread Dietmar Maurer
more features to render nice ascii/utf8 tables + cleanups Dietmar Maurer (7): cli: print_text_table: allow to draw ascii art borders cli: print_api_result: use print_api_list to print objects PVE::JSONSchema::register_renderer - allow to register renderers by name cli: data_to_text:

[pve-devel] [pve-common 1/7] cli: print_text_table: allow to draw ascii art borders

2018-06-28 Thread Dietmar Maurer
format can now be: plain => what we had with 'text' before text => print with borders (default) json Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/PVE/CLIFormatter.pm

[pve-devel] [pve-common 4/7] cli: data_to_text: pass property info

2018-06-28 Thread Dietmar Maurer
So that we can display defaults, render boolean nicely, or call arbitrary render functions ... Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/PVE/CLIFormatter.pm

[pve-devel] [pve-common 5/7] cli: print_text_table: allow to limit output width

2018-06-28 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index cb9da12..638f061 100644 --- a/src/PVE/CLIFormatter.pm +++

[pve-devel] [pve-common 6/7] CLIFormatter: pass options as hash

2018-06-28 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index 638f061..83b1ec0 100644 --- a/src/PVE/CLIFormatter.pm +++

[pve-devel] [PATCH manager] fix correct call to 'usage_str'

2018-06-28 Thread Dominik Csapak
we forgot to give usage_str also the param_mapping sub, else it fails on calling 'help' Signed-off-by: Dominik Csapak --- bin/pvesh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pvesh b/bin/pvesh index 5f9b7241..0394a355 100755 --- a/bin/pvesh +++ b/bin/pvesh @@ -339,7

[pve-devel] [PATCH common] PVE::RESTEnvironment::fork_worker: put child in foreground

2018-06-28 Thread Stoiko Ivanov
* Fix #1819 * Use setpgid+tcsetpgrp instead of setsid if $sync (invocation via cli), thus keeping /dev/tty - ssh-copy-id/ssh need it to read the password, and putting the child in the forground * Ignore SIGTTOU in child process (otherwise it gets stopped upon tcsetpgrp) Signed-off-by: Stoiko

[pve-devel] [PATCH qemu-server] add discard_granularity to 4M for rbd storage

2018-06-28 Thread Alexandre Derumier
when we have snapshots on rbd and do a trim, the space is increasing http://tracker.ceph.com/issues/18352 we need to trim a full object (4MB by default), to be able to free space. test: without discard_granularity --- vm-107-disk-1

[pve-devel] applied: [RFC pve-common] PVE/CLIFormatter.pm - new class to generate/format CLI output

2018-06-28 Thread Thomas Lamprecht
On 6/28/18 9:39 AM, Dietmar Maurer wrote: > Moved code from CLIHandler.pm into this file. > applied ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [RFC pve-common] PVE/CLIFormatter.pm - new class to generate/format CLI output

2018-06-28 Thread Dietmar Maurer
Moved code from CLIHandler.pm into this file. Signed-off-by: Dietmar Maurer --- src/Makefile| 1 + src/PVE/CLIFormatter.pm | 151 src/PVE/CLIHandler.pm | 145 +- 3 files changed, 153