[pve-devel] [PATCH manager] Fix LXC Snapshots Edit Window timestamps

2017-06-19 Thread Emmanuel Kasper
API calls return dates in seconds where the JS Date() constructor wants millisecond. For the correct computation use render_timestamp_human_readable. A similar fix was commited in aaa89d0b880ea9ab97927872e64d4427bbe2232d for VMs but Containers missed the fix. --- 18th of January 1970 was nice

[pve-devel] [PATCH manager] Use also a 150 pix width for Date in LXC Snapshot Tree

2017-06-19 Thread Emmanuel Kasper
Otherwise the date is truncated by default --- www/manager6/lxc/SnapshotTree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/lxc/SnapshotTree.js b/www/manager6/lxc/SnapshotTree.js index df5b31cf..c80fb439 100644 --- a/www/manager6/lxc/SnapshotTree.js +++

[pve-devel] [PATCH v6 pve-storage 1/6] First beta of FreeNAS storage plugin. Missing snapshot backup for LXC

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage.pm |2 + PVE/Storage/FreeNASPlugin.pm | 1289 ++ PVE/Storage/Makefile |2 +- PVE/Storage/Plugin.pm|2 +-

[pve-devel] [PATCH v6 pve-storage 6/6] Bug fixes and clean-ups in response to review from Fabian.

2017-06-19 Thread mir
From: Michael Rasmussen Changes since v5: * if ! to unless * all helper methods now private * remove unused includes * remove unused code * more descriptive variable names * change api timeout to be in sync with the PVE API * add loop over limit until empty resultset is

[pve-devel] [PATCH v6 pve-storage 2/6] Proper check if VM/CT is running

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm index 771061e..c438519 100644 ---

[pve-devel] [PATCH v6 pve-storage 4/6] Add support for creating LXC snapshot backup

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 129 +-- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/PVE/Storage/FreeNASPlugin.pm

[pve-devel] [PATCH v6 pve-storage 3/6] Fix missing $vmid

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm index c438519..0f2a56d 100644 ---

[pve-devel] [PATCH v6 pve-storage 0/6] FreeNAS storage plugin

2017-06-19 Thread mir
From: Michael Rasmussen (Resending, Diregard previous) This patch series adds a storage plugin for FreeNAS using the FreeNAS API. The plugin supports both Qemu and LXC VM. Features supported, see below: VM CT create YES

[pve-devel] [PATCH v6 pve-storage 5/6] Fix regression and indentation

2017-06-19 Thread mir
From: Michael Rasmussen snapshot backup of CT broke general snapshot handling. Handle snapshot creation and deletion properly. Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 1570 +- 1 file

Re: [pve-devel] [PATCH v6 pve-storage 0/6] FreeNAS storage plugin

2017-06-19 Thread Michael Rasmussen
Hi all, I do not know why this '[PATCH v6 pve-storage 1/1] A lot of bug fixes and clean-ups' is part of the series!!?? It is identical to '[PATCH v6 pve-storage 6/6] Bug fixes and clean-ups in response to review from Fabian.' -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys:

[pve-devel] [PATCH v6 pve-storage 0/6] FreeNAS storage plugin

2017-06-19 Thread mir
From: Michael Rasmussen This patch series adds a storage plugin for FreeNAS using the FreeNAS API. The plugin supports both Qemu and LXC VM. Features supported, see below: VM CT create YES YES delete YES

[pve-devel] [PATCH v6 pve-storage 3/6] Fix missing $vmid

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm index c438519..0f2a56d 100644 ---

[pve-devel] [PATCH v6 pve-storage 2/6] Proper check if VM/CT is running

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm index 771061e..c438519 100644 ---

[pve-devel] [PATCH v6 pve-storage 6/6] Bug fixes and clean-ups in response to review from Fabian.

2017-06-19 Thread mir
From: Michael Rasmussen Changes since v5: * if ! to unless * all helper methods now private * remove unused includes * remove unused code * more descriptive variable names * change api timeout to be in sync with the PVE API * add loop over limit until empty resultset is

[pve-devel] [PATCH v6 pve-storage 1/1] A lot of bug fixes and clean-ups

2017-06-19 Thread mir
From: Michael Rasmussen fixes TODO Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 1011 ++ 1 file changed, 533 insertions(+), 478 deletions(-) diff --git a/PVE/Storage/FreeNASPlugin.pm

[pve-devel] [PATCH v6 pve-storage 4/6] Add support for creating LXC snapshot backup

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 129 +-- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/PVE/Storage/FreeNASPlugin.pm

[pve-devel] [PATCH manager 2/3] change default replication status text to 'OK'

2017-06-19 Thread Dominik Csapak
The status '-' can confuse users, as it could indicate something is missing, whereas OK indicates everything is alright (which is the status we want to show) Signed-off-by: Dominik Csapak --- www/manager6/grid/Replication.js | 2 +- 1 file changed, 1 insertion(+), 1

[pve-devel] [PATCH manager 1/3] change short duration format to x.y

2017-06-19 Thread Dominik Csapak
so we always show one decimal place (instead of all with seconds and none with minutes, hours, days) Signed-off-by: Dominik Csapak --- this was only used in the recently introduced replication grid, and nowhere else, so it should not change any existing diplay of

[pve-devel] [PATCH manager 3/3] better default column sizes for replication grid

2017-06-19 Thread Dominik Csapak
to see the full date, and save space from the other columns Signed-off-by: Dominik Csapak --- www/manager6/grid/Replication.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js index

[pve-devel] [PATCH v6 pve-storage 5/6] Fix regression and indentation

2017-06-19 Thread mir
From: Michael Rasmussen snapshot backup of CT broke general snapshot handling. Handle snapshot creation and deletion properly. Signed-off-by: Michael Rasmussen --- PVE/Storage/FreeNASPlugin.pm | 1570 +- 1 file

[pve-devel] [PATCH v6 pve-storage 1/6] First beta of FreeNAS storage plugin. Missing snapshot backup for LXC

2017-06-19 Thread mir
From: Michael Rasmussen Signed-off-by: Michael Rasmussen --- PVE/Storage.pm |2 + PVE/Storage/FreeNASPlugin.pm | 1289 ++ PVE/Storage/Makefile |2 +- PVE/Storage/Plugin.pm|2 +-

Re: [pve-devel] [PATCH v6 pve-storage 0/6] FreeNAS storage plugin

2017-06-19 Thread Michael Rasmussen
On Mon, 19 Jun 2017 16:50:43 +0200 Michael Rasmussen wrote: > Hi all, > > I do not know why this '[PATCH v6 pve-storage 1/1] A lot of bug fixes > and clean-ups' is part of the series!!?? It is identical to '[PATCH v6 > pve-storage 6/6] Bug fixes and clean-ups in response to

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Michael Rasmussen
On Mon, 19 Jun 2017 13:06:48 +0200 "datanom.net" wrote: > > > I will try to add an udevadm trigger/settle before returning from > > > activate_volume in the code I see whether this solves the problem. > Forgot I already do this: +$os_request->(['iscsiadm', '-m',

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Michael Rasmussen
On Mon, 19 Jun 2017 12:57:24 +0200 Fabian Grünbichler wrote: > > yes, that or debugging what mount is actually doing seems like the way > to go. if it fails as well with "-t nonfs", then I think you need to > check your plugin code for further timing problems. >

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Michael Rasmussen
On Mon, 19 Jun 2017 20:54:18 +0200 Michael Rasmussen wrote: > Found it ;-) No need to change any code in LXC.pm > Cause: The code I added to circumvent the FreeNAS bug was doing a > rescan of the session which deactivated the volume before the command > unshare -m -- sh -c

[pve-devel] [RFC PATCH] Fixes: #1415 https://bugzilla.proxmox.com/show_bug.cgi?id=1415

2017-06-19 Thread Emmanuel Kasper
Wrap the -d test with run_or_get_killed sub this test can make pvestatd hang on I/O wait when a nfsd process is stopped --- PVE/Storage/Plugin.pm | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index cc4c7e7..3742258

[pve-devel] [RFC PATCH 0/1] Nodes/VM/CT marked as offline when nfs is down

2017-06-19 Thread Emmanuel Kasper
This patch is a tentative fix for #1415 To fix the problem of pvestatd hangs, this generalize the approach of PVE::Common:df by running the potentially hanging code in a forked child. Requesting For Comments, as I am not sure the approach is right, and PVE::Common::df should be refactored to

[pve-devel] [RFC PATCH 1/1] Add run_or_get_killed utility

2017-06-19 Thread Emmanuel Kasper
This runs subroutine in a forked process and kills it after a timeout --- src/PVE/Tools.pm | 43 +++ 1 file changed, 43 insertions(+) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index da7da5d..0bf94ae 100644 --- a/src/PVE/Tools.pm +++

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread datanom.net
On 2017-06-19 09:47, Fabian Grünbichler wrote: I was thinking more about logical races, along the lines of the following: - no existing session - activate volume A A- get_active_luns (note: this will already create an empty session) A- freenas_get_lun_number - concurrent activate volume B B-

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread datanom.net
On 2017-06-19 09:33, Fabian Grünbichler wrote: AFAICT, mount will always guess NFS if there is a ':' anywhere in the source path: No, mount only guess NFS if run through PVE::Tools:run_command. Running the exact same command as produced in PVE::LXC::API2 from the command line works as

[pve-devel] [PATCH qemu-server 0/2] add disk operations stats for VMs

2017-06-19 Thread Tobias Böhm
These commit adds support for disk operation stats. It adds support for reading disk operations from qemu blockstats. For storing these without changing the current rrd stats, a new rrd definition version needs to be used. Because of this the used rrd fervsion string has been adjusted to the new

[pve-devel] [PATCH manager 0/3] add disk operations stats for VMs

2017-06-19 Thread Tobias Böhm
These patches add support for disk operations statistics for VMs. In order to store these without losing previous stats a new rrd definition version is introduced. For now it updates the new rrds additionally to the previous ones in order to provide no data loss during rollout of the new package

[pve-devel] [PATCH manager 3/3] add disk iops to summary panel

2017-06-19 Thread Tobias Böhm
--- www/manager6/data/RRDStore.js | 2 ++ www/manager6/data/ResourceStore.js | 14 ++ www/manager6/lxc/Summary.js| 7 +++ www/manager6/panel/RRDChart.js | 7 +++ www/manager6/qemu/Summary.js | 7 +++ 5 files changed, 37 insertions(+) diff --git

[pve-devel] [PATCH manager 1/3] Add support for new rrd definiton

2017-06-19 Thread Tobias Böhm
Look for the new rrd definition version first, so it is prefered to the previous versions. Signed-off-by: Tobias Böhm --- PVE/API2Tools.pm | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/PVE/API2Tools.pm b/PVE/API2Tools.pm index

[pve-devel] [PATCH container 1/2] Add disk operations to vmstatus

2017-06-19 Thread Tobias Böhm
Currently, only read/write bytes are extracted from cgroups stats. In order to provide IO operation stats these counters need to be read as well. Signed-off-by: Tobias Böhm --- src/PVE/LXC.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/LXC.pm

[pve-devel] [PATCH container 0/2] add disk operations stats for VMs

2017-06-19 Thread Tobias Böhm
These commit adds support for disk operation stats. It adds support for reading disk operations from cgroups the same way that byte counts are read. For storing these without changing the current rrd stats, a new rrd definition version needs to be used. Because of this the used rrd fervsion string

[pve-devel] [PATCH container 2/2] Change rrd key in rrd path

2017-06-19 Thread Tobias Böhm
RRD data is stored in a new directory. In order to get use this new key in the request to rrdcached. Signed-off-by: Tobias Böhm --- src/PVE/API2/LXC.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index

[pve-devel] [PATCH manager 2/3] add broadcast for new rrd format

2017-06-19 Thread Tobias Böhm
--- PVE/Service/pvestatd.pm | 57 ++--- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm index 2c8454d6..17707e8b 100755 --- a/PVE/Service/pvestatd.pm +++ b/PVE/Service/pvestatd.pm @@

[pve-devel] [PATCH qemu-server 2/2] Change rrd key in rrd path

2017-06-19 Thread Tobias Böhm
RRD data is stored in a new directory. In order to get use this new key in the request to rrdcached. Signed-off-by: Tobias Böhm --- PVE/API2/Qemu.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index

Re: [pve-devel] [PATCH v6 pve-storage 0/1] FreeNAS storage plugin

2017-06-19 Thread Fabian Grünbichler
On Mon, Jun 19, 2017 at 08:28:57AM +0200, Michael Rasmussen wrote: > Hi Fabian, > If I understand you correctly you want a separate patch for every fix comment? > no. please re-read the rather lengthy part of my e-mail in response to v5 (quoted in full below). a short summary: - individual

[pve-devel] applied: [PATCH manager] Fix SafeDestroy when entering a numeric resource ID

2017-06-19 Thread Wolfgang Bumiller
applied On Wed, Jun 14, 2017 at 11:22:20AM +0200, Emmanuel Kasper wrote: > In a previous commit, the inputField of SafeDestroy.js was converted > from a numberfield to a textfield to allow ceph pools names to be > entered. > This means the type of 'value' changed from number to string and > the

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Fabian Grünbichler
On Fri, Jun 16, 2017 at 10:28:39PM +0200, Michael Rasmussen wrote: > On Fri, 16 Jun 2017 14:21:34 +0200 > Fabian Grünbichler wrote: > > > > > one big point that I haven't really looked at is whether you need to > > guard some operations with locks. especially the

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Fabian Grünbichler
On Fri, Jun 16, 2017 at 03:42:07PM +0200, datanom.net wrote: > Hi Fabian, > > Most of your input I will study this weekend but a can give a quick answers > to a few comments which follows below. > > On 2017-06-16 14:21, Fabian Grünbichler wrote: > > > next unless $zvol->{name} =~

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread datanom.net
ah, now I get it. please correct me if I misunderstood something (again): - get all targettoextent mappings and loop over them - only look at those with the desired target and with a lunid that is in the "special range" reserved for snapshots and state volumes - if the volume has an extent,

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread datanom.net
On 2017-06-19 09:35, Fabian Grünbichler wrote: I was afraid of something like this.. the whole API does not seem very though through unfortunately. let's see whether the paging is doable, and otherwise document this potential pitfall (e.g., having more than 1 snapshots on a busy big storage

[pve-devel] [PATCH cluster 1/1] Add new rrd version for VM disk operations

2017-06-19 Thread Tobias Böhm
To support disk read/write operations for VMs the rrd needs new DS for the two new metrics. In order to not lose old data a new rrd version pve5.0-vm is introduced. Signed-off-by: Tobias Böhm --- data/src/status.c | 49 + 1 file

Re: [pve-devel] [PATCH v6 pve-storage 0/1] FreeNAS storage plugin

2017-06-19 Thread Michael Rasmussen
Hi Fabian, If I understand you correctly you want a separate patch for every fix comment? On June 19, 2017 8:24:36 AM GMT+02:00, "Fabian Grünbichler" wrote: >On Sat, Jun 17, 2017 at 11:52:41PM +0200, m...@datanom.net wrote: >> From: Michael Rasmussen

Re: [pve-devel] [PATCH v6 pve-storage 0/1] FreeNAS storage plugin

2017-06-19 Thread Fabian Grünbichler
On Sat, Jun 17, 2017 at 11:52:41PM +0200, m...@datanom.net wrote: > From: Michael Rasmussen > > This is a patch to be added to v5 of the patch series. > sorry - but like I said this is not how patches are supposed to be sent. please split up your patch series into sensible

Re: [pve-devel] [PATCH manager] Fix SafeDestroy when entering a numeric resource ID

2017-06-19 Thread Dominik Csapak
Acked-by: Dominik Csapak On 06/14/2017 11:22 AM, Emmanuel Kasper wrote: In a previous commit, the inputField of SafeDestroy.js was converted from a numberfield to a textfield to allow ceph pools names to be entered. This means the type of 'value' changed from number to

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Fabian Grünbichler
On Fri, Jun 16, 2017 at 10:50:57PM +0200, Michael Rasmussen wrote: > On Fri, 16 Jun 2017 14:21:34 +0200 > Fabian Grünbichler wrote: > > > > my $limit = 1; # limit for get requests > > > > this seems kind of arbitrary? if you really need such limit, you also > >

[pve-devel] applied: [PATCH guest-common] replication: replicate_volume: rate can be undefined

2017-06-19 Thread Dietmar Maurer
applied ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Fabian Grünbichler
On Sun, Jun 18, 2017 at 12:47:30AM +0200, Michael Rasmussen wrote: > Hi Fabian, > > On Fri, 16 Jun 2017 14:21:34 +0200 > Fabian Grünbichler wrote: > > > > sub volume_resize { > > > my ($class, $scfg, $storeid, $volname, $size, $running) = @_; > > > > > > my

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread Fabian Grünbichler
On Mon, Jun 19, 2017 at 11:59:10AM +0200, datanom.net wrote: > On 2017-06-19 09:33, Fabian Grünbichler wrote: > > > > AFAICT, mount will always guess NFS if there is a ':' anywhere in the > > source path: > > > > No, mount only guess NFS if run through PVE::Tools:run_command. Running the >

Re: [pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

2017-06-19 Thread datanom.net
On 2017-06-19 12:57, Fabian Grünbichler wrote: but it seems like there is some kind of test run earlier, because when I manually symlink an actual block device to a path with a colon in it, mounting it works as expected, both with run_command and manually. maybe the root cause is still

[pve-devel] [PATCH qemu-server] fix #1417: check if storage has 'images' set in content

2017-06-19 Thread Dominik Csapak
otherwise, qm and the api ignore this setting completely when creating a vm Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 76fd0e4..388ade1 100644 --- a/PVE/API2/Qemu.pm

[pve-devel] [PATCH manager] add replication to stateprovider dictionary

2017-06-19 Thread Dominik Csapak
to show the number in the url fragment instead of 'replication' also change the itemid in the datacenter to 'replication' from 'replica' Signed-off-by: Dominik Csapak --- www/manager6/StateProvider.js | 1 + www/manager6/dc/Config.js | 2 +- 2 files changed, 2