From 12988792ecf6cd8b00165191c2b009df55ce2958 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 01 2019 17:25:09 +0000 Subject: import pcs-0.9.168-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fb4514e --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +SOURCES/HAM-logo.png +SOURCES/backports-3.12.0.gem +SOURCES/ethon-0.12.0.gem +SOURCES/ffi-1.10.0.gem +SOURCES/mock-1.0.1.tar.gz +SOURCES/multi_json-1.13.1.gem +SOURCES/open4-1.3.4.gem +SOURCES/orderedhash-0.0.6.gem +SOURCES/pcs-0.9.168.tar.gz +SOURCES/pyagentx-0.4.pcs.1.tar.gz +SOURCES/rack-1.6.11.gem +SOURCES/rack-protection-1.5.5.gem +SOURCES/rack-test-0.8.3.gem +SOURCES/rpam-ruby19-1.2.1.gem +SOURCES/sinatra-1.4.8.gem +SOURCES/sinatra-contrib-1.4.7.gem +SOURCES/tilt-2.0.9.gem diff --git a/.pcs.metadata b/.pcs.metadata new file mode 100644 index 0000000..edbbf5a --- /dev/null +++ b/.pcs.metadata @@ -0,0 +1,17 @@ +679a4ce22a33ffd4d704261a17c00cff98d9499a SOURCES/HAM-logo.png +727cdc5c9138091d39e8dca877bad78238a4d539 SOURCES/backports-3.12.0.gem +921ef1be44583a7644ee7f20fe5f26f21d018a04 SOURCES/ethon-0.12.0.gem +15d8209c5c420a141e38763b153b41e5de2535ba SOURCES/ffi-1.10.0.gem +baa3446eb63557a24c4522dc5a61cfad082fa395 SOURCES/mock-1.0.1.tar.gz +ff6e0965061cb6f604ee4d87a2cf96a2917f9f88 SOURCES/multi_json-1.13.1.gem +41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4.gem +709cc95025009e5d221e37cb0777e98582146809 SOURCES/orderedhash-0.0.6.gem +ff0268d0e67d09897d204046511dca6c70f9c8b6 SOURCES/pcs-0.9.168.tar.gz +276a92c6d679a71bd0daaf12cb7b3616f1a89b72 SOURCES/pyagentx-0.4.pcs.1.tar.gz +64a0cd32f46c0ff44ffda4055048fe6309903110 SOURCES/rack-1.6.11.gem +f80ea6672253a90fa031db0c1e2e1fe056582118 SOURCES/rack-protection-1.5.5.gem +908e2a877da8eb6745073c51709dc024c4457e44 SOURCES/rack-test-0.8.3.gem +a90e5a60d99445404a3c29a66d953a5e9918976d SOURCES/rpam-ruby19-1.2.1.gem +3377f6140321523d7751bed3b2cc8a5201d8ec9f SOURCES/sinatra-1.4.8.gem +83742328f21b684d6ce6c4747710c6e975b608e7 SOURCES/sinatra-contrib-1.4.7.gem +55a75a80e29731d072fe44dfaf865479b65c27fd SOURCES/tilt-2.0.9.gem diff --git a/SOURCES/bz1458153-01-give-back-orig.-master-behav.-resource-create.patch b/SOURCES/bz1458153-01-give-back-orig.-master-behav.-resource-create.patch new file mode 100644 index 0000000..0d0b228 --- /dev/null +++ b/SOURCES/bz1458153-01-give-back-orig.-master-behav.-resource-create.patch @@ -0,0 +1,571 @@ +From 5f7596de91aec9becf55030476a559a4ebd9c0f6 Mon Sep 17 00:00:00 2001 +From: Ivan Devat +Date: Mon, 5 Jun 2017 17:13:41 +0200 +Subject: [PATCH 1/4] give back orig. --master behav. (resource create) + +--- + pcs/cli/common/parse_args.py | 8 +- + pcs/cli/common/test/test_parse_args.py | 34 ++++- + pcs/resource.py | 19 +++ + pcs/test/cib_resource/test_create.py | 181 ++++++++++++++++++++----- + pcs/test/test_constraints.py | 28 ++-- + pcs/test/test_resource.py | 10 +- + pcs/utils.py | 7 + + 7 files changed, 228 insertions(+), 59 deletions(-) + +diff --git a/pcs/cli/common/parse_args.py b/pcs/cli/common/parse_args.py +index 6a3210ac..4aee169c 100644 +--- a/pcs/cli/common/parse_args.py ++++ b/pcs/cli/common/parse_args.py +@@ -301,7 +301,13 @@ def upgrade_args(arg_list): + and + args_without_options[:2] == ["resource", "create"] + ): +- upgraded_args.append("master") ++ #upgraded_args.append("master") ++ ++ #We do not replace flag --master with keyword "manster" here because ++ #we want to give grace period to openstack that uses original ++ #missbehaviour. ++ #see https://bugzilla.redhat.com/show_bug.cgi?id=1458153 ++ upgraded_args.append(arg) + else: + upgraded_args.append(arg) + return upgraded_args +diff --git a/pcs/cli/common/test/test_parse_args.py b/pcs/cli/common/test/test_parse_args.py +index efe38d0e..900094c9 100644 +--- a/pcs/cli/common/test/test_parse_args.py ++++ b/pcs/cli/common/test/test_parse_args.py +@@ -486,9 +486,21 @@ class UpgradeArgs(TestCase): + upgrade_args(["first", "--cloneopt=1", "second"]) + ) + +- def test_upgrade_2dash_master_in_resource_create(self): +- self.assertEqual( +- ["resource", "create", "master", "second"], ++ # def test_upgrade_2dash_master_in_resource_create(self): ++ # self.assertEqual( ++ # ["resource", "create", "master", "second"], ++ # upgrade_args(["resource", "create", "--master", "second"]) ++ # ) ++ ++ def test_do_not_upgrade_2dash_master_in_resource_create__original_behaviour( ++ self ++ ): ++ """ ++ downstream temporary behaviour ++ fixes bz 1458153 ++ """ ++ self.assertEqual( ++ ["resource", "create", "--master", "second"], + upgrade_args(["resource", "create", "--master", "second"]) + ) + +@@ -498,10 +510,22 @@ class UpgradeArgs(TestCase): + upgrade_args(["first", "--master", "second"]) + ) + +- def test_upgrade_2dash_master_in_resource_create_with_complications(self): ++ # def test_upgrade_2dash_master_in_resource_create_with_complications(self): ++ # self.assertEqual( ++ # [ ++ # "-f", "path/to/file", "resource", "-V", "create", "master", ++ # "second" ++ # ], ++ # upgrade_args([ ++ # "-f", "path/to/file", "resource", "-V", "create", "--master", ++ # "second" ++ # ]) ++ # ) ++ ++ def test_no_upgrade_2dash_master_complications__original_behaviour(self): + self.assertEqual( + [ +- "-f", "path/to/file", "resource", "-V", "create", "master", ++ "-f", "path/to/file", "resource", "-V", "create", "--master", + "second" + ], + upgrade_args([ +diff --git a/pcs/resource.py b/pcs/resource.py +index d3761327..f71ed578 100644 +--- a/pcs/resource.py ++++ b/pcs/resource.py +@@ -392,6 +392,25 @@ def resource_create(lib, argv, modifiers): + ra_type = argv[1] + + parts = parse_create_args(argv[2:]) ++ ++ if modifiers["master"] and "master" in parts: ++ raise error("you cannot specify both --master and master") ++ ++ #This is for `pcs resource create`. Fix of the bug ++ #https://bugzilla.redhat.com/show_bug.cgi?id=1378107 ++ #caused problems in openstack which uses `pcs resource create` ++ #see https://bugzilla.redhat.com/show_bug.cgi?id=1458153 ++ #so we give back the original misbehavior of master here temporarily. ++ #When user uses `--master` she gets the original behaviour. With `master` ++ #she gets new behaviour. ++ if modifiers["master"]: ++ warn( ++ "flag '--master' is deprecated, use keyword 'master' instead (see" ++ " the usage)" ++ ) ++ parts["master"] = parts["meta"] ++ parts["meta"] = {} ++ + parts_sections = ["clone", "master", "bundle"] + defined_options = [opt for opt in parts_sections if opt in parts] + if modifiers["group"]: +diff --git a/pcs/test/cib_resource/test_create.py b/pcs/test/cib_resource/test_create.py +index ecb16384..57d95350 100644 +--- a/pcs/test/cib_resource/test_create.py ++++ b/pcs/test/cib_resource/test_create.py +@@ -238,7 +238,7 @@ class Success(ResourceTestLocal): + def test_with_master(self): + self.assert_effect( + [ +- "resource create R ocf:heartbeat:Dummy --no-default-ops --master", ++ # "resource create R ocf:heartbeat:Dummy --no-default-ops --master", + "resource create R ocf:heartbeat:Dummy --no-default-ops master", + ], + """ +@@ -659,7 +659,7 @@ class SuccessGroup(ResourceTestLocal): + class SuccessMaster(ResourceTestLocal): + def test_disable_is_on_master_element(self): + self.assert_effect( +- "resource create R ocf:heartbeat:Dummy --no-default-ops --disabled --master", ++ "resource create R ocf:heartbeat:Dummy --no-default-ops --disabled master", + """ + + +@@ -680,13 +680,55 @@ class SuccessMaster(ResourceTestLocal): + """ + ) + +- def test_put_options_after_master_as_its_meta_fix_1(self): ++ # def test_put_options_after_master_as_its_meta_fix_1(self): ++ # """ ++ # fixes bz 1378107 (do not use master options as primitive options) ++ # """ ++ # self.assert_effect( ++ # "resource create R ocf:heartbeat:Dummy state=a" ++ # " --master is-managed=false --force" ++ # , ++ # """ ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # """ ++ # ) ++ ++ def test_put_options_after_master_as_primitive_options__original_behaviour( ++ self ++ ): + """ +- fixes bz 1378107 (do not use master options as primitive options) ++ downstream temporary behaviour ++ fixes bz 1458153 + """ + self.assert_effect( + "resource create R ocf:heartbeat:Dummy state=a" +- " --master is-managed=false --force" ++ " --master fake=false --force" + , + """ + +@@ -694,6 +736,9 @@ class SuccessMaster(ResourceTestLocal): + type="Dummy" + > + ++ + +@@ -719,22 +764,58 @@ class SuccessMaster(ResourceTestLocal): + /> + + +- +- +- + + """ +- ) +- +- def test_put_options_after_master_as_its_meta_fix_2(self): ++ , ++ output="Warning: flag '--master' is deprecated, use keyword" ++ " 'master' instead (see the usage)\n" ++ ) ++ ++ ++ # def test_put_options_after_master_as_its_meta_fix_2(self): ++ # """ ++ # fixes bz 1378107 (do not use master options as operations) ++ # """ ++ # self.assert_effect( ++ # "resource create R ocf:heartbeat:Dummy state=a op monitor" ++ # " interval=10s --master is-managed=false --force" ++ # " --no-default-ops" ++ # , ++ # """ ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # """ ++ # ) ++ ++ def test_put_options_after_master_as_operation_opts__original_behaviour( ++ self ++ ): + """ +- fixes bz 1378107 (do not use master options as operations) ++ downstream temporary behaviour ++ fixes bz 1458153 + """ + self.assert_effect( + "resource create R ocf:heartbeat:Dummy state=a op monitor" +- " interval=10s --master is-managed=false --force" ++ " interval=10s --master timeout=3m --force" + " --no-default-ops" + , + """ +@@ -749,22 +830,53 @@ class SuccessMaster(ResourceTestLocal): + + + + + +- +- +- + + """ +- ) +- +- def test_do_not_steal_primitive_meta_options(self): ++ , ++ output="Warning: flag '--master' is deprecated, use keyword" ++ " 'master' instead (see the usage)\n" ++ ) ++ ++ # def test_do_not_steal_primitive_meta_options(self): ++ # """ ++ # fixes bz 1378107 ++ # """ ++ # self.assert_effect( ++ # "resource create R ocf:heartbeat:Dummy meta a=b --master b=c" ++ # " --no-default-ops" ++ # , ++ # """ ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # ++ # """ ++ # ) ++ def test_steals_primitive_meta_options__original_behaviour(self): + """ +- fixes bz 1378107 ++ downstream temporary behaviour ++ fixes bz 1458153 + """ + self.assert_effect( + "resource create R ocf:heartbeat:Dummy meta a=b --master b=c" +@@ -775,11 +887,6 @@ class SuccessMaster(ResourceTestLocal): + +- +- +- + + + + ++ + + + + """ ++ , ++ output="Warning: flag '--master' is deprecated, use keyword" ++ " 'master' instead (see the usage)\n" + ) + + def test_takes_master_meta_attributes(self): + self.assert_effect( + "resource create --no-default-ops R ocf:heartbeat:IPaddr2" +- " ip=192.168.0.99 --master cidr_netmask=32" ++ " ip=192.168.0.99 master cidr_netmask=32" + , + """ + +@@ -1048,7 +1161,7 @@ class FailOrWarn(ResourceTestLocal): + def test_error_master_clone_combination(self): + self.assert_pcs_fail( + "resource create R ocf:heartbeat:Dummy --no-default-ops --clone" +- " --master" ++ " master" + , + "Error: you can specify only one of clone, master, bundle or" + " --group\n" +@@ -1056,7 +1169,7 @@ class FailOrWarn(ResourceTestLocal): + + def test_error_master_group_combination(self): + self.assert_pcs_fail( +- "resource create R ocf:heartbeat:Dummy --no-default-ops --master" ++ "resource create R ocf:heartbeat:Dummy --no-default-ops master" + " --group G" + , + "Error: you can specify only one of clone, master, bundle or" +@@ -1074,7 +1187,7 @@ class FailOrWarn(ResourceTestLocal): + + def test_error_bundle_master_combination(self): + self.assert_pcs_fail( +- "resource create R ocf:heartbeat:Dummy --no-default-ops --master" ++ "resource create R ocf:heartbeat:Dummy --no-default-ops master" + " bundle bundle_id" + , + "Error: you can specify only one of clone, master, bundle or" +diff --git a/pcs/test/test_constraints.py b/pcs/test/test_constraints.py +index 36bcb652..be751c36 100644 +--- a/pcs/test/test_constraints.py ++++ b/pcs/test/test_constraints.py +@@ -388,43 +388,43 @@ Ticket Constraints: + + def testColocationConstraints(self): + # see also BundleColocation +- line = "resource create M1 ocf:heartbeat:Dummy --master" ++ line = "resource create M1 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "" + +- line = "resource create M2 ocf:heartbeat:Dummy --master" ++ line = "resource create M2 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "" + +- line = "resource create M3 ocf:heartbeat:Dummy --master" ++ line = "resource create M3 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M4 ocf:heartbeat:Dummy --master" ++ line = "resource create M4 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M5 ocf:heartbeat:Dummy --master" ++ line = "resource create M5 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M6 ocf:heartbeat:Dummy --master" ++ line = "resource create M6 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M7 ocf:heartbeat:Dummy --master" ++ line = "resource create M7 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M8 ocf:heartbeat:Dummy --master" ++ line = "resource create M8 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M9 ocf:heartbeat:Dummy --master" ++ line = "resource create M9 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "",[returnVal, output] + +- line = "resource create M10 ocf:heartbeat:Dummy --master" ++ line = "resource create M10 ocf:heartbeat:Dummy master" + output, returnVal = pcs(temp_cib, line) + assert returnVal == 0 and output == "" + +@@ -1045,7 +1045,7 @@ Ticket Constraints: + assert returnVal == 1 + + def testLocationBadRules(self): +- o,r = pcs("resource create stateful0 ocf:heartbeat:Dummy --master") ++ o,r = pcs("resource create stateful0 ocf:heartbeat:Dummy master") + ac(o,"") + assert r == 0 + +@@ -1066,7 +1066,7 @@ Ticket Constraints: + """) + assert r == 0 + +- o,r = pcs("resource create stateful1 ocf:heartbeat:Dummy --master") ++ o,r = pcs("resource create stateful1 ocf:heartbeat:Dummy master") + ac(o,"") + assert r == 0 + +@@ -1105,7 +1105,7 @@ Ticket Constraints: + ac(o,"") + assert r == 0 + +- o,r = pcs("resource create stateful1 ocf:pacemaker:Stateful --master") ++ o,r = pcs("resource create stateful1 ocf:pacemaker:Stateful master") + ac(o, """\ + Warning: changing a monitor operation interval from 10 to 11 to make the operation unique + """) +@@ -1226,7 +1226,7 @@ Ticket Constraints: + self.assertEqual(0, returnVal) + + output, returnVal = pcs( +- "resource create stateful1 ocf:pacemaker:Stateful --master" ++ "resource create stateful1 ocf:pacemaker:Stateful master" + ) + ac(output, """\ + Warning: changing a monitor operation interval from 10 to 11 to make the operation unique +diff --git a/pcs/test/test_resource.py b/pcs/test/test_resource.py +index 20f6af73..c294e288 100644 +--- a/pcs/test/test_resource.py ++++ b/pcs/test/test_resource.py +@@ -2897,7 +2897,7 @@ Ticket Constraints: + + output, returnVal = pcs( + temp_cib, +- "resource create --no-default-ops D2 ocf:heartbeat:Dummy --master" ++ "resource create --no-default-ops D2 ocf:heartbeat:Dummy master" + ) + assert returnVal == 0 + assert output == "", [output] +@@ -3010,7 +3010,7 @@ Warning: changing a monitor operation interval from 10 to 11 to make the operati + ac(o,"") + assert r == 0 + +- o,r = pcs("resource create D3 ocf:heartbeat:Dummy --master") ++ o,r = pcs("resource create D3 ocf:heartbeat:Dummy master") + ac(o,"") + assert r == 0 + +@@ -3236,7 +3236,7 @@ Warning: changing a monitor operation interval from 10 to 11 to make the operati + + output, returnVal = pcs( + temp_cib, +- "resource create --no-default-ops dummy ocf:heartbeat:Dummy --master" ++ "resource create --no-default-ops dummy ocf:heartbeat:Dummy master" + ) + ac(output, "") + self.assertEqual(0, returnVal) +@@ -3901,7 +3901,7 @@ Error: Cannot remove more than one resource from cloned group + # However those test the pcs library. I'm leaving these tests here to + # test the cli part for now. + self.assert_pcs_success( +- "resource create --no-default-ops dummy ocf:pacemaker:Stateful --master", ++ "resource create --no-default-ops dummy ocf:pacemaker:Stateful master", + "Warning: changing a monitor operation interval from 10 to 11 to make the operation unique\n" + ) + +@@ -5514,7 +5514,7 @@ class CloneMasterUpdate(unittest.TestCase, AssertPcsMixin): + + def test_no_op_allowed_in_master_update(self): + self.assert_pcs_success( +- "resource create dummy ocf:heartbeat:Dummy --master" ++ "resource create dummy ocf:heartbeat:Dummy master" + ) + self.assert_pcs_success( + "resource show dummy-master", +diff --git a/pcs/utils.py b/pcs/utils.py +index e274cfe5..9c27d329 100644 +--- a/pcs/utils.py ++++ b/pcs/utils.py +@@ -2976,6 +2976,13 @@ def get_modifiers(): + "wait": pcs_options.get("--wait", False), + "watchdog": pcs_options.get("--watchdog", []), + "no_watchdog_validation": "--no-watchdog-validation" in pcs_options, ++ ++ #This is for `pcs resource create`. Fix of the bug ++ #https://bugzilla.redhat.com/show_bug.cgi?id=1378107 ++ #caused problems in openstack which uses `pcs resource create` ++ #see https://bugzilla.redhat.com/show_bug.cgi?id=1458153 ++ #so we give back the original misbehavior of master here temporarily. ++ "master": "--master" in pcs_options, + } + + def exit_on_cmdline_input_errror(error, main_name, usage_name): +-- +2.21.0 + diff --git a/SOURCES/bz1459503-01-OSP-workarounds-not-compatible-wi.patch b/SOURCES/bz1459503-01-OSP-workarounds-not-compatible-wi.patch new file mode 100644 index 0000000..f5d3746 --- /dev/null +++ b/SOURCES/bz1459503-01-OSP-workarounds-not-compatible-wi.patch @@ -0,0 +1,162 @@ +From 1a5824440819834aad193b0f7676e6d44285212f Mon Sep 17 00:00:00 2001 +From: Ivan Devat +Date: Wed, 7 Jun 2017 14:36:05 +0200 +Subject: [PATCH 2/4] squash bz1459503 OSP workarounds not compatible wi + +reuse existing pcmk authkey during setup + +show only warn if `resource create` creates remote +--- + pcs/cluster.py | 10 +++++++++- + pcs/lib/commands/resource.py | 6 ++++-- + pcs/test/cib_resource/test_create.py | 13 ++++++------- + pcs/test/test_resource.py | 24 ++++++++++++------------ + 4 files changed, 31 insertions(+), 22 deletions(-) + +diff --git a/pcs/cluster.py b/pcs/cluster.py +index 7727cbef..0bacae16 100644 +--- a/pcs/cluster.py ++++ b/pcs/cluster.py +@@ -525,13 +525,21 @@ def cluster_setup(argv): + print("Destroying cluster on nodes: {0}...".format( + ", ".join(primary_addr_list) + )) ++ ++ try: ++ pcmk_authkey_content = ( ++ open(settings.pacemaker_authkey_file, "rb").read() ++ ) ++ except EnvironmentError as e: ++ pcmk_authkey_content = generate_key() ++ + destroy_cluster(primary_addr_list) + print() + + try: + file_definitions = {} + file_definitions.update( +- node_communication_format.pcmk_authkey_file(generate_key()) ++ node_communication_format.pcmk_authkey_file(pcmk_authkey_content) + ) + if modifiers["encryption"] == "1": + file_definitions.update( +diff --git a/pcs/lib/commands/resource.py b/pcs/lib/commands/resource.py +index 0073964d..f34fef4b 100644 +--- a/pcs/lib/commands/resource.py ++++ b/pcs/lib/commands/resource.py +@@ -76,7 +76,8 @@ def _validate_remote_connection( + report_list.append( + reports.get_problem_creator( + report_codes.FORCE_NOT_SUITABLE_COMMAND, +- allow_not_suitable_command ++ is_forced=True, ++ # allow_not_suitable_command + )(reports.use_command_node_add_remote) + ) + +@@ -106,7 +107,8 @@ def _validate_guest_change( + report_list.append( + reports.get_problem_creator( + report_codes.FORCE_NOT_SUITABLE_COMMAND, +- allow_not_suitable_command ++ is_forced=True ++ # allow_not_suitable_command + )(create_report) + ) + +diff --git a/pcs/test/cib_resource/test_create.py b/pcs/test/cib_resource/test_create.py +index 57d95350..3cd49e74 100644 +--- a/pcs/test/cib_resource/test_create.py ++++ b/pcs/test/cib_resource/test_create.py +@@ -1627,11 +1627,10 @@ class FailOrWarnGroup(ResourceTestLocal): + ) + + def test_fail_when_on_pacemaker_remote_attempt(self): +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource create R2 ocf:pacemaker:remote", +- "Error: this command is not sufficient for creating a remote" +- " connection, use 'pcs cluster node add-remote'" +- ", use --force to override\n" ++ "Warning: this command is not sufficient for creating a remote" ++ " connection, use 'pcs cluster node add-remote'\n" + ) + + def test_warn_when_on_pacemaker_remote_attempt(self): +@@ -1731,10 +1730,10 @@ class FailOrWarnGroup(ResourceTestLocal): + ) + + def test_fail_when_on_pacemaker_remote_guest_attempt(self): +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource create R2 ocf:heartbeat:Dummy meta remote-node=HOST", +- "Error: this command is not sufficient for creating a guest node," +- " use 'pcs cluster node add-guest', use --force to override\n" ++ "Warning: this command is not sufficient for creating a guest node," ++ " use 'pcs cluster node add-guest'\n" + ) + + def test_warn_when_on_pacemaker_remote_guest_attempt(self): +diff --git a/pcs/test/test_resource.py b/pcs/test/test_resource.py +index c294e288..4581942d 100644 +--- a/pcs/test/test_resource.py ++++ b/pcs/test/test_resource.py +@@ -5871,10 +5871,10 @@ class ResourceUpdateRemoteAndGuestChecks(unittest.TestCase, AssertPcsMixin): + self.assert_pcs_success( + "resource create R ocf:heartbeat:Dummy", + ) +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource update R meta remote-node=HOST", +- "Error: this command is not sufficient for creating a guest node," +- " use 'pcs cluster node add-guest', use --force to override\n" ++ "Warning: this command is not sufficient for creating a guest node," ++ " use 'pcs cluster node add-guest'\n" + ) + def test_update_warn_on_pacemaker_guest_attempt(self): + self.assert_pcs_success( +@@ -5893,10 +5893,10 @@ class ResourceUpdateRemoteAndGuestChecks(unittest.TestCase, AssertPcsMixin): + "Warning: this command is not sufficient for creating a guest node," + " use 'pcs cluster node add-guest'\n" + ) +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource update R meta remote-node=", +- "Error: this command is not sufficient for removing a guest node," +- " use 'pcs cluster node remove-guest', use --force to override\n" ++ "Warning: this command is not sufficient for removing a guest node," ++ " use 'pcs cluster node remove-guest'\n" + ) + + def test_update_warn_on_pacemaker_guest_attempt_remove(self): +@@ -5917,10 +5917,10 @@ class ResourceUpdateRemoteAndGuestChecks(unittest.TestCase, AssertPcsMixin): + self.assert_pcs_success( + "resource create R ocf:heartbeat:Dummy", + ) +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource meta R remote-node=HOST", +- "Error: this command is not sufficient for creating a guest node," +- " use 'pcs cluster node add-guest', use --force to override\n" ++ "Warning: this command is not sufficient for creating a guest node," ++ " use 'pcs cluster node add-guest'\n" + ) + + def test_meta_warn_on_pacemaker_guest_attempt(self): +@@ -5941,10 +5941,10 @@ class ResourceUpdateRemoteAndGuestChecks(unittest.TestCase, AssertPcsMixin): + "Warning: this command is not sufficient for creating a guest node," + " use 'pcs cluster node add-guest'\n" + ) +- self.assert_pcs_fail( ++ self.assert_pcs_success( + "resource meta R remote-node=", +- "Error: this command is not sufficient for removing a guest node," +- " use 'pcs cluster node remove-guest', use --force to override\n" ++ "Warning: this command is not sufficient for removing a guest node," ++ " use 'pcs cluster node remove-guest'\n" + ) + + def test_meta_warn_on_pacemaker_guest_attempt_remove(self): +-- +2.21.0 + diff --git a/SOURCES/change-cman-to-rhel6-in-messages.patch b/SOURCES/change-cman-to-rhel6-in-messages.patch new file mode 100644 index 0000000..d2f0bd8 --- /dev/null +++ b/SOURCES/change-cman-to-rhel6-in-messages.patch @@ -0,0 +1,400 @@ +From 1c3ccce2b538532daa4e4ae35df3f71861e56e16 Mon Sep 17 00:00:00 2001 +From: Ivan Devat +Date: Mon, 23 May 2016 17:00:13 +0200 +Subject: [PATCH 3/4] change cman to rhel6 in messages + +--- + pcs/cli/common/console_report.py | 8 ++++---- + pcs/cluster.py | 6 +++--- + pcs/config.py | 2 +- + pcs/pcs.8 | 12 ++++++------ + pcs/quorum.py | 2 +- + pcs/test/test_cluster.py | 26 +++++++++++++------------- + pcs/usage.py | 20 ++++++++++---------- + pcsd/views/_dialogs.erb | 2 +- + pcsd/views/manage.erb | 16 ++++++++-------- + pcsd/views/nodes.erb | 2 +- + 10 files changed, 48 insertions(+), 48 deletions(-) + +diff --git a/pcs/cli/common/console_report.py b/pcs/cli/common/console_report.py +index 1824bd9a..06ba9a00 100644 +--- a/pcs/cli/common/console_report.py ++++ b/pcs/cli/common/console_report.py +@@ -718,7 +718,7 @@ CODE_TO_MESSAGE_BUILDER_MAP = { + , + + codes.CMAN_UNSUPPORTED_COMMAND: +- "This command is not supported on CMAN clusters" ++ "This command is not supported on RHEL 6 clusters" + , + + codes.ID_ALREADY_EXISTS: lambda info: +@@ -978,7 +978,7 @@ CODE_TO_MESSAGE_BUILDER_MAP = { + , + + codes.IGNORED_CMAN_UNSUPPORTED_OPTION: lambda info: +- "{option_name} ignored as it is not supported on CMAN clusters" ++ "{option_name} ignored as it is not supported on RHEL 6 clusters" + .format(**info) + , + +@@ -987,12 +987,12 @@ CODE_TO_MESSAGE_BUILDER_MAP = { + , + + codes.CMAN_UDPU_RESTART_REQUIRED: ( +- "Using udpu transport on a CMAN cluster," ++ "Using udpu transport on a RHEL 6 cluster," + " cluster restart is required after node add or remove" + ), + + codes.CMAN_BROADCAST_ALL_RINGS: ( +- "Enabling broadcast for all rings as CMAN does not support" ++ "Enabling broadcast for all rings as RHEL 6 does not support" + " broadcast in only one ring" + ), + +diff --git a/pcs/cluster.py b/pcs/cluster.py +index 0bacae16..ca47072d 100644 +--- a/pcs/cluster.py ++++ b/pcs/cluster.py +@@ -2122,7 +2122,7 @@ def node_add(lib_env, node0, node1, modifiers): + else: + utils.err("Unable to update any nodes") + if utils.is_cman_with_udpu_transport(): +- print("Warning: Using udpu transport on a CMAN cluster, " ++ print("Warning: Using udpu transport on a RHEL 6 cluster, " + + "cluster restart is required to apply node addition") + if wait: + print() +@@ -2198,7 +2198,7 @@ def node_remove(lib_env, node0, modifiers): + output, retval = utils.reloadCorosync() + output, retval = utils.run(["crm_node", "--force", "-R", node0]) + if utils.is_cman_with_udpu_transport(): +- print("Warning: Using udpu transport on a CMAN cluster, " ++ print("Warning: Using udpu transport on a RHEL 6 cluster, " + + "cluster restart is required to apply node removal") + + def cluster_localnode(argv): +@@ -2366,7 +2366,7 @@ def cluster_uidgid(argv, silent_list = False): + + def cluster_get_corosync_conf(argv): + if utils.is_rhel6(): +- utils.err("corosync.conf is not supported on CMAN clusters") ++ utils.err("corosync.conf is not supported on RHEL 6 clusters") + + if len(argv) > 1: + usage.cluster() +diff --git a/pcs/config.py b/pcs/config.py +index 6c0f8194..f2cdbaa3 100644 +--- a/pcs/config.py ++++ b/pcs/config.py +@@ -741,7 +741,7 @@ def config_checkpoint_restore(argv): + + def config_import_cman(argv): + if no_clufter: +- utils.err("Unable to perform a CMAN cluster conversion due to missing python-clufter package") ++ utils.err("Unable to perform a RHEL 6 cluster conversion due to missing python-clufter package") + # prepare convertor options + cluster_conf = settings.cluster_conf_file + dry_run_output = None +diff --git a/pcs/pcs.8 b/pcs/pcs.8 +index 5670f458..db49f8ba 100644 +--- a/pcs/pcs.8 ++++ b/pcs/pcs.8 +@@ -215,13 +215,13 @@ auth [[:]] [...] [\fB\-u\fR ] [\fB\-p\fR ] [\fB\ + Authenticate pcs to pcsd on nodes specified, or on all nodes configured in the local cluster if no nodes are specified (authorization tokens are stored in ~/.pcs/tokens or /var/lib/pcsd/tokens for root). By default all nodes are also authenticated to each other, using \fB\-\-local\fR only authenticates the local node (and does not authenticate the remote nodes with each other). Using \fB\-\-force\fR forces re\-authentication to occur. + .TP + setup [\fB\-\-start\fR [\fB\-\-wait\fR[=]]] [\fB\-\-local\fR] [\fB\-\-enable\fR] \fB\-\-name\fR [] [...] [\fB\-\-transport\fR udpu|udp] [\fB\-\-rrpmode\fR active|passive] [\fB\-\-addr0\fR [[[\fB\-\-mcast0\fR
] [\fB\-\-mcastport0\fR ] [\fB\-\-ttl0\fR ]] | [\fB\-\-broadcast0\fR]] [\fB\-\-addr1\fR [[[\fB\-\-mcast1\fR
] [\fB\-\-mcastport1\fR ] [\fB\-\-ttl1\fR ]] | [\fB\-\-broadcast1\fR]]]] [\fB\-\-wait_for_all\fR=<0|1>] [\fB\-\-auto_tie_breaker\fR=<0|1>] [\fB\-\-last_man_standing\fR=<0|1> [\fB\-\-last_man_standing_window\fR=