[pve-devel] [PATCH common 2/2] Cleanup to make style consistent

2019-08-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/SectionConfig.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index a760459..394aae6 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -334,7 +334,7 @@ sub

[pve-devel] [PATCH common 1/2] Fix 2339: Handle multiple blank lines correctly

2019-08-28 Thread Fabian Ebner
the end of a section, I changed it to only skip comments. Signed-off-by: Fabian Ebner --- Changes from v1: * fix line number counting * style src/PVE/SectionConfig.pm | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE

[pve-devel] [PATCH pve-docs 09/12] Fix typo in pvesr.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pvesr.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvesr.adoc b/pvesr.adoc index 2bcc4d9..83ab268 100644 --- a/pvesr.adoc +++ b/pvesr.adoc @@ -214,7 +214,7 @@ to Node B manually. WARNING: If expected votes are set avoid changes which

[pve-devel] [PATCH pve-docs 10/12] Fix typos in pveum.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pveum.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pveum.adoc b/pveum.adoc index 77f7aec..37347e6 100644 --- a/pveum.adoc +++ b/pveum.adoc @@ -442,7 +442,7 @@ Each(`and`) or any(`or`) further element in the current list has to be

[pve-devel] [PATCH pve-docs 02/12] Fix typos in local-zfs.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- local-zfs.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local-zfs.adoc b/local-zfs.adoc index af330e1..b4fb7db 100644 --- a/local-zfs.adoc +++ b/local-zfs.adoc @@ -236,7 +236,7 @@ As `` it is possible to use more devices, like it&#

[pve-devel] [PATCH pve-docs 05/12] Fix typos in pve-gui.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pve-gui.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pve-gui.adoc b/pve-gui.adoc index 2d1cd28..0a84a01 100644 --- a/pve-gui.adoc +++ b/pve-gui.adoc @@ -60,7 +60,7 @@ When you connect to the server, you will first see the login

[pve-devel] [PATCH pve-docs 03/12] Fix typo in output-format.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- output-format.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output-format.adoc b/output-format.adoc index 03c1253..3dcfa38 100644 --- a/output-format.adoc +++ b/output-format.adoc @@ -8,7 +8,7 @@ FORMAT_OPTIONS endif::manvolnum[] It

[pve-devel] [PATCH pve-docs 06/12] Fix typos in pveceph.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pveceph.adoc | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pveceph.adoc b/pveceph.adoc index 72210f3..ebf9ef7 100644 --- a/pveceph.adoc +++ b/pveceph.adoc @@ -243,7 +243,7 @@ The Ceph Monitor (MON) footnote:[Ceph Monitor

[pve-devel] [PATCH pve-docs 12/12] Fix typos in vzdump.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- vzdump.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vzdump.adoc b/vzdump.adoc index fb1ac3d..e990982 100644 --- a/vzdump.adoc +++ b/vzdump.adoc @@ -78,7 +78,7 @@ consistency, the use of the `snapshot` mode is recommended instead

[pve-devel] [PATCH pve-docs 08/12] Fix typos in pvesm.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pvesm.adoc | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pvesm.adoc b/pvesm.adoc index 5300f50..c2be9fe 100644 --- a/pvesm.adoc +++ b/pvesm.adoc @@ -40,7 +40,7 @@ copy VM image data, so live migration is very fast in that case

[pve-devel] [PATCH pve-docs 11/12] Fix typos in system-booting.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- system-booting.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-booting.adoc b/system-booting.adoc index 8400a26..d3d7813 100644 --- a/system-booting.adoc +++ b/system-booting.adoc @@ -120,7 +120,7 @@ initrd /EFI/proxmox

[pve-devel] [PATCH pve-docs 04/12] Fix typo in pct.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pct.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pct.adoc b/pct.adoc index 2cb4bbe..2f1d329 100644 --- a/pct.adoc +++ b/pct.adoc @@ -739,7 +739,7 @@ If you have a cluster, you can migrate your Containers with This works as long as

[pve-devel] [PATCH pve-docs 01/12] Fix typos in ha-manager.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- ha-manager.adoc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ha-manager.adoc b/ha-manager.adoc index 00a96e9..284e5fb 100644 --- a/ha-manager.adoc +++ b/ha-manager.adoc @@ -100,7 +100,7 @@ carefully calculate the benefits, and

[pve-devel] [PATCH pve-docs 07/12] Fix typos in pvecm.adoc

2019-09-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pvecm.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvecm.adoc b/pvecm.adoc index e986a75..0c7e14c 100644 --- a/pvecm.adoc +++ b/pvecm.adoc @@ -40,7 +40,7 @@ Grouping nodes into a cluster has the following advantages

[pve-devel] [PATCH storage] Actually use target_volid

2019-09-11 Thread Fabian Ebner
Migration with --targetstorage was broken because of this. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 755eca8..31eeb21 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -586,7

Re: [pve-devel] [PATCH storage] Actually use target_volid

2019-09-12 Thread Fabian Ebner
On 9/11/19 1:18 PM, Thomas Lamprecht wrote: On 11.09.19 11:46, Fabian Ebner wrote: Migration with --targetstorage was broken because of this. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage.pm b/PVE

Re: [pve-devel] [PATCH storage] Actually use target_volid

2019-09-16 Thread Fabian Ebner
On 9/12/19 11:03 AM, Fabian Ebner wrote: On 9/11/19 1:18 PM, Thomas Lamprecht wrote: On 11.09.19 11:46, Fabian Ebner wrote: Migration with --targetstorage was broken because of this. Signed-off-by: Fabian Ebner ---   PVE/Storage.pm | 4 ++--   1 file changed, 2 insertions(+), 2 deletions

[pve-devel] [PATCH] Check if VM is running when migrating with --online 1

2019-09-16 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index b30931d..ab5912c 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3341,6 +3341,9 @@ __PACKAGE__->register_method({ if (PVE::QemuSer

[pve-devel] [PATCH v2 qemu-server] Improve handling and description of migrate with --online

2019-09-23 Thread Fabian Ebner
Thanks to Stefan and Thomas for the suggestions. Changes from v1: * update parameter description * warn instead of die Signed-off-by: Fabian Ebner --- PVE/API2/Qemu.pm | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index

Re: [pve-devel] applied: [PATCH v2 qemu-server] Improve handling and description of migrate with --online

2019-09-23 Thread Fabian Ebner
On 9/23/19 2:19 PM, Thomas Lamprecht wrote: On 9/23/19 9:56 AM, Fabian Ebner wrote: Thanks to Stefan and Thomas for the suggestions. Changes from v1: * update parameter description * warn instead of die This information is better to go a bit below, namely... Signed-off-by: Fabian Ebner

[pve-devel] [PATCH ha-manager 06/13] Use timeout for shutdown in LRM

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index 3b4a572..7002ddd 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -535,7 +535,7 @@ sub manage_resources { my

[pve-devel] [PATCH ha-manager 03/13] Add update_service_config to HA environment interface

2019-09-26 Thread Fabian Ebner
Makes update_resources_config accessible via the HA environment. Signed-off-by: Fabian Ebner --- src/PVE/HA/Env.pm | 6 ++ src/PVE/HA/Env/PVE2.pm | 6 ++ src/PVE/HA/Sim/Env.pm | 6 ++ 3 files changed, 18 insertions(+) diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm index

[pve-devel] [PATCH ha-manager 00/13] Implement a stop command for HA

2019-09-26 Thread Fabian Ebner
lowing the service config to be updated from within the manager. Fabian Ebner (13): Make parameters for LRM resource commands more flexible Move code updating resource config from API2::HA::Resources to HA::Config Add update_service_config to HA environment interface

[pve-devel] [PATCH ha-manager 13/13] Cleanup

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Manager.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index 8031ca1..3c4cf61 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -342,7 +342,7 @@ sub

[pve-devel] [PATCH ha-manager 02/13] Move code updating resource config from API2::HA::Resources to HA::Config

2019-09-26 Thread Fabian Ebner
This makes it easier to update the resource configuration from within the CRM/LRM stack, which is needed for the new 'stop' command. Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 31 +-- src/PVE/HA/Config.pm

[pve-devel] [PATCH ha-manager 05/13] Add timeout parameter for shutdown

2019-09-26 Thread Fabian Ebner
Introduces a timeout parameter for shutting a resource down. If the parameter is 0, we perform a hard stop instead of a shutdown. Signed-off-by: Fabian Ebner --- src/PVE/HA/Resources.pm | 2 +- src/PVE/HA/Resources/PVECT.pm | 14 ++ src/PVE/HA/Resources/PVEVM.pm | 16

[pve-devel] [PATCH ha-manager 07/13] Add stop command to the API

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 37 src/PVE/CLI/ha_manager.pm| 2 ++ 2 files changed, 39 insertions(+) diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm index 0682b57..4e7205f 100644 --- a/src/PVE

[pve-devel] [PATCH ha-manager 11/13] Add test for the stop command

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/test/test-stop-command1/README | 2 + src/test/test-stop-command1/cmdlist | 8 +++ src/test/test-stop-command1/hardware_status | 5 ++ src/test/test-stop-command1/log.expect | 69 + src/test/test-stop-command1

[pve-devel] [PATCH ha-manager 10/13] Log timeout parameter as well

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- I thought that logging the timeout parameter might be useful, since it is readily available and since it is used for the shutdown/stop distinction. src/PVE/HA/LRM.pm | 2 +- src/test/test-cfs-unavailable1/log.expect | 2 +- src/test

[pve-devel] [PATCH ha-manager 08/13] Add stop command to simulation

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- The name 'target' doesn't fit with the 'stop' command, so I wanted to change it. I went with 'param', but suggestions are welcome. src/PVE/HA/Sim/Hardware.pm | 26 +- 1 file changed, 17 insertions(+), 9

[pve-devel] [PATCH ha-manager 01/13] Make parameters for LRM resource commands more flexible

2019-09-26 Thread Fabian Ebner
This will allow for new parameters beside 'target' to be used. This is in preparation to allow for a 'timeout' parameter for a new 'stop' command. Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 14 +++--- 1 file changed, 7 insertions(+), 7 deletio

[pve-devel] [PATCH ha-manager 04/13] Implement update_service_config for simulation

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 16 1 file changed, 16 insertions(+) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index 8bd5cbd..d2c0ec0 100644 --- a/src/PVE/HA/Sim/Hardware.pm +++ b/src/PVE/HA/Sim/Hardware.pm @@ -109,6

[pve-devel] [PATCH ha-manager 09/13] Add crm command 'stop'

2019-09-26 Thread Fabian Ebner
Not every command parameter is 'target' anymore, so it was necessary to modify the parsing of $sd->{cmd}. Just changing the state to request_stop is not enough, we need to actually update the service configuration as well. Signed-off-by: Fabian Ebner --- src/PVE/HA/Ma

[pve-devel] [PATCH ha-manager 12/13] Whitespace cleanup

2019-09-26 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 10 +- src/PVE/HA/Manager.pm | 1 - src/PVE/HA/Resources/PVEVM.pm | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm index 4e7205f

[pve-devel] [PATCH qemu-server] Use new HA command to allow shutdown with timeout and stop

2019-09-26 Thread Fabian Ebner
This (obviously) depends on the patch series for the HA stop command. With this the corresponding API calls to ha-manager are initiated; previously everything resulted in "--state stopped" and therefore a shutdown with 60 seconds timeout. Signed-off-by: Fabian Ebner --- PVE/API2/Q

[pve-devel] [PATCH v2 ha-manager 04/12] Implement update_service_config for simulation

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 16 1 file changed, 16 insertions(+) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index 8bd5cbd..d2c0ec0 100644 --- a/src/PVE/HA/Sim/Hardware.pm +++ b/src/PVE/HA/Sim/Hardware.pm @@ -109,6

[pve-devel] [PATCH v2 ha-manager 06/12] Use timeout for shutdown in LRM

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index 3b4a572..e5eee94 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -535,7 +535,7 @@ sub manage_resources { my

[pve-devel] [PATCH v2 ha-manager 01/12] Make parameters for LRM resource commands more flexible

2019-09-30 Thread Fabian Ebner
This will allow for new parameters beside 'target' to be used. This is in preparation to allow for a 'timeout' parameter for a new 'stop' command. Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 14 +++--- 1 file changed, 7 insertions(+), 7 deletio

[pve-devel] [PATCH v2 ha-manager 11/12] Log timeout parameter when present

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index e5eee94..95ec351 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -774,7 +774,11 @@ sub exec_resource_agent

[pve-devel] [PATCH v2 ha-manager 07/12] Add stop command to the API

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 37 src/PVE/CLI/ha_manager.pm| 2 ++ 2 files changed, 39 insertions(+) diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm index 2b62ee8..ecc5f0c 100644 --- a/src/PVE

[pve-devel] [PATCH v2 ha-manager 08/12] Rename target to param in simulation

2019-09-30 Thread Fabian Ebner
In preparation to introduce a stop command with a timeout parameter. Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index d2c0ec0..ac0c142

[pve-devel] [PATCH v2 ha-manager 09/12] Add stop command to simulation

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 8 1 file changed, 8 insertions(+) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index ac0c142..7e1a8bc 100644 --- a/src/PVE/HA/Sim/Hardware.pm +++ b/src/PVE/HA/Sim/Hardware.pm @@ -543,6 +543,7 @@ sub

[pve-devel] [PATCH v2 ha-manager 05/12] Add timeout parameter for shutdown

2019-09-30 Thread Fabian Ebner
Introduces a timeout parameter for shutting a resource down. If the parameter is 0, we perform a hard stop instead of a shutdown. Signed-off-by: Fabian Ebner --- src/PVE/HA/Resources.pm | 2 +- src/PVE/HA/Resources/PVECT.pm | 14 ++ src/PVE/HA/Resources/PVEVM.pm | 16

[pve-devel] [PATCH v2 ha-manager 00/12] Implement a stop command for HA

2019-09-30 Thread Fabian Ebner
parate renaming and adding the new command Fabian Ebner (12): Make parameters for LRM resource commands more flexible Move code updating resource config from API2::HA::Resources to HA::Config Add update_service_config to HA environment interface Implement update_service_config for s

[pve-devel] [PATCH v2 ha-manager 03/12] Add update_service_config to HA environment interface

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Env.pm | 6 ++ src/PVE/HA/Env/PVE2.pm | 6 ++ src/PVE/HA/Sim/Env.pm | 6 ++ 3 files changed, 18 insertions(+) diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm index bb37486..7acd7c5 100644 --- a/src/PVE/HA/Env.pm +++ b/src/PVE/HA

[pve-devel] [PATCH v2 ha-manager 02/12] Move code updating resource config from API2::HA::Resources to HA::Config

2019-09-30 Thread Fabian Ebner
This makes it easier to update the resource configuration from within the CRM/LRM stack, which is needed for the new 'stop' command. Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 34 + src/PVE/HA/Config.pm

[pve-devel] [PATCH v2 ha-manager 12/12] Add test for the stop command

2019-09-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/test/test-stop-command1/README | 2 + src/test/test-stop-command1/cmdlist | 8 +++ src/test/test-stop-command1/hardware_status | 5 ++ src/test/test-stop-command1/log.expect | 69 + src/test/test-stop-command1

[pve-devel] [PATCH v2 ha-manager 10/12] Add crm command 'stop'

2019-09-30 Thread Fabian Ebner
Not every command parameter is 'target' anymore, so it was necessary to modify the parsing of $sd->{cmd}. Just changing the state to request_stop is not enough, we need to actually update the service configuration as well. Signed-off-by: Fabian Ebner --- src/PVE/HA/Ma

[pve-devel] [PATCH pve-zsync] Allow detecting a syncing instance of a job

2019-09-30 Thread Fabian Ebner
instance is already scheduled to sync. [0]: https://forum.proxmox.com/threads/pve-zsync-bug-spawns-endless-cron-processes.58087/ Signed-off-by: Fabian Ebner --- pve-zsync | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pve-zsync b/pve-zsync index 425

Re: [pve-devel] [PATCH v2 ha-manager 07/12] Add stop command to the API

2019-10-01 Thread Fabian Ebner
On 9/30/19 5:13 PM, Thomas Lamprecht wrote: On 9/30/19 9:22 AM, Fabian Ebner wrote: Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 37 src/PVE/CLI/ha_manager.pm| 2 ++ 2 files changed, 39 insertions(+) besides the nit^Wfact that

Re: [pve-devel] [PATCH pve-zsync] Allow detecting a syncing instance of a job

2019-10-01 Thread Fabian Ebner
On 10/1/19 10:29 AM, Fabian Grünbichler wrote: On September 30, 2019 12:55 pm, Fabian Ebner wrote: Before, the check whether a syncing instance of the same job is already present was inside the locked section. This caused cron to continuously spawn new instances of pve-zsync on syncs (or rather

[pve-devel] [PATCH storage] Use bigger timeouts for zfs operations

2019-10-01 Thread Fabian Ebner
eim-l%C3%B6schen-des-entfernen-replikats-bei-entfernung-der-replikation.58467/ Signed-off-by: Fabian Ebner --- PVE/Storage/ZFSPoolPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index f66b277..3ce0

[pve-devel] [PATCH v3 ha-manager 4/9] Add timeout parameter for shutdown

2019-10-02 Thread Fabian Ebner
Introduces a timeout parameter for shutting a resource down. If the parameter is 0, we perform a hard stop instead of a shutdown. Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 4 ++-- src/PVE/HA/Resources.pm | 2 +- src/PVE/HA/Resources/PVECT.pm | 14

[pve-devel] [PATCH v3 ha-manager 1/9] Move code updating resource config from API2::HA::Resources to HA::Config

2019-10-02 Thread Fabian Ebner
This makes it easier to update the resource configuration from within the CRM/LRM stack, which is needed for the new 'stop' command. Signed-off-by: Fabian Ebner --- src/PVE/API2/HA/Resources.pm | 34 + src/PVE/HA/Config.pm

[pve-devel] [PATCH v3 ha-manager 2/9] Add update_service_config to HA environment interface

2019-10-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Env.pm | 6 ++ src/PVE/HA/Env/PVE2.pm | 6 ++ src/PVE/HA/Sim/Env.pm | 6 ++ 3 files changed, 18 insertions(+) diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm index bb37486..ac569a9 100644 --- a/src/PVE/HA/Env.pm +++ b/src/PVE/HA

[pve-devel] [PATCH v3 ha-manager 8/9] Log timeout parameter when present

2019-10-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index e5eee94..95ec351 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -774,7 +774,11 @@ sub exec_resource_agent

[pve-devel] [PATCH v3 ha-manager 5/9] Introduce crm-command to CLI and add stop as a subcommand

2019-10-02 Thread Fabian Ebner
This should reduce confusion between the old 'set --state stopped' and the new 'stop' command by making it explicit that it is sent as a crm command. Signed-off-by: Fabian Ebner --- src/PVE/CLI/ha_manager.pm | 46 +-- 1 file changed,

[pve-devel] [PATCH v3 ha-manager 9/9] Add test for the stop command

2019-10-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/test/test-stop-command1/README | 2 + src/test/test-stop-command1/cmdlist | 8 +++ src/test/test-stop-command1/hardware_status | 5 ++ src/test/test-stop-command1/log.expect | 69 + src/test/test-stop-command1

[pve-devel] [PATCH v3 ha-manager 6/9] Add stop command to simulation

2019-10-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 8 1 file changed, 8 insertions(+) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index 3cdc85b..121cd1b 100644 --- a/src/PVE/HA/Sim/Hardware.pm +++ b/src/PVE/HA/Sim/Hardware.pm @@ -541,6 +541,7 @@ sub

[pve-devel] [PATCH v3 ha-manager 0/9] Implement a stop command for HA

2019-10-02 Thread Fabian Ebner
a crm-command command in the CLI and implement stop as a subcommand locally Fabian Ebner (9): Move code updating resource config from API2::HA::Resources to HA::Config Add update_service_config to HA environment interface Implement update_service_config for simulation Add t

[pve-devel] [PATCH v3 ha-manager 3/9] Implement update_service_config for simulation

2019-10-02 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Sim/Hardware.pm | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm index 9c0ad05..3cdc85b 100644 --- a/src/PVE/HA/Sim/Hardware.pm +++ b/src/PVE/HA/Sim/Hardware.pm @@ -109,6 +109,20

[pve-devel] [PATCH v3 ha-manager 7/9] Add crm command 'stop'

2019-10-02 Thread Fabian Ebner
Not every command parameter is 'target' anymore, so it was necessary to modify the parsing of $sd->{cmd}. Just changing the state to request_stop is not enough, we need to actually update the service configuration as well. Signed-off-by: Fabian Ebner --- src/PVE/HA/Ma

[pve-devel] [PATCH v2 pve-zsync] Improve locking and state handling

2019-10-03 Thread Fabian Ebner
e-enable such a job involuntarily. Disabling a 'waiting' job causes it to not sync anymore. Signed-off-by: Fabian Ebner --- Changes from v1: * Refactored locking as Thomas and Fabian suggested * Added 2 additional checks to not involuntarily re-enable a disabled job pve-zsync | 2

Re: [pve-devel] [PATCH v2 pve-zsync] Improve locking and state handling

2019-10-06 Thread Fabian Ebner
On 10/3/19 1:06 PM, Fabian Ebner wrote: On the one hand this introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron (they are always read together and almost always written together) and one for

Re: [pve-devel] [PATCH v3 ha-manager 4/9] Add timeout parameter for shutdown

2019-10-07 Thread Fabian Ebner
On 10/4/19 5:34 PM, Thomas Lamprecht wrote: On 10/2/19 11:46 AM, Fabian Ebner wrote: Introduces a timeout parameter for shutting a resource down. If the parameter is 0, we perform a hard stop instead of a shutdown. Signed-off-by: Fabian Ebner --- src/PVE/HA/LRM.pm | 4

[pve-devel] [PATCH v3 pve-zsync 2/2] Detect other instances of the same job and improve checks for a disabled job

2019-10-07 Thread Fabian Ebner
ously when sync finished it would re-enable such a job involuntarily. Disabling a 'waiting' job causes it to not sync anymore. Signed-off-by: Fabian Ebner --- Changes from v2: * Split into 2 patches Changes from v1: * Added 2 additional checks to

[pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-07 Thread Fabian Ebner
This introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron (they are always read together and almost always written together) and one for sync. Signed-off-by: Fabian Ebner --- Changes fr

[pve-devel] [PATCH storage 1/2] Fix use of worker in vdisk_free

2019-10-08 Thread Fabian Ebner
Previously 'free_image' would be executed right away, which is not the intended behaviour. Signed-off-by: Fabian Ebner --- This is a followup to [0] but it has nothing to do with the original patch so I didn't put a v2. [0]: https://pve.proxmox.com/pipermail/pve-devel/2019-Octo

[pve-devel] [PATCH storage 2/2] Whitespace cleanup

2019-10-08 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/ZFSPoolPlugin.pm | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index f66b277..16fb0d6 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE

Re: [pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-08 Thread Fabian Ebner
On 10/8/19 11:09 AM, Thomas Lamprecht wrote: On 10/8/19 11:00 AM, Thomas Lamprecht wrote: On 10/7/19 11:16 AM, Fabian Ebner wrote: This introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron

Re: [pve-devel] [PATCH storage 1/2] Fix use of worker in vdisk_free

2019-10-08 Thread Fabian Ebner
On 10/8/19 11:21 AM, Thomas Lamprecht wrote: On 10/8/19 10:48 AM, Fabian Ebner wrote: Previously 'free_image' would be executed right away, which is not the intended behaviour. Signed-off-by: Fabian Ebner --- This is a followup to [0] but it has nothing to do with the original

Re: [pve-devel] [PATCH storage] Use bigger timeouts for zfs operations

2019-10-09 Thread Fabian Ebner
On 10/1/19 12:28 PM, Fabian Grünbichler wrote: On October 1, 2019 12:17 pm, Fabian Ebner wrote: Seems like 'zfs destroy' can take longer than 5 seconds, see [0]. I changed the timeout to 15 seconds and also changed the default timeout to 10 instead of 5 seconds, to be on the safe side

[pve-devel] [PATCH v4 pve-zsync 3/4] Detect other running instances of the same job

2019-10-10 Thread Fabian Ebner
A 'waiting' state is introduced and other 'waiting' and 'syncing' instances of the same job are now detected by moving the check out from the sync lock. Signed-off-by: Fabian Ebner --- pve-zsync | 21 - 1 file changed, 16 insertions(+), 5 deleti

[pve-devel] [PATCH v4 pve-zsync 4/4] Check whether job has been disabled while waiting/syncing

2019-10-10 Thread Fabian Ebner
There are two new checks that allow disabling a job while it is 'syncing' or 'waiting'. Previously when sync finished it would re-enable such a job involuntarily. Disabling a 'waiting' job causes it to not sync anymore. Signed-off-by: Fabian Ebner --- pve-zsync |

[pve-devel] [PATCH v4 pve-zsync 2/4] Improve read-modify-write enclosures

2019-10-10 Thread Fabian Ebner
Previously inside sync we just called update_job directly, now we make sure to read the latest verison of the job first. Signed-off-by: Fabian Ebner --- $job is still used outside of such enclosures in sync_path but it is only passed along as a variable and we don't want to hold the cro

[pve-devel] [PATCH v4 pve-zsync 1/4] Refactor locking

2019-10-10 Thread Fabian Ebner
This introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron (they are always read together and almost always written together) and one for sync. Signed-off-by: Fabian Ebner --- Changes fr

[pve-devel] [PATCH v4 ha-manager 4/5] Introduce crm-command to CLI and add stop as a subcommand

2019-10-10 Thread Fabian Ebner
This should reduce confusion between the old 'set --state stopped' and the new 'stop' command by making explicit that it is sent as a crm command. Signed-off-by: Fabian Ebner --- src/PVE/CLI/ha_manager.pm | 46 +-- 1 file changed,

[pve-devel] [PATCH v4 ha-manager 5/5] Add test for the stop command

2019-10-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/test/test-stop-command1/README | 2 + src/test/test-stop-command1/cmdlist | 8 +++ src/test/test-stop-command1/hardware_status | 5 ++ src/test/test-stop-command1/log.expect | 69 + src/test/test-stop-command1

[pve-devel] [PATCH v4 ha-manager 0/5] Implement a stop command for HA

2019-10-10 Thread Fabian Ebner
lowing the service config to be updated from within the manager. Changes from v3: * Squashed and reordered as Thomas suggested Fabian Ebner (5): Add update_service_config to the HA environment interface and simulation Add timeout parameter for shutdown Add crm command 'stop&#

[pve-devel] [PATCH v4 ha-manager 1/5] Add update_service_config to the HA environment interface and simulation

2019-10-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- src/PVE/HA/Env.pm | 6 ++ src/PVE/HA/Env/PVE2.pm | 6 ++ src/PVE/HA/Sim/Env.pm | 6 ++ src/PVE/HA/Sim/Hardware.pm | 14 ++ 4 files changed, 32 insertions(+) diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm index

[pve-devel] [PATCH v4 ha-manager 2/5] Add timeout parameter for shutdown

2019-10-10 Thread Fabian Ebner
Introduces a timeout parameter for shutting a resource down. If the parameter is 0, we perform a hard stop instead of a shutdown. Signed-off-by: Fabian Ebner --- I did not find a way to pass along the parameters from change_service_state without having an special handling for either target

[pve-devel] [PATCH v4 ha-manager 3/5] Add crm command 'stop'

2019-10-10 Thread Fabian Ebner
Not every command parameter is 'target' anymore, so it was necessary to modify the parsing of $sd->{cmd}. Just changing the state to request_stop is not enough, we need to actually update the service configuration as well. Signed-off-by: Fabian Ebner --- src/PVE/HA/Manager

Re: [pve-devel] [PATCH storage] Use bigger timeouts for zfs operations

2019-10-10 Thread Fabian Ebner
On 10/10/19 10:29 AM, Fabian Grünbichler wrote: On October 10, 2019 8:55 am, Fabian Ebner wrote: On 10/1/19 12:28 PM, Fabian Grünbichler wrote: On October 1, 2019 12:17 pm, Fabian Ebner wrote: Seems like 'zfs destroy' can take longer than 5 seconds, see [0]. I changed the tim

[pve-devel] [PATCH pve-docs] Add section for ZFS Special Device

2019-10-22 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- local-zfs.adoc | 44 1 file changed, 44 insertions(+) diff --git a/local-zfs.adoc b/local-zfs.adoc index b4fb7db..378cbee 100644 --- a/local-zfs.adoc +++ b/local-zfs.adoc @@ -431,3 +431,47 @@ See the `encryptionroot

[pve-devel] [PATCH qemu-server 1/3] Update unused volumes in config when doing

2019-10-28 Thread Fabian Ebner
. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 16 1 file changed, 16 insertions(+) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 65f39b6..0e9fdcf 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -465,6 +465,12 @@ sub sync_disks { } else

[pve-devel] [PATCH 2/3 qemu-server] Avoid collisions of unused disks when doing

2019-10-28 Thread Fabian Ebner
Doing an online migration with --targetstorage and two unused disks with the same name on different storages failed, because they would collide on the target storage. This patch makes sure that we don't use the same name twice. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 8 ++

[pve-devel] [PATCH 3/3 qemu-server] Fix typo

2019-10-28 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index a01f0ca..448f584 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -958,7 +958,7 @@ sub phase3_cleanup { if (my

Re: [pve-devel] [PATCH qemu-server 1/3] Update unused volumes in config when doing

2019-10-28 Thread Fabian Ebner
On 10/28/19 10:57 AM, Fabian Ebner wrote: When doing an online migration with --targetstorage unused disks get migrated to the specified target storage as well. With this patch we keep track of those volumes and update the VM config with their new locations. Unused volumes of the VM previously

[pve-devel] [PATCH common] Allow WORKER_FLAG to be set manually for pvesr to avoid low timeouts

2019-10-29 Thread Fabian Ebner
We currently have a 5 seconds timeout for zfs_request for non-workers and that is too low for some use cases of pvesr. If we can set the WORKER_FLAG manually, we can work around the issue. Signed-off-by: Fabian Ebner --- User report where zfs destroy and zfs snapshot time out [0]. Previous

[pve-devel] [PATCH manager] Treat pvesr as a worker for storage operations

2019-10-29 Thread Fabian Ebner
We currently have a 5 seconds timeout for zfs_request for non-workers and that is too low for some use cases of pvesr. As a workaround we create fake workers doing the storage operations and use our own timeouts. Signed-off-by: Fabian Ebner --- Is 60 a good value for the timeout? Should we make

Re: [pve-devel] [PATCH qemu-server 1/3] Update unused volumes in config when doing

2019-10-30 Thread Fabian Ebner
On 10/29/19 7:28 PM, Thomas Lamprecht wrote: On 10/28/19 10:57 AM, Fabian Ebner wrote: When doing an online migration with --targetstorage unused disks get migrated to the specified target storage as well. With this patch we keep track of those volumes and update the VM config with their new

[pve-devel] [PATCH v2 qemu-server 3/3] Fix typo

2019-10-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index b2c0b0d..a3992c4 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3361,7 +3361,7 @@ __PACKAGE__->register_method({

[pve-devel] [PATCH v2 qemu-server 2/3] Avoid collisions of unused disks when doing online migration with --targetstorage

2019-10-30 Thread Fabian Ebner
Doing an online migration with --targetstorage and two unused disks with the same name on different storages failed, because they would collide on the target storage. This patch makes sure that we don't use the same name twice. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 8 ++

[pve-devel] [PATCH v2 qemu-server 1/3] Update unused volumes in config when doing online migration with --targetstorage

2019-10-30 Thread Fabian Ebner
. Signed-off-by: Fabian Ebner --- Changes from v1: * Check explicitly if it is an online migration and that the volume is referenced by the storage rather than something else * Patch 3 fixes another typo PVE/QemuMigrate.pm | 16 1 file changed, 16 insertions

Re: [pve-devel] [PATCH v2 qemu-server 2/3] Avoid collisions of unused disks when doing online migration with --targetstorage

2019-11-04 Thread Fabian Ebner
On 10/31/19 10:19 AM, Thomas Lamprecht wrote: On 10/30/19 10:54 AM, Fabian Ebner wrote: Doing an online migration with --targetstorage and two unused disks with the same name on different storages failed, because they would collide on the target storage. This patch makes sure that we don'

Re: [pve-devel] [PATCH pve-docs] Add section for ZFS Special Device

2019-11-06 Thread Fabian Ebner
m the zfs man page) * rewrote the last paragraph a bit On 10/22/19 12:33 PM, Fabian Ebner wrote: > Signed-off-by: Fabian Ebner > --- >   local-zfs.adoc | 44 >   1 file changed, 44 insertions(+) > > diff --git a/local-zfs.adoc b/

[pve-devel] [PATCH v2 docs] Add section for ZFS Special Device

2019-11-06 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Changes from v1: * Reworded the part that describes when a special device is useful * Moved that part to the top, so people know right away whether it's interesting for them * Add note about values for the special_small_blocks para

[pve-devel] [PATCH docs] Add description for mountpoint property

2019-11-06 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pve-storage-zfspool.adoc | 5 + 1 file changed, 5 insertions(+) diff --git a/pve-storage-zfspool.adoc b/pve-storage-zfspool.adoc index f53a598..cf7cc3f 100644 --- a/pve-storage-zfspool.adoc +++ b/pve-storage-zfspool.adoc @@ -32,6 +32,11 @@ sparse:: Use ZFS

[pve-devel] [PATCH storage] fix #2085: Handle non-default mount point in path() by introducing new mountpoint property

2019-11-06 Thread Fabian Ebner
A new mountpoint property is added to the schema for ZFSPool storages. When needed for the first time, the current mount point is determined and written to the storage config. Signed-off-by: Fabian Ebner --- PVE/Storage/ZFSPoolPlugin.pm | 25 +++-- 1 file changed, 23

[pve-devel] [PATCH v2 docs] Add description for mountpoint property

2019-11-07 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- pve-storage-zfspool.adoc | 5 + 1 file changed, 5 insertions(+) diff --git a/pve-storage-zfspool.adoc b/pve-storage-zfspool.adoc index f53a598..cf7cc3f 100644 --- a/pve-storage-zfspool.adoc +++ b/pve-storage-zfspool.adoc @@ -32,6 +32,11 @@ sparse:: Use ZFS

  1   2   3   4   5   >