From 88fab7bc949b8cbb7a95351ca75822a6a5bbc97a Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Thu, 8 Dec 2022 15:57:53 -0500 Subject: [PATCH 01/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 26 ++++++++++++++----- .../tasks/unregister_entities.yml | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index b5b21566..5268c47f 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -2,23 +2,37 @@ - name: Remove valid storage domain main block block: - name: Fetch active/maintenance/detached storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_active + + - name: Fetch maintenance storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_maintenance + + - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - ( - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} or - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} or {{ dr_unattached_domain_search }} - ) auth: "{{ ovirt_auth }}" - register: storage_domain_info + register: storage_domain_info_detached - name: Remove valid storage domain include_tasks: remove_domain_process.yml vars: sd: "{{ sd }}" with_items: - - "{{ storage_domain_info.ovirt_storage_domains }}" + - "{{ storage_domain_info_active.ovirt_storage_domains }}" + - "{{ storage_domain_info_maintenance.ovirt_storage_domains }}" + - "{{ storage_domain_info_detached.ovirt_storage_domains }}" when: (not only_master and not sd.master) or (only_master and sd.master) loop_control: loop_var: sd diff --git a/roles/disaster_recovery/tasks/unregister_entities.yml b/roles/disaster_recovery/tasks/unregister_entities.yml index e7ad22ab..64b6d0ac 100644 --- a/roles/disaster_recovery/tasks/unregister_entities.yml +++ b/roles/disaster_recovery/tasks/unregister_entities.yml @@ -27,7 +27,7 @@ - name: Init list property for running_vms ansible.builtin.set_fact: - res_ovirt_vms="[]" + res_ovirt_vms=[] - name: Map all running VMs in fact ansible.builtin.set_fact: From 8fc1bb646fc2a762d13b4045b3a945c171bad6b5 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Thu, 8 Dec 2022 15:57:53 -0500 Subject: [PATCH 02/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 26 ++++++++++++++----- .../tasks/unregister_entities.yml | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index b5b21566..5268c47f 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -2,23 +2,37 @@ - name: Remove valid storage domain main block block: - name: Fetch active/maintenance/detached storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_active + + - name: Fetch maintenance storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_maintenance + + - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - ( - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} or - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} or {{ dr_unattached_domain_search }} - ) auth: "{{ ovirt_auth }}" - register: storage_domain_info + register: storage_domain_info_detached - name: Remove valid storage domain include_tasks: remove_domain_process.yml vars: sd: "{{ sd }}" with_items: - - "{{ storage_domain_info.ovirt_storage_domains }}" + - "{{ storage_domain_info_active.ovirt_storage_domains }}" + - "{{ storage_domain_info_maintenance.ovirt_storage_domains }}" + - "{{ storage_domain_info_detached.ovirt_storage_domains }}" when: (not only_master and not sd.master) or (only_master and sd.master) loop_control: loop_var: sd diff --git a/roles/disaster_recovery/tasks/unregister_entities.yml b/roles/disaster_recovery/tasks/unregister_entities.yml index e7ad22ab..64b6d0ac 100644 --- a/roles/disaster_recovery/tasks/unregister_entities.yml +++ b/roles/disaster_recovery/tasks/unregister_entities.yml @@ -27,7 +27,7 @@ - name: Init list property for running_vms ansible.builtin.set_fact: - res_ovirt_vms="[]" + res_ovirt_vms=[] - name: Map all running VMs in fact ansible.builtin.set_fact: From 0e9c9ec5c2f941b27119062291ef7ede811de0b3 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Fri, 9 Dec 2022 17:32:13 -0500 Subject: [PATCH 03/16] remove trailing space Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 5268c47f..d4915e30 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -32,7 +32,7 @@ with_items: - "{{ storage_domain_info_active.ovirt_storage_domains }}" - "{{ storage_domain_info_maintenance.ovirt_storage_domains }}" - - "{{ storage_domain_info_detached.ovirt_storage_domains }}" + - "{{ storage_domain_info_detached.ovirt_storage_domains }}" when: (not only_master and not sd.master) or (only_master and sd.master) loop_control: loop_var: sd From 8fe7473a11c14015a8414dc42f273f468c9f177f Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Thu, 8 Dec 2022 15:57:53 -0500 Subject: [PATCH 04/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 26 ++++++++++++++----- .../tasks/unregister_entities.yml | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index b5b21566..5268c47f 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -2,23 +2,37 @@ - name: Remove valid storage domain main block block: - name: Fetch active/maintenance/detached storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_active + + - name: Fetch maintenance storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_maintenance + + - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - ( - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} or - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} or {{ dr_unattached_domain_search }} - ) auth: "{{ ovirt_auth }}" - register: storage_domain_info + register: storage_domain_info_detached - name: Remove valid storage domain include_tasks: remove_domain_process.yml vars: sd: "{{ sd }}" with_items: - - "{{ storage_domain_info.ovirt_storage_domains }}" + - "{{ storage_domain_info_active.ovirt_storage_domains }}" + - "{{ storage_domain_info_maintenance.ovirt_storage_domains }}" + - "{{ storage_domain_info_detached.ovirt_storage_domains }}" when: (not only_master and not sd.master) or (only_master and sd.master) loop_control: loop_var: sd diff --git a/roles/disaster_recovery/tasks/unregister_entities.yml b/roles/disaster_recovery/tasks/unregister_entities.yml index e7ad22ab..64b6d0ac 100644 --- a/roles/disaster_recovery/tasks/unregister_entities.yml +++ b/roles/disaster_recovery/tasks/unregister_entities.yml @@ -27,7 +27,7 @@ - name: Init list property for running_vms ansible.builtin.set_fact: - res_ovirt_vms="[]" + res_ovirt_vms=[] - name: Map all running VMs in fact ansible.builtin.set_fact: From 542310b6a0f8bff767b5f4eedaf652916a16b282 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Fri, 9 Dec 2022 17:32:13 -0500 Subject: [PATCH 05/16] remove trailing space Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 5268c47f..d4915e30 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -32,7 +32,7 @@ with_items: - "{{ storage_domain_info_active.ovirt_storage_domains }}" - "{{ storage_domain_info_maintenance.ovirt_storage_domains }}" - - "{{ storage_domain_info_detached.ovirt_storage_domains }}" + - "{{ storage_domain_info_detached.ovirt_storage_domains }}" when: (not only_master and not sd.master) or (only_master and sd.master) loop_control: loop_var: sd From e145fc8466b51b4a40a1cf8ef123ac5da22b77c5 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Thu, 8 Dec 2022 15:57:53 -0500 Subject: [PATCH 06/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index d4915e30..edea702d 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -5,7 +5,7 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_active @@ -13,7 +13,7 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_maintenance From c722a8a6ec778b6f176b9a924ee8e2ea5d731630 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Tue, 10 Jan 2023 11:57:27 -0500 Subject: [PATCH 07/16] rebase and remove trailing space. Update task name Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index edea702d..e705731d 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -1,7 +1,7 @@ --- - name: Remove valid storage domain main block block: - - name: Fetch active/maintenance/detached storage domain for remove + - name: Fetch active storage domain for remove ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and From 07636dbca42714f9d622a7f8cf62a5c1acbfa26b Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Wed, 11 Jan 2023 17:18:33 -0500 Subject: [PATCH 08/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index f23c5edd..b07bfd41 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -4,7 +4,7 @@ - name: Fetch active storage domain for remove ovirt_storage_domain_info: pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and + name={{ storage['dr_' + dr_source_map + '_name'] }} and datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_active @@ -25,22 +25,6 @@ auth: "{{ ovirt_auth }}" register: storage_domain_info_active - - name: Fetch maintenance storage domain for remove - ovirt_storage_domain_info: - pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} - auth: "{{ ovirt_auth }}" - register: storage_domain_info_maintenance - - - name: Fetch detached storage domain for remove - ovirt_storage_domain_info: - pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and - {{ dr_unattached_domain_search }} - auth: "{{ ovirt_auth }}" - register: storage_domain_info_detached - - name: Remove valid storage domain include_tasks: remove_domain_process.yml vars: From 06fbd1b419db43d80e8608ee39200e38f6c84dfd Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Wed, 11 Jan 2023 21:29:04 -0500 Subject: [PATCH 09/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index b07bfd41..91654892 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -21,9 +21,9 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" - register: storage_domain_info_active + register: storage_domain_info_detached - name: Remove valid storage domain include_tasks: remove_domain_process.yml From 155e656692eb7837a08031d559a0f98698ba4626 Mon Sep 17 00:00:00 2001 From: shubhaOracle <67933042+shubhaOracle@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:35:04 -0500 Subject: [PATCH 10/16] Update roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml move 1 character to the left Co-authored-by: Pavel Bar <48858225+barpavel@users.noreply.github.com> --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 91654892..0abd8259 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -20,7 +20,7 @@ - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and + name={{ storage['dr_' + dr_source_map + '_name'] }} and datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_detached From 60a95065e532d30892c6c4eb5e5e6c9b5cfd7531 Mon Sep 17 00:00:00 2001 From: shubhaOracle <67933042+shubhaOracle@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:36:02 -0500 Subject: [PATCH 11/16] Update roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml Remove redundant parts and trailing space Co-authored-by: Pavel Bar <48858225+barpavel@users.noreply.github.com> --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 0abd8259..3ad0164b 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -21,7 +21,7 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} + {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_detached From 9c65be5831f8763294dcbdd1f1151b23a0f58bee Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Thu, 8 Dec 2022 15:57:53 -0500 Subject: [PATCH 12/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index e705731d..f23c5edd 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -17,6 +17,22 @@ auth: "{{ ovirt_auth }}" register: storage_domain_info_maintenance + - name: Fetch detached storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_active + + - name: Fetch maintenance storage domain for remove + ovirt_storage_domain_info: + pattern: > + name={{ storage['dr_' + dr_source_map + '_name'] }} and + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} + auth: "{{ ovirt_auth }}" + register: storage_domain_info_maintenance + - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > From d07f5bf43241befa814539b55e7a40a7e6b9218d Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Wed, 11 Jan 2023 17:18:33 -0500 Subject: [PATCH 13/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../remove_valid_filtered_master_domains.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index f23c5edd..b07bfd41 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -4,7 +4,7 @@ - name: Fetch active storage domain for remove ovirt_storage_domain_info: pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and + name={{ storage['dr_' + dr_source_map + '_name'] }} and datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_active @@ -25,22 +25,6 @@ auth: "{{ ovirt_auth }}" register: storage_domain_info_active - - name: Fetch maintenance storage domain for remove - ovirt_storage_domain_info: - pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_maintenance_domain_search }} - auth: "{{ ovirt_auth }}" - register: storage_domain_info_maintenance - - - name: Fetch detached storage domain for remove - ovirt_storage_domain_info: - pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and - {{ dr_unattached_domain_search }} - auth: "{{ ovirt_auth }}" - register: storage_domain_info_detached - - name: Remove valid storage domain include_tasks: remove_domain_process.yml vars: From 67497939e31a7d9c3d00f3b990b554fb1b7f69a9 Mon Sep 17 00:00:00 2001 From: Shubha Kulkarni Date: Wed, 11 Jan 2023 21:29:04 -0500 Subject: [PATCH 14/16] DR-Failback errors when gathering/detecting HA VM as well as storage domains Signed-off-by: Shubha Kulkarni --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index b07bfd41..91654892 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -21,9 +21,9 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_active_domain_search }} + datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" - register: storage_domain_info_active + register: storage_domain_info_detached - name: Remove valid storage domain include_tasks: remove_domain_process.yml From 52fb262f6642be1ba877b401ab189001faf20f1b Mon Sep 17 00:00:00 2001 From: shubhaOracle <67933042+shubhaOracle@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:35:04 -0500 Subject: [PATCH 15/16] Update roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml move 1 character to the left Co-authored-by: Pavel Bar <48858225+barpavel@users.noreply.github.com> --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 91654892..0abd8259 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -20,7 +20,7 @@ - name: Fetch detached storage domain for remove ovirt_storage_domain_info: pattern: > - name={{ storage['dr_' + dr_source_map + '_name'] }} and + name={{ storage['dr_' + dr_source_map + '_name'] }} and datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_detached From e1b63c19b7afe1f96cc81db97ead8649d0e5e2e2 Mon Sep 17 00:00:00 2001 From: shubhaOracle <67933042+shubhaOracle@users.noreply.github.com> Date: Thu, 12 Jan 2023 10:36:02 -0500 Subject: [PATCH 16/16] Update roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml Remove redundant parts and trailing space Co-authored-by: Pavel Bar <48858225+barpavel@users.noreply.github.com> --- .../tasks/clean/remove_valid_filtered_master_domains.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml index 0abd8259..3ad0164b 100644 --- a/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml +++ b/roles/disaster_recovery/tasks/clean/remove_valid_filtered_master_domains.yml @@ -21,7 +21,7 @@ ovirt_storage_domain_info: pattern: > name={{ storage['dr_' + dr_source_map + '_name'] }} and - datacenter={{ storage['dr_' + dr_source_map + '_dc_name'] }} and {{ dr_unattached_domain_search }} + {{ dr_unattached_domain_search }} auth: "{{ ovirt_auth }}" register: storage_domain_info_detached