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

2019-08-27 Thread Fabian Ebner
Otherwise two blank lines between sections cause the loop to end prematurely. Signed-off-by: Fabian Ebner --- src/PVE/SectionConfig.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index dcecce6..1bb285f 100644

[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 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 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

[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's

[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

[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

[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

[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

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

[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-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

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

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
-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..3ce06be 100644 --- a/PVE

[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 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 deletions(-) diff --git a/src/PVE

[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 deletions(-) diff --git a/src/PVE/HA

[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/Manager.pm |

[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 ha-manager 00/13] Implement a stop command for HA

2019-09-26 Thread Fabian Ebner
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 Implement

[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 | 34

[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 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 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 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 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

[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
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 timeout parameter

[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/Manager.pm |

[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, 44 insertions(+), 2

[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 | 37

[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

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

2019-09-24 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 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/Manager.pm |

[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
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 simulation Add

[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 | 37

[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 deletions(-) diff --git a/src/PVE/HA

[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 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 pve-zsync] Allow detecting a syncing instance of a job

2019-09-30 Thread Fabian Ebner
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 425ffa2..90c1bb3 100755

[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_met

[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 ++-- 1

[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 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 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 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

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

2019-11-07 Thread Fabian Ebner
On 11/7/19 9:34 AM, Fabian Grünbichler wrote: On November 6, 2019 1:46 pm, Fabian Ebner wrote: 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

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

2019-11-06 Thread Fabian Ebner
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/local

[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 parameter

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

2019-11-07 Thread Fabian Ebner
Thanks for the suggestions, I'll do a v3. On 11/6/19 8:40 PM, Thomas Lamprecht wrote: On 11/6/19 10:46 AM, Fabian Ebner wrote: 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

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

2019-11-07 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Changes from v2: * Better example of when a special device is useful * Don't mention special_small_blocks property in the first section, so it is explained right when we use it for the first time * Explain possible values for size right away

Re: [pve-devel] [PATCH qemu-server] Use crm-command stop to allow shutdown with timeout and hard stop for HA

2019-11-13 Thread Fabian Ebner
On 11/13/19 9:55 AM, Thomas Lamprecht wrote: On 11/12/19 11:03 AM, Fabian Ebner wrote: The minimum value for timeout in vm_shutdown is changed from 0 to 1, since a value of 0 would trigger a hard stop for HA managed VMs. Like this the API description stays valid for all cases. Signed-off

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

2019-11-18 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Changes from v3: * 'path' renamed to 'mountpoint' pve-storage-zfspool.adoc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/pve-storage-zfspool.adoc b/pve-storage-zfspool.adoc index f53a598..366a1f3 100644 --- a/pve-storage-zfspool.adoc +++ b/pve

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

2019-11-18 Thread Fabian Ebner
When adding a zfspool storage with 'pvesm add' the mount point is now added automatically to the storage configuration if it can be determined. path() does not assume the default mountpoint anymore, fixing 2085. Signed-off-by: Fabian Ebner --- Changes from v3: * create a new 'mounpoint

[pve-devel] [PATCH container] Use crm-command stop to allow shutdown with timeout and hard stop for HA

2019-11-12 Thread Fabian Ebner
The minimum value for timeout in vm_shutdown is changed from 0 to 1, since a value of 0 would trigger a hard stop for HA managed containers. Like this the API description stays valid for all cases. Signed-off-by: Fabian Ebner --- src/PVE/API2/LXC/Status.pm | 6 +++--- 1 file changed, 3

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

2019-11-12 Thread Fabian Ebner
The minimum value for timeout in vm_shutdown is changed from 0 to 1, since a value of 0 would trigger a hard stop for HA managed VMs. Like this the API description stays valid for all cases. Signed-off-by: Fabian Ebner --- In vm_shutdown we'd like to pass along the timeout parameter to the HA

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

2019-11-12 Thread Fabian Ebner
On 11/7/19 12:59 PM, Fabian Grünbichler wrote: On November 7, 2019 12:52 pm, Fabian Ebner wrote: On 11/7/19 9:34 AM, Fabian Grünbichler wrote: On November 6, 2019 1:46 pm, Fabian Ebner wrote: A new mountpoint property is added to the schema for ZFSPool storages. When needed for the first time

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

2019-11-07 Thread Fabian Ebner
On 11/7/19 9:34 AM, Fabian Grünbichler wrote: On November 6, 2019 1:46 pm, Fabian Ebner wrote: 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

[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

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

2019-11-07 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 --- Changes from v1: * expanded eval around the zfs_request * check if the returned

Re: [pve-devel] [PATCH v2 storage 1/3] fix #2467 remove duplicate volumes & tag with correct content type

2019-11-20 Thread Fabian Ebner
On 11/20/19 11:35 AM, Tim Marx wrote: The bugfix for #2317 introduced a kind of odd api behavior, where each volume was returned twice from our api if a storage has both 'rootdir' & 'images' content types enabled. To give the content type of the volume an actual meaning, it is now inferred form

[pve-devel] [PATCH installer 1/2] Remove unused hdsize from zfs advanced options

2019-11-21 Thread Fabian Ebner
When a zpool is created the whole disks are used, so a user cannot set a size limit in this case. Signed-off-by: Fabian Ebner --- proxinstall | 1 - 1 file changed, 1 deletion(-) diff --git a/proxinstall b/proxinstall index 5d02b34..93a61cb 100755 --- a/proxinstall +++ b/proxinstall @@ -2877,7

[pve-devel] [PATCH installer 2/2] Fix typos

2019-11-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- proxinstall | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/proxinstall b/proxinstall index 93a61cb..268bc91 100755 --- a/proxinstall +++ b/proxinstall @@ -678,7 +678,7 @@ sub read_cmap { } } -# search

Re: [pve-devel] [PATCH installer 1/2] Remove unused hdsize from zfs advanced options

2019-11-21 Thread Fabian Ebner
On 11/21/19 12:48 PM, Thomas Lamprecht wrote: On 11/21/19 12:35 PM, Fabian Ebner wrote: When a zpool is created the whole disks are used, so a user cannot set a size limit in this case. are you sure?? AFAICR, this was added to ZFS so that one can leave some free space to add a swap device

[pve-devel] [PATCH container] Always determine the size of the volume in volume_rescan

2019-12-03 Thread Fabian Ebner
Otherwise there is an issue when resizing a volume with pending changes: 1. Have a running container with a mount point 2. Edit the mount point and change the path 3. Resize the mount point 4. Reboot the container Result: the old size is written to the config. Signed-off-by: Fabian Ebner

[pve-devel] [PATCH v2 storage] When resizing a ZFS volume, align size to 1M

2019-12-08 Thread Fabian Ebner
The size is required to be a multiple of volblocksize. Make sure that the requirement is always met, so ZFS won't complain when we do things like 'qm resize 102 scsi1 +0.01G'. Signed-off-by: Fabian Ebner --- Changes from v1: * Always align to 1M to avoid requesting volblocksize PVE

[pve-devel] [PATCH storage] Use a common find_free_diskname in all plugins

2019-12-09 Thread Fabian Ebner
The local versions of find_free_diskname retrieved the relevant disk list using plugin-specific code and called get_next_vm_diskname. We can use list_images instead to allow for a common interface and avoid having those similar methods. Signed-off-by: Fabian Ebner --- I did not test

[pve-devel] [PATCH v2 storage] Use a common interface for find_free_diskname

2019-12-11 Thread Fabian Ebner
the custom version. Signed-off-by: Fabian Ebner --- Changes from v1: * Keep the custom versions in LVMPlugin and RBDPlugin * Do not change the interface for get_next_vm_diskname Thanks to Fabian for the suggestions! PVE/Storage/GlusterfsPlugin.pm | 15 ++- PVE/Storage

[pve-devel] [PATCH storage 1/3] Lock storage when calling volume_import

2019-12-12 Thread Fabian Ebner
to avoid a potential race for two processes trying to allocate the same volume. Signed-off-by: Fabian Ebner --- This is conceptually independent from patches 2+3 (but patch 3 modfies the same hunk as this one). PVE/Storage.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[pve-devel] [PATCH storage 3/3] Mask world rwx and group wx for newly allocated images and when converting to base image

2019-12-12 Thread Fabian Ebner
Following the rationale in afdfbe5594be5a0a61943de10cc5671ac53cbf79, mask these bits for 'clone_image' and 'volume_import'. Also mask in 'chmod' for new base images for consistency. Signed-off-by: Fabian Ebner --- This would make the permissions more consistent, but is not really important. We

[pve-devel] [PATCH storage 2/3] Create run_with_umask helper

2019-12-12 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Only makes sense together with patch 3. PVE/Storage.pm | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ae2ea53..3e65e06 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -103,6

[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 ++-- 1

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 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

[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 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

  1   2   3   4   5   >