diff --git a/agents/ocf/controld.in b/agents/ocf/controld.in index 2e7a206b69c..f2520a5ba53 100644 --- a/agents/ocf/controld.in +++ b/agents/ocf/controld.in @@ -22,8 +22,11 @@ # Explicitly list all environment variables used, to make static analysis happy : ${OCF_RESKEY_CRM_meta_globally_unique:="false"} -: ${OCF_RESKEY_allow_stonith_disabled:="false"} -: ${OCF_RESKEY_sctp:="false"} + +# @COMPAT Drop first line when we drop allow_stonith_disabled support +: ${OCF_RESKEY_allow_fencing_disabled:=$OCF_RESKEY_allow_stonith_disabled} +: ${OCF_RESKEY_allow_fencing_disabled:="false"} + : ${OCF_RESOURCE_INSTANCE:=""} case "$OCF_RESOURCE_INSTANCE" in @@ -76,9 +79,9 @@ The daemon to start - supports dlm_controld - + -Allow DLM start-up even if STONITH/fencing is disabled in the cluster. +Allow DLM start-up even if fencing is disabled in the cluster. Setting this option to true will cause cluster malfunction and hangs on fail-over for DLM clients that require fencing (such as GFS2, OCFS2, and @@ -86,7 +89,14 @@ cLVM2). This option is advanced use only. -Allow start-up even without STONITH/fencing +Allow start-up even without fencing + + + + + +Deprecated +Deprecated @@ -165,15 +175,21 @@ controld_start() { fi fi - if ! ocf_is_true "$OCF_RESKEY_allow_stonith_disabled" && \ - ! ocf_is_true "$(crm_attribute --type=crm_config --name=stonith-enabled --query --quiet --default=true)"; then - ocf_log err "The cluster property stonith-enabled may not be deactivated to use the DLM" + cluster_options="$(crm_mon --output-as=xml --exclude=all --include=options \ + | xmllint --xpath '//cluster_options' -)" + fencing_enabled="$(echo "$cluster_options" \ + | xmllint --xpath 'string(/*/@fencing-enabled)' -)" + no_quorum_policy="$(echo "$cluster_options" \ + | xmllint --xpath 'string(/*/@no-quorum-policy)' -)" + + if ! ocf_is_true "$fencing_enabled" \ + && ! ocf_is_true "$OCF_RESKEY_allow_fencing_disabled"; then + + ocf_log err "The cluster property fencing-enabled may not be deactivated to use the DLM" return $OCF_ERR_CONFIGURED fi - # If no-quorum-policy not set, or not set as freeze, give a warning - crm_attribute --type=crm_config --name=no-quorum-policy --query|grep value=freeze >/dev/null 2>/dev/null - if [ $? -ne 0 ]; then + if [ "$no_quorum_policy" != "freeze" ]; then ocf_log warn "The DLM cluster best practice suggests to set the cluster property \"no-quorum-policy=freeze\"" fi diff --git a/cts/cli/regression.acls.exp b/cts/cli/regression.acls.exp index cc39c27b748..a6aeb155e23 100644 --- a/cts/cli/regression.acls.exp +++ b/cts/cli/regression.acls.exp @@ -30,7 +30,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -151,7 +151,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -413,7 +413,7 @@ - + @@ -486,7 +486,7 @@ - + @@ -531,10 +531,10 @@ cibadmin: CIB API call failed: Permission denied crm_attribute: Error performing operation: Permission denied =#=#=#= End test: unknownguy: Set enable-acl - Insufficient privileges (4) =#=#=#= * Passed: crm_attribute - unknownguy: Set enable-acl -=#=#=#= Begin test: unknownguy: Set stonith-enabled =#=#=#= +=#=#=#= Begin test: unknownguy: Set fencing-enabled =#=#=#= crm_attribute: Error performing operation: Permission denied -=#=#=#= End test: unknownguy: Set stonith-enabled - Insufficient privileges (4) =#=#=#= -* Passed: crm_attribute - unknownguy: Set stonith-enabled +=#=#=#= End test: unknownguy: Set fencing-enabled - Insufficient privileges (4) =#=#=#= +* Passed: crm_attribute - unknownguy: Set fencing-enabled =#=#=#= Begin test: unknownguy: Create a resource =#=#=#= pcmk__check_acl trace: Lack of ACL denies user 'unknownguy' read/write access to /cib/configuration/resources/primitive[@id='dummy'] pcmk__apply_creation_acl trace: ACLs disallow creation of with id="dummy" @@ -549,10 +549,10 @@ cibadmin: CIB API call failed: Permission denied crm_attribute: Error performing operation: Permission denied =#=#=#= End test: l33t-haxor: Set enable-acl - Insufficient privileges (4) =#=#=#= * Passed: crm_attribute - l33t-haxor: Set enable-acl -=#=#=#= Begin test: l33t-haxor: Set stonith-enabled =#=#=#= +=#=#=#= Begin test: l33t-haxor: Set fencing-enabled =#=#=#= crm_attribute: Error performing operation: Permission denied -=#=#=#= End test: l33t-haxor: Set stonith-enabled - Insufficient privileges (4) =#=#=#= -* Passed: crm_attribute - l33t-haxor: Set stonith-enabled +=#=#=#= End test: l33t-haxor: Set fencing-enabled - Insufficient privileges (4) =#=#=#= +* Passed: crm_attribute - l33t-haxor: Set fencing-enabled =#=#=#= Begin test: l33t-haxor: Create a resource =#=#=#= pcmk__check_acl trace: Parent ACL denies user 'l33t-haxor' read/write access to /cib/configuration/resources/primitive[@id='dummy'] pcmk__apply_creation_acl trace: ACLs disallow creation of with id="dummy" @@ -595,7 +595,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -638,16 +638,16 @@ Error setting enable-acl=false (section=crm_config, set=): Permission deni crm_attribute: Error performing operation: Permission denied =#=#=#= End test: niceguy: Set enable-acl - Insufficient privileges (4) =#=#=#= * Passed: crm_attribute - niceguy: Set enable-acl -=#=#=#= Begin test: niceguy: Set stonith-enabled =#=#=#= -pcmk__apply_creation_acl trace: ACLs allow creation of with id="cib-bootstrap-options-stonith-enabled" -=#=#=#= Current cib after: niceguy: Set stonith-enabled =#=#=#= +=#=#=#= Begin test: niceguy: Set fencing-enabled =#=#=#= +pcmk__apply_creation_acl trace: ACLs allow creation of with id="cib-bootstrap-options-fencing-enabled" +=#=#=#= Current cib after: niceguy: Set fencing-enabled =#=#=#= - + @@ -677,7 +677,7 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="cib-bo - + @@ -712,8 +712,8 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="cib-bo -=#=#=#= End test: niceguy: Set stonith-enabled - OK (0) =#=#=#= -* Passed: crm_attribute - niceguy: Set stonith-enabled +=#=#=#= End test: niceguy: Set fencing-enabled - OK (0) =#=#=#= +* Passed: crm_attribute - niceguy: Set fencing-enabled =#=#=#= Begin test: niceguy: Create a resource =#=#=#= pcmk__check_acl trace: Default ACL denies user 'niceguy' read/write access to /cib/configuration/resources/primitive[@id='dummy'] pcmk__apply_creation_acl trace: ACLs disallow creation of with id="dummy" @@ -727,7 +727,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -757,7 +757,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -794,15 +794,15 @@ cibadmin: CIB API call failed: Permission denied =#=#=#= End test: root: Query configuration - OK (0) =#=#=#= * Passed: cibadmin - root: Query configuration -=#=#=#= Begin test: root: Set stonith-enabled =#=#=#= -=#=#=#= Current cib after: root: Set stonith-enabled =#=#=#= +=#=#=#= Begin test: root: Set fencing-enabled =#=#=#= +=#=#=#= Current cib after: root: Set fencing-enabled =#=#=#= - + @@ -832,7 +832,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -867,8 +867,8 @@ cibadmin: CIB API call failed: Permission denied -=#=#=#= End test: root: Set stonith-enabled - OK (0) =#=#=#= -* Passed: crm_attribute - root: Set stonith-enabled +=#=#=#= End test: root: Set fencing-enabled - OK (0) =#=#=#= +* Passed: crm_attribute - root: Set fencing-enabled =#=#=#= Begin test: root: Create a resource =#=#=#= =#=#=#= Current cib after: root: Create a resource =#=#=#= @@ -877,7 +877,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -909,7 +909,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -954,7 +954,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -987,7 +987,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1051,7 +1051,7 @@ Set 'dummy' option: id=dummy-meta_attributes-target-role set=dummy-meta_attribut - + @@ -1088,7 +1088,7 @@ Set 'dummy' option: id=dummy-meta_attributes-target-role set=dummy-meta_attribut - + @@ -1135,7 +1135,7 @@ Stopped - + @@ -1172,7 +1172,7 @@ Stopped - + @@ -1219,7 +1219,7 @@ Deleted 'dummy' option: id=dummy-meta_attributes-target-role name=target-role - + @@ -1254,7 +1254,7 @@ Deleted 'dummy' option: id=dummy-meta_attributes-target-role name=target-role - + @@ -1302,7 +1302,7 @@ Set 'dummy' option: id=dummy-meta_attributes-target-role set=dummy-meta_attribut - + @@ -1339,7 +1339,7 @@ Set 'dummy' option: id=dummy-meta_attributes-target-role set=dummy-meta_attribut - + @@ -1410,7 +1410,7 @@ Set 'dummy' option: id=dummy-meta_attributes-target-role set=dummy-meta_attribut - + @@ -1438,7 +1438,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1476,7 +1476,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1524,7 +1524,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1561,7 +1561,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1608,7 +1608,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1645,7 +1645,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1692,7 +1692,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1729,7 +1729,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1776,7 +1776,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1813,7 +1813,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1857,7 +1857,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1894,7 +1894,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1938,7 +1938,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -1971,7 +1971,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2015,7 +2015,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2048,7 +2048,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2092,7 +2092,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2125,7 +2125,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2169,7 +2169,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2202,7 +2202,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2246,7 +2246,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2279,7 +2279,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2323,7 +2323,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2356,7 +2356,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2400,7 +2400,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2433,7 +2433,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2477,7 +2477,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2510,7 +2510,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2554,7 +2554,7 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="dum - + @@ -2588,7 +2588,7 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="dum - + @@ -2631,7 +2631,7 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="dum - + @@ -2665,7 +2665,7 @@ pcmk__apply_creation_acl trace: ACLs allow creation of with id="dum - + @@ -2711,7 +2711,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2745,7 +2745,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2791,7 +2791,7 @@ cibadmin: CIB API call failed: Permission denied - + @@ -2825,7 +2825,7 @@ cibadmin: CIB API call failed: Permission denied - + diff --git a/cts/cli/regression.cibadmin.exp b/cts/cli/regression.cibadmin.exp index ab6e44e2ea9..94d919f082e 100644 --- a/cts/cli/regression.cibadmin.exp +++ b/cts/cli/regression.cibadmin.exp @@ -3,7 +3,7 @@ - + @@ -21,7 +21,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -79,12 +79,12 @@ =#=#=#= End test: Validate CIB (XML) - OK (0) =#=#=#= * Passed: cibadmin - Validate CIB (XML) =#=#=#= Begin test: Digest calculation =#=#=#= -02e4118f17d65a512f1f540ff30dc116 +9130d6f39c2b83bd032a00e76621508c =#=#=#= End test: Digest calculation - OK (0) =#=#=#= * Passed: cibadmin - Digest calculation =#=#=#= Begin test: Digest calculation (XML) =#=#=#= - + =#=#=#= End test: Digest calculation (XML) - OK (0) =#=#=#= @@ -96,7 +96,7 @@ cibadmin: The supplied command is considered dangerous. To prevent accidental de - + @@ -124,7 +124,7 @@ cibadmin: The supplied command is considered dangerous. To prevent accidental de - + diff --git a/cts/cli/regression.crm_mon.exp b/cts/cli/regression.crm_mon.exp index 35494561aae..eff1308fc1a 100644 --- a/cts/cli/regression.crm_mon.exp +++ b/cts/cli/regression.crm_mon.exp @@ -39,7 +39,7 @@ Active Resources: - + @@ -284,7 +284,7 @@ Active Resources: - + @@ -1044,7 +1044,7 @@ Negative Location Constraints: - + @@ -1356,7 +1356,7 @@ Negative Location Constraints: - + @@ -1547,7 +1547,7 @@ Negative Location Constraints: - + @@ -1715,7 +1715,7 @@ Operations: - + @@ -1772,7 +1772,7 @@ Active Resources: - + @@ -1901,7 +1901,7 @@ Operations: - + @@ -1978,7 +1978,7 @@ Operations: - + @@ -2059,7 +2059,7 @@ Operations: - + @@ -2139,7 +2139,7 @@ Operations: - + @@ -2229,7 +2229,7 @@ Operations: - + @@ -2322,7 +2322,7 @@ Operations: - + @@ -2391,7 +2391,7 @@ Active Resources: - + @@ -2465,7 +2465,7 @@ Full List of Resources: - + @@ -2593,7 +2593,7 @@ Full List of Resources: - + @@ -2692,7 +2692,7 @@ Full List of Resources: - + @@ -2789,7 +2789,7 @@ Full List of Resources: - + @@ -2892,7 +2892,7 @@ Full List of Resources: - + @@ -3021,7 +3021,7 @@ Operations: - + @@ -3130,7 +3130,7 @@ Operations: - + @@ -3237,7 +3237,7 @@ Operations: - + @@ -3332,7 +3332,7 @@ Operations: - + @@ -3439,7 +3439,7 @@ Operations: - + @@ -3568,7 +3568,7 @@ unpack_rsc_op error: Preventing httpd-bundle-clone from restarting on httpd-bun - + @@ -4058,7 +4058,7 @@ unpack_rsc_op error: Preventing httpd-bundle-clone from restarting on httpd-bun - + @@ -4155,7 +4155,7 @@ Active Resources: - + @@ -4286,7 +4286,7 @@ Full List of Resources: - + @@ -4545,7 +4545,7 @@ Full List of Resources: - + @@ -4805,7 +4805,7 @@ Full List of Resources: - + diff --git a/cts/cli/regression.crm_ticket.exp b/cts/cli/regression.crm_ticket.exp index 7b659509f1d..afb8be30794 100644 --- a/cts/cli/regression.crm_ticket.exp +++ b/cts/cli/regression.crm_ticket.exp @@ -8,7 +8,7 @@ false - + @@ -74,7 +74,7 @@ false - + @@ -97,7 +97,7 @@ false - + @@ -124,7 +124,7 @@ true - + @@ -161,7 +161,7 @@ false - + @@ -184,7 +184,7 @@ false - + @@ -223,7 +223,7 @@ ticketB revoked - + @@ -246,7 +246,7 @@ ticketB revoked - + @@ -269,7 +269,7 @@ ticketB revoked - + @@ -316,7 +316,7 @@ Constraints XML: - + diff --git a/cts/cli/regression.feature_set.exp b/cts/cli/regression.feature_set.exp index a2dade24cfd..d127d36e722 100644 --- a/cts/cli/regression.feature_set.exp +++ b/cts/cli/regression.feature_set.exp @@ -73,7 +73,7 @@ Active Resources: - + @@ -172,7 +172,7 @@ Active Resources: - + diff --git a/cts/cli/regression.upgrade.exp b/cts/cli/regression.upgrade.exp index 937c4d30743..b4e69f6195a 100644 --- a/cts/cli/regression.upgrade.exp +++ b/cts/cli/regression.upgrade.exp @@ -1,10 +1,10 @@ -=#=#=#= Begin test: Set stonith-enabled=false =#=#=#= -=#=#=#= Current cib after: Set stonith-enabled=false =#=#=#= +=#=#=#= Begin test: Set fencing-enabled=false =#=#=#= +=#=#=#= Current cib after: Set fencing-enabled=false =#=#=#= - + @@ -13,15 +13,15 @@ -=#=#=#= End test: Set stonith-enabled=false - OK (0) =#=#=#= -* Passed: crm_attribute - Set stonith-enabled=false +=#=#=#= End test: Set fencing-enabled=false - OK (0) =#=#=#= +* Passed: crm_attribute - Set fencing-enabled=false =#=#=#= Begin test: Configure the initial resource =#=#=#= =#=#=#= Current cib after: Configure the initial resource =#=#=#= - + @@ -82,7 +82,7 @@ pcmk__update_schema info: Transformed the configuration schema to pacemaker-4.0 - + @@ -115,7 +115,7 @@ outputpower - + diff --git a/cts/cts-cli.in b/cts/cts-cli.in index b54bcdd4b23..18fe079bb4b 100644 --- a/cts/cts-cli.in +++ b/cts/cts-cli.in @@ -1267,7 +1267,7 @@ class CibadminRegressionTest(RegressionTest): # Add some stuff to the empty CIB so we know that erasing it did something. basic_tests_setup = [ """cibadmin -C -o nodes --xml-text ''""", - """cibadmin -C -o crm_config --xml-text ''""", + """cibadmin -C -o crm_config --xml-text ''""", """cibadmin -C -o resources --xml-text ''""" ] @@ -1833,7 +1833,7 @@ class CrmTicketRegressionTest(RegressionTest): ] basic_tests_setup = [ - """cibadmin -C -o crm_config --xml-text ''""", + """cibadmin -C -o crm_config --xml-text ''""", """cibadmin -C -o resources --xml-text ''""" ] @@ -2698,7 +2698,7 @@ class AclsRegressionTest(RegressionTest): - + @@ -2749,8 +2749,8 @@ class AclsRegressionTest(RegressionTest): Test("unknownguy: Set enable-acl", "crm_attribute -n enable-acl -v false", expected_rc=ExitStatus.INSUFFICIENT_PRIV), - Test("unknownguy: Set stonith-enabled", - "crm_attribute -n stonith-enabled -v false", + Test("unknownguy: Set fencing-enabled", + "crm_attribute -n fencing-enabled -v false", expected_rc=ExitStatus.INSUFFICIENT_PRIV), Test("unknownguy: Create a resource", """cibadmin -C -o resources --xml-text ''""", @@ -2764,8 +2764,8 @@ class AclsRegressionTest(RegressionTest): Test("l33t-haxor: Set enable-acl", "crm_attribute -n enable-acl -v false", expected_rc=ExitStatus.INSUFFICIENT_PRIV), - Test("l33t-haxor: Set stonith-enabled", - "crm_attribute -n stonith-enabled -v false", + Test("l33t-haxor: Set fencing-enabled", + "crm_attribute -n fencing-enabled -v false", expected_rc=ExitStatus.INSUFFICIENT_PRIV), Test("l33t-haxor: Create a resource", """cibadmin -C -o resources --xml-text ''""", @@ -2777,15 +2777,15 @@ class AclsRegressionTest(RegressionTest): Test("niceguy: Set enable-acl", "crm_attribute -n enable-acl -v false", expected_rc=ExitStatus.INSUFFICIENT_PRIV), - Test("niceguy: Set stonith-enabled", - "crm_attribute -n stonith-enabled -v false", + Test("niceguy: Set fencing-enabled", + "crm_attribute -n fencing-enabled -v false", update_cib=True), Test("niceguy: Create a resource", """cibadmin -C -o resources --xml-text ''""", expected_rc=ExitStatus.INSUFFICIENT_PRIV), Test("root: Query configuration", "cibadmin -Q", env={"CIB_user": "root"}), - Test("root: Set stonith-enabled", "crm_attribute -n stonith-enabled -v true", + Test("root: Set fencing-enabled", "crm_attribute -n fencing-enabled -v true", update_cib=True, env={"CIB_user": "root"}), Test("root: Create a resource", """cibadmin -C -o resources --xml-text ''""", @@ -3034,7 +3034,7 @@ class UpgradeRegressionTest(RegressionTest): """ basic_tests = [ - Test("Set stonith-enabled=false", "crm_attribute -n stonith-enabled -v false", + Test("Set fencing-enabled=false", "crm_attribute -n fencing-enabled -v false", update_cib=True), Test("Configure the initial resource", "cibadmin -M -o resources -p", update_cib=True, stdin=resource_cib), @@ -3069,7 +3069,7 @@ class RulesRegressionTest(RegressionTest): - + diff --git a/cts/scheduler/xml/bundle-probe-remotes.xml b/cts/scheduler/xml/bundle-probe-remotes.xml index a933783939e..56c77d2753e 100644 --- a/cts/scheduler/xml/bundle-probe-remotes.xml +++ b/cts/scheduler/xml/bundle-probe-remotes.xml @@ -8,7 +8,6 @@ - diff --git a/cts/scheduler/xml/promotable-colocation-with-node-attribute.xml b/cts/scheduler/xml/promotable-colocation-with-node-attribute.xml index 5b4ab10f023..098dc02af0b 100644 --- a/cts/scheduler/xml/promotable-colocation-with-node-attribute.xml +++ b/cts/scheduler/xml/promotable-colocation-with-node-attribute.xml @@ -4,7 +4,7 @@ - + diff --git a/include/crm/common/xml_names.h b/include/crm/common/xml_names.h index 4ae150e42ee..7a92e54db1c 100644 --- a/include/crm/common/xml_names.h +++ b/include/crm/common/xml_names.h @@ -288,6 +288,8 @@ extern "C" { #define PCMK_XA_FAILURE_IGNORED "failure_ignored" #define PCMK_XA_FEATURE_SET "feature_set" #define PCMK_XA_FEATURES "features" +#define PCMK_XA_FENCING_ENABLED "fencing-enabled" +#define PCMK_XA_FENCING_TIMEOUT_MS "fencing-timeout-ms" #define PCMK_XA_FILE "file" #define PCMK_XA_FIRST "first" #define PCMK_XA_FIRST_ACTION "first-action" @@ -411,8 +413,6 @@ extern "C" { #define PCMK_XA_START "start" #define PCMK_XA_STATE "state" #define PCMK_XA_STATUS "status" -#define PCMK_XA_STONITH_ENABLED "stonith-enabled" -#define PCMK_XA_STONITH_TIMEOUT_MS "stonith-timeout-ms" #define PCMK_XA_STOP_ALL_RESOURCES "stop-all-resources" #define PCMK_XA_SYMMETRIC_CLUSTER "symmetric-cluster" #define PCMK_XA_SYMMETRICAL "symmetrical" @@ -464,6 +464,16 @@ extern "C" { //! \deprecated Deprecated since 3.0.2; look for \c PCMK_XA_REMOVED instead #define PCMK_XA_ORPHANED "orphaned" +/*! \deprecated Deprecated since 3.0.2; look for \c PCMK_XA_FENCING_ENABLED + * instead + */ +#define PCMK_XA_STONITH_ENABLED "stonith-enabled" + +/*! \deprecated Deprecated since 3.0.2; look for \c PCMK_XA_FENCING_TIMEOUT_MS + * instead + */ +#define PCMK_XA_STONITH_TIMEOUT_MS "stonith-timeout-ms" + #ifdef __cplusplus } #endif diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c index 30387c85819..e82bf0f626c 100644 --- a/lib/pengine/pe_output.c +++ b/lib/pengine/pe_output.c @@ -1047,9 +1047,9 @@ cluster_options_html(pcmk__output_t *out, va_list args) { pcmk_scheduler_t *scheduler = va_arg(args, pcmk_scheduler_t *); if (pcmk__is_set(scheduler->flags, pcmk__sched_fencing_enabled)) { - out->list_item(out, NULL, "STONITH of failed nodes enabled"); + out->list_item(out, NULL, "Fencing of failed nodes enabled"); } else { - out->list_item(out, NULL, "STONITH of failed nodes disabled"); + out->list_item(out, NULL, "Fencing of failed nodes disabled"); } if (pcmk__is_set(scheduler->flags, pcmk__sched_symmetric_cluster)) { @@ -1143,9 +1143,9 @@ cluster_options_text(pcmk__output_t *out, va_list args) { pcmk_scheduler_t *scheduler = va_arg(args, pcmk_scheduler_t *); if (pcmk__is_set(scheduler->flags, pcmk__sched_fencing_enabled)) { - out->list_item(out, NULL, "STONITH of failed nodes enabled"); + out->list_item(out, NULL, "Fencing of failed nodes enabled"); } else { - out->list_item(out, NULL, "STONITH of failed nodes disabled"); + out->list_item(out, NULL, "Fencing of failed nodes disabled"); } if (pcmk__is_set(scheduler->flags, pcmk__sched_symmetric_cluster)) { @@ -1218,7 +1218,7 @@ static int cluster_options_xml(pcmk__output_t *out, va_list args) { pcmk_scheduler_t *scheduler = va_arg(args, pcmk_scheduler_t *); - const char *stonith_enabled = pcmk__flag_text(scheduler->flags, + const char *fencing_enabled = pcmk__flag_text(scheduler->flags, pcmk__sched_fencing_enabled); const char *symmetric_cluster = pcmk__flag_text(scheduler->flags, pcmk__sched_symmetric_cluster); @@ -1228,24 +1228,30 @@ cluster_options_xml(pcmk__output_t *out, va_list args) { pcmk__sched_in_maintenance); const char *stop_all_resources = pcmk__flag_text(scheduler->flags, pcmk__sched_stop_all); - char *stonith_timeout_ms_s = + char *fencing_timeout_ms_s = pcmk__assert_asprintf("%u", scheduler->priv->fence_timeout_ms); char *priority_fencing_delay_ms_s = pcmk__assert_asprintf("%u", scheduler->priv->priority_fencing_ms); + /* @COMPAT PCMK_XA_STONITH_ENABLED and PCMK_XA_STONITH_TIMEOUT_MS are + * deprecated since 3.0.2 + */ pcmk__output_create_xml_node(out, PCMK_XE_CLUSTER_OPTIONS, - PCMK_XA_STONITH_ENABLED, stonith_enabled, + PCMK_XA_FENCING_ENABLED, fencing_enabled, + PCMK_XA_FENCING_TIMEOUT_MS, + fencing_timeout_ms_s, PCMK_XA_SYMMETRIC_CLUSTER, symmetric_cluster, PCMK_XA_NO_QUORUM_POLICY, no_quorum_policy, PCMK_XA_MAINTENANCE_MODE, maintenance_mode, PCMK_XA_STOP_ALL_RESOURCES, stop_all_resources, - PCMK_XA_STONITH_TIMEOUT_MS, - stonith_timeout_ms_s, PCMK_XA_PRIORITY_FENCING_DELAY_MS, priority_fencing_delay_ms_s, + PCMK_XA_STONITH_ENABLED, fencing_enabled, + PCMK_XA_STONITH_TIMEOUT_MS, + fencing_timeout_ms_s, NULL); - free(stonith_timeout_ms_s); + free(fencing_timeout_ms_s); free(priority_fencing_delay_ms_s); return pcmk_rc_ok; diff --git a/python/pacemaker/_cts/cib.py b/python/pacemaker/_cts/cib.py index c8168d703ba..f8b43a1a44b 100644 --- a/python/pacemaker/_cts/cib.py +++ b/python/pacemaker/_cts/cib.py @@ -260,7 +260,7 @@ def contents(self, target): stl.commit() o = Option(self._factory) - o["stonith-enabled"] = self._cm.env["fencing_enabled"] + o["fencing-enabled"] = self._cm.env["fencing_enabled"] o["start-failure-is-fatal"] = "false" o["pe-input-series-max"] = "5000" o["shutdown-escalation"] = "5min" diff --git a/python/pacemaker/_cts/tests/splitbraintest.py b/python/pacemaker/_cts/tests/splitbraintest.py index 99b5dc5d7c7..09b0bfc7e64 100644 --- a/python/pacemaker/_cts/tests/splitbraintest.py +++ b/python/pacemaker/_cts/tests/splitbraintest.py @@ -117,7 +117,7 @@ def __call__(self, node): self.debug(f"Partition[{key}]:\t{val!r}") # Disabling STONITH to reduce test complexity for now - self._rsh(node, "crm_attribute -V -n stonith-enabled -v false") + self._rsh(node, "crm_attribute -V -n fencing-enabled -v false") for val in partitions.values(): self._isolate_partition(val) @@ -184,7 +184,7 @@ def __call__(self, node): # Turn fencing back on if self._env["fencing_enabled"]: - self._rsh(node, "crm_attribute -V -D -n stonith-enabled") + self._rsh(node, "crm_attribute -V -D -n fencing-enabled") self._cm.cluster_stable() diff --git a/xml/api/crm_mon-2.42.rng b/xml/api/crm_mon-2.42.rng new file mode 100644 index 00000000000..5bbab096e5b --- /dev/null +++ b/xml/api/crm_mon-2.42.rng @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +