diff --git a/.gitignore b/.gitignore index b5198b3..c3430ba 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ SOURCES/json-2.3.0.gem SOURCES/mustermann-1.1.1.gem SOURCES/open4-1.3.4-1.gem SOURCES/pcs-0.10.6.tar.gz -SOURCES/pcs-web-ui-0.1.3.tar.gz +SOURCES/pcs-web-ui-0.1.4.tar.gz SOURCES/pcs-web-ui-node-modules-0.1.3.tar.xz SOURCES/pyagentx-0.4.pcs.2.tar.gz SOURCES/rack-2.2.3.gem diff --git a/.pcs.metadata b/.pcs.metadata index 2c6863f..e3f6601 100644 --- a/.pcs.metadata +++ b/.pcs.metadata @@ -10,7 +10,7 @@ cfa25e7a3760c3ec16723cb8263d9b7a52d0eadf SOURCES/ffi-1.13.1.gem 50a4e37904485810cb05e27d75c9783e5a8f3402 SOURCES/mustermann-1.1.1.gem 41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem 73fafb4228326c14a799f0cccbcb734ab7ba2bfa SOURCES/pcs-0.10.6.tar.gz -df118954a980ceecc9cdd0e85a83d43253836f7f SOURCES/pcs-web-ui-0.1.3.tar.gz +d67de4d5cefd9ba3cde45c7ec4a5d1e9b1e6032a SOURCES/pcs-web-ui-0.1.4.tar.gz 3e09042e3dc32c992451ba4c0454f2879f0d3f40 SOURCES/pcs-web-ui-node-modules-0.1.3.tar.xz 3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz 345b7169d4d2d62176a225510399963bad62b68f SOURCES/rack-2.2.3.gem diff --git a/SOURCES/bz1867516-01-rule-fix-mixing-and-and-or-expressions.patch b/SOURCES/bz1867516-01-rule-fix-mixing-and-and-or-expressions.patch new file mode 100644 index 0000000..75222c5 --- /dev/null +++ b/SOURCES/bz1867516-01-rule-fix-mixing-and-and-or-expressions.patch @@ -0,0 +1,80 @@ +From 85f8cbca6af296a5b8e4d43e9f56daed0d7c195b Mon Sep 17 00:00:00 2001 +From: Tomas Jelinek +Date: Mon, 10 Aug 2020 12:17:01 +0200 +Subject: [PATCH 1/2] rule: fix mixing 'and' and 'or' expressions + +--- + pcs/lib/cib/rule/parsed_to_cib.py | 5 +++++ + pcs_test/tier0/lib/cib/rule/test_parsed_to_cib.py | 4 ++-- + pcs_test/tier1/test_cib_options.py | 11 +++++++++-- + 3 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/pcs/lib/cib/rule/parsed_to_cib.py b/pcs/lib/cib/rule/parsed_to_cib.py +index 0fcae4f1..130663db 100644 +--- a/pcs/lib/cib/rule/parsed_to_cib.py ++++ b/pcs/lib/cib/rule/parsed_to_cib.py +@@ -62,6 +62,11 @@ def __export_bool( + { + "id": create_subelement_id(parent_el, "rule", id_provider), + "boolean-op": boolean.operator.lower(), ++ # Score or score-attribute is required for nested rules, otherwise ++ # the CIB is not valid. Pacemaker doesn't use the score of nested ++ # rules. Score for the top rule, which is used by pacemaker, is ++ # supposed to be set in the export function above. ++ "score": "0", + }, + ) + for child in boolean.children: +diff --git a/pcs_test/tier0/lib/cib/rule/test_parsed_to_cib.py b/pcs_test/tier0/lib/cib/rule/test_parsed_to_cib.py +index f61fce99..fa639f7c 100644 +--- a/pcs_test/tier0/lib/cib/rule/test_parsed_to_cib.py ++++ b/pcs_test/tier0/lib/cib/rule/test_parsed_to_cib.py +@@ -185,7 +185,7 @@ class Complex(Base): + ), + """ + +- ++ + +@@ -197,7 +197,7 @@ class Complex(Base): + class="ocf" provider="heartbeat" type="Dummy" + /> + +- ++ + +diff --git a/pcs_test/tier1/test_cib_options.py b/pcs_test/tier1/test_cib_options.py +index ba8f3515..92dbaed1 100644 +--- a/pcs_test/tier1/test_cib_options.py ++++ b/pcs_test/tier1/test_cib_options.py +@@ -254,14 +254,21 @@ class OpDefaultsSetCreate( + self.assert_effect( + ( + f"{self.cli_command} set create id=X meta nam1=val1 " +- "rule resource ::Dummy and op monitor" ++ "rule resource ::Dummy and (op start or op stop)" + ), + f"""\ + <{self.cib_tag}> + + + +- ++ ++ ++ ++ + + + +-- +2.25.4 + diff --git a/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch b/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch index 85d8125..6adfc5b 100644 --- a/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch +++ b/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch @@ -1,7 +1,7 @@ -From 8507983ea60f8cfd03a5cdfae2fb564dbe0ef1d2 Mon Sep 17 00:00:00 2001 +From aaf5cbfcc661cedc49ae5d86c0d442502aa17231 Mon Sep 17 00:00:00 2001 From: Ivan Devat Date: Tue, 20 Nov 2018 15:03:56 +0100 -Subject: [PATCH 3/3] do not support cluster setup with udp(u) transport +Subject: [PATCH 2/2] do not support cluster setup with udp(u) transport --- pcs/pcs.8 | 2 ++ diff --git a/SPECS/pcs.spec b/SPECS/pcs.spec index daeb006..3a5e3fd 100644 --- a/SPECS/pcs.spec +++ b/SPECS/pcs.spec @@ -1,6 +1,6 @@ Name: pcs Version: 0.10.6 -Release: 3%{?dist} +Release: 4%{?dist} # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses # GPLv2: pcs @@ -24,7 +24,8 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64 %global pcs_source_name %{name}-%{version_or_commit} # ui_commit can be determined by hash, tag or branch -%global ui_commit 0.1.3 +%global ui_commit 0.1.4 +%global ui_modules_version 0.1.3 %global ui_src_name pcs-web-ui-%{ui_commit} %global pcs_snmp_pkg_name pcs-snmp @@ -105,7 +106,7 @@ Source95: https://rubygems.org/downloads/thin-%{version_rubygem_thin}.gem Source96: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_keywords}.gem Source100: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz -Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_commit}.tar.xz +Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_modules_version}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz # Patches from upstream. # They should come before downstream patches to avoid unnecessary conflicts. @@ -116,6 +117,7 @@ Patch1: bz1817547-01-resource-and-operation-defaults.patch Patch2: bz1805082-01-fix-resource-stonith-refresh-documentation.patch Patch3: bz1843079-01-upgrade-CIB-schema-for-on-fail-demote.patch Patch4: bz1857295-01-Fix-tag-removal-in-resource-unclone-ungroup-commands.patch +Patch5: bz1867516-01-rule-fix-mixing-and-and-or-expressions.patch # Downstream patches do not come from upstream. They adapt pcs for specific # RHEL needs. @@ -286,6 +288,7 @@ update_times_patch %{PATCH1} update_times_patch %{PATCH2} update_times_patch %{PATCH3} update_times_patch %{PATCH4} +update_times_patch %{PATCH5} update_times_patch %{PATCH101} cp -f %SOURCE1 pcsd/public/images @@ -620,6 +623,11 @@ remove_all_tests %license pyagentx_LICENSE.txt %changelog +* Tue Aug 11 2020 Miroslav Lisik - 0.10.6-4 +- Fixed invalid CIB error caused by resource and operation defaults with mixed and-or rules +- Updated pcs-web-ui +- Resolves: rhbz#1867516 + * Thu Jul 16 2020 Miroslav Lisik - 0.10.6-3 - Added Upgrade CIB if user specifies on-fail=demote - Fixed rpmdiff issue with binary stripping checker