From 15e566865209526f6c6401e00c445cc0d10a9a87 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 26 Nov 2025 16:19:28 +0100 Subject: [PATCH 1/3] feat: support fencing-watchdog-timeout cluster property --- tasks/shell_crmsh/create-and-push-cib.yml | 3 ++- tasks/shell_pcs/create-and-push-cib.yml | 3 ++- tasks/shell_pcs/sbd.yml | 15 +++++++++++++++ tests/tests_cib_properties_empty.yml | 2 ++ tests/tests_cib_properties_one_set.yml | 2 ++ tests/tests_cib_rsc_op_defaults.yml | 2 ++ tests/tests_cluster_advanced_knet_full.yml | 14 ++++++++++---- tests/tests_cluster_advanced_knet_implicit.yml | 14 ++++++++++---- tests/tests_cluster_advanced_udp_full.yml | 14 ++++++++++---- tests/tests_cluster_basic.yml | 14 ++++++++++---- tests/tests_cluster_basic_cloud_packages.yml | 14 ++++++++++---- tests/tests_cluster_basic_disabled.yml | 14 ++++++++++---- tests/tests_export_doesnt_destroy_cluster.yml | 14 ++++++++++---- tests/tests_export_firewall_selinux.yml | 14 ++++++++++---- tests/tests_pcs_permissions.yml | 14 ++++++++++---- 15 files changed, 115 insertions(+), 38 deletions(-) diff --git a/tasks/shell_crmsh/create-and-push-cib.yml b/tasks/shell_crmsh/create-and-push-cib.yml index 21377705..61978f42 100644 --- a/tasks/shell_crmsh/create-and-push-cib.yml +++ b/tasks/shell_crmsh/create-and-push-cib.yml @@ -91,7 +91,8 @@ @name="dc-version" or @name="have-watchdog" or @name="last-lrm-refresh" or - @name="stonith-watchdog-timeout" + @name="stonith-watchdog-timeout" or + @name="fencing-watchdog-timeout" )]' environment: CIB_file: "{{ __ha_cluster_tempfile_cib_xml.path }}" diff --git a/tasks/shell_pcs/create-and-push-cib.yml b/tasks/shell_pcs/create-and-push-cib.yml index 570d122f..ddce1690 100644 --- a/tasks/shell_pcs/create-and-push-cib.yml +++ b/tasks/shell_pcs/create-and-push-cib.yml @@ -66,7 +66,8 @@ @name="dc-version" or @name="have-watchdog" or @name="last-lrm-refresh" or - @name="stonith-watchdog-timeout" + @name="stonith-watchdog-timeout" or + @name="fencing-watchdog-timeout" )]' environment: CIB_file: "{{ __ha_cluster_tempfile_cib_xml.path }}" diff --git a/tasks/shell_pcs/sbd.yml b/tasks/shell_pcs/sbd.yml index 611609b4..56324f4d 100644 --- a/tasks/shell_pcs/sbd.yml +++ b/tasks/shell_pcs/sbd.yml @@ -151,6 +151,19 @@ == 'running' }}" block: - name: Set stonith-watchdog-timeout cluster property in CIB + # Original name of the cluster property is 'stonith-watchdog-timeout'. In + # pacemaker feature set 3.20.5 (at the time of writing this comment it + # hasn't been released in any pacemaker version yet), it was renamed to + # 'fencing-watchdog-timeout', while the original property is still kept + # as deprecated. + # + # Setting both properties is safe: + # - old pacemaker ignores the new property, no issues are caused by + # setting it + # - new pacemaker ignores the old property (if the new one is set), no + # issues are caused by setting it + # - both properties are set to the same value for the new pacemaker + # preventing inconsistencies command: cmd: > pcs --force @@ -158,6 +171,8 @@ pacemaker_running | ternary('', '-f /var/lib/pacemaker/cib/cib.xml') }} -- property set + fencing-watchdog-timeout={{ + ha_cluster_sbd_enabled | ternary('', '0') }} stonith-watchdog-timeout={{ ha_cluster_sbd_enabled | ternary('', '0') }} changed_when: true diff --git a/tests/tests_cib_properties_empty.yml b/tests/tests_cib_properties_empty.yml index 128a243d..4d8778d5 100644 --- a/tests/tests_cib_properties_empty.yml +++ b/tests/tests_cib_properties_empty.yml @@ -64,6 +64,8 @@ ha_cluster_cluster_name: test-cluster ha_cluster_cluster_properties: - attrs: + - name: fencing-watchdog-timeout + value: "0" - name: stonith-watchdog-timeout value: "0" ha_cluster_start_on_boot: true diff --git a/tests/tests_cib_properties_one_set.yml b/tests/tests_cib_properties_one_set.yml index 84fb8c70..be060735 100644 --- a/tests/tests_cib_properties_one_set.yml +++ b/tests/tests_cib_properties_one_set.yml @@ -95,6 +95,8 @@ ha_cluster_cluster_name: test-cluster ha_cluster_cluster_properties: - attrs: + - name: fencing-watchdog-timeout + value: "0" - name: no-quorum-policy value: stop - name: stonith-enabled diff --git a/tests/tests_cib_rsc_op_defaults.yml b/tests/tests_cib_rsc_op_defaults.yml index c2c2ab50..4756b0a6 100644 --- a/tests/tests_cib_rsc_op_defaults.yml +++ b/tests/tests_cib_rsc_op_defaults.yml @@ -212,6 +212,8 @@ ha_cluster_cluster_name: test-cluster ha_cluster_cluster_properties: - attrs: + - name: fencing-watchdog-timeout + value: "0" - name: stonith-watchdog-timeout value: "0" ha_cluster_start_on_boot: true diff --git a/tests/tests_cluster_advanced_knet_full.yml b/tests/tests_cluster_advanced_knet_full.yml index 3d31809b..e760a270 100644 --- a/tests/tests_cluster_advanced_knet_full.yml +++ b/tests/tests_cluster_advanced_knet_full.yml @@ -177,10 +177,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_cluster_advanced_knet_implicit.yml b/tests/tests_cluster_advanced_knet_implicit.yml index f7bbd2f9..c5c11f9e 100644 --- a/tests/tests_cluster_advanced_knet_implicit.yml +++ b/tests/tests_cluster_advanced_knet_implicit.yml @@ -98,10 +98,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_cluster_advanced_udp_full.yml b/tests/tests_cluster_advanced_udp_full.yml index 3438ecbf..43c08adc 100644 --- a/tests/tests_cluster_advanced_udp_full.yml +++ b/tests/tests_cluster_advanced_udp_full.yml @@ -122,10 +122,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_cluster_basic.yml b/tests/tests_cluster_basic.yml index fbb1ed69..3023f2b0 100644 --- a/tests/tests_cluster_basic.yml +++ b/tests/tests_cluster_basic.yml @@ -155,10 +155,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_cluster_basic_cloud_packages.yml b/tests/tests_cluster_basic_cloud_packages.yml index da800082..357abc60 100644 --- a/tests/tests_cluster_basic_cloud_packages.yml +++ b/tests/tests_cluster_basic_cloud_packages.yml @@ -100,10 +100,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_cluster_basic_disabled.yml b/tests/tests_cluster_basic_disabled.yml index fe62f867..fb3f2cc8 100644 --- a/tests/tests_cluster_basic_disabled.yml +++ b/tests/tests_cluster_basic_disabled.yml @@ -80,10 +80,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_export_doesnt_destroy_cluster.yml b/tests/tests_export_doesnt_destroy_cluster.yml index d802e9d4..dcf8b0ea 100644 --- a/tests/tests_export_doesnt_destroy_cluster.yml +++ b/tests/tests_export_doesnt_destroy_cluster.yml @@ -57,10 +57,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_export_firewall_selinux.yml b/tests/tests_export_firewall_selinux.yml index 085ba3eb..6e09814b 100644 --- a/tests/tests_export_firewall_selinux.yml +++ b/tests/tests_export_firewall_selinux.yml @@ -82,10 +82,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} diff --git a/tests/tests_pcs_permissions.yml b/tests/tests_pcs_permissions.yml index 16ce108f..332bf174 100644 --- a/tests/tests_pcs_permissions.yml +++ b/tests/tests_pcs_permissions.yml @@ -76,10 +76,16 @@ {{ (__properties_capability in __test_pcs_capabilities) | ternary({ "ha_cluster_cluster_properties": [{ - "attrs": [{ - "name": "stonith-watchdog-timeout", - "value": "0" - }] + "attrs": [ + { + "name": "fencing-watchdog-timeout", + "value": "0" + }, + { + "name": "stonith-watchdog-timeout", + "value": "0" + }, + ] }] }, {}) }} From aa0202c511674522aee903f345d4e5a009d72478 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 26 Nov 2025 16:38:01 +0100 Subject: [PATCH 2/3] test: do not load cib schema version if not needed Especially do not load cib schema version before a cluster is created by running the role in a test, as that fails due to CIB nonexistence. --- tests/tests_cib_constraints_create_and_load_info.yml | 2 -- tests/tests_cib_properties_empty.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/tests_cib_constraints_create_and_load_info.yml b/tests/tests_cib_constraints_create_and_load_info.yml index 3bc98db3..c617715b 100644 --- a/tests/tests_cib_constraints_create_and_load_info.yml +++ b/tests/tests_cib_constraints_create_and_load_info.yml @@ -344,8 +344,6 @@ - name: Fetch cluster versions of cluster components include_tasks: tasks/fetch_versions.yml - vars: - with_cib_schema_version: true - name: Create cluster, export it and check exported configuration when: diff --git a/tests/tests_cib_properties_empty.yml b/tests/tests_cib_properties_empty.yml index 4d8778d5..08d16774 100644 --- a/tests/tests_cib_properties_empty.yml +++ b/tests/tests_cib_properties_empty.yml @@ -28,8 +28,6 @@ - name: Fetch versions of cluster components include_tasks: tasks/fetch_versions.yml - vars: - with_cib_schema_version: true - name: Fetch cluster properties configuration from the cluster command: From dc828c18f042014712b1c2a5377e52da9eeb361e Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 26 Nov 2025 16:58:09 +0100 Subject: [PATCH 3/3] test: fix copy-paste error in a task name --- tests/tests_cib_acls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_cib_acls.yml b/tests/tests_cib_acls.yml index c690779f..4d18c295 100644 --- a/tests/tests_cib_acls.yml +++ b/tests/tests_cib_acls.yml @@ -92,7 +92,7 @@ debug: var: __test_expected_lines | list - - name: Check node attributes configuration + - name: Check acl configuration assert: that: - __test_pcs_acl_config.stdout_lines