diff --git a/ChangeLog b/ChangeLog index ea65fbec37e..c51c439f271 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +* Tue Jan 29 2019 Ken Gaillot Pacemaker-2.0.1-rc4 +- Changesets: 42 + 15 files changed, 216 insertions(+), 137 deletions(-) + +- Changes since Pacemaker-2.0.1-rc3 + + attrd: clear election dampening when the writer leaves + + controller: clear election dampening when DC is lost + + scheduler: don't order non-DC shutdowns before DC fencing + + libcrmservice: cancel DBus call when cancelling systemd/upstart actions + + tools: remove duplicate fence history state in crm_mon XML output + + build: offer configure option to disable tests broken with glib 2.59.0 + + build: minor logging fixes to allow compatibility with GCC 9 -Werror + * Thu Jan 10 2019 Ken Gaillot Pacemaker-2.0.1-rc3 - Changesets: 27 - Diff: 20 files changed, 375 insertions(+), 195 deletions(-) diff --git a/cts/CIB.py b/cts/CIB.py index 2e606b222d6..3b3c2ac47c8 100644 --- a/cts/CIB.py +++ b/cts/CIB.py @@ -441,7 +441,8 @@ def __init__(self, CM): self.register("pacemaker20", CIB20, CM, self) self.register("pacemaker30", CIB30, CM, self) # self.register("hae", HASI, CM, self) - self.target = self.CM.Env["nodes"][0] + if self.CM.Env["ListTests"] == 0: + self.target = self.CM.Env["nodes"][0] self.tmpfile = None def log(self, args): diff --git a/daemons/controld/controld_attrd.c b/daemons/controld/controld_attrd.c index 0ce8be8bf8c..06538041cbe 100644 --- a/daemons/controld/controld_attrd.c +++ b/daemons/controld/controld_attrd.c @@ -81,31 +81,44 @@ update_attrd_helper(const char *host, const char *name, const char *value, } for (int attempt = 1; attempt <= 4; ++attempt) { + rc = pcmk_ok; + + // If we're not already connected, try to connect if (crm_ipc_connected(attrd_ipc) == FALSE) { - crm_ipc_close(attrd_ipc); - crm_info("Connecting to attribute manager (attempt %d of 4)", - attempt); + if (attempt == 1) { + // Start with a clean slate + crm_ipc_close(attrd_ipc); + } if (crm_ipc_connect(attrd_ipc) == FALSE) { - crm_perror(LOG_INFO, "Connection to attribute manager failed"); + rc = errno; } + crm_debug("Attribute manager connection attempt %d of 4: %s (%d)", + attempt, pcmk_strerror(rc), rc); } - if (command) { - rc = attrd_update_delegate(attrd_ipc, command, host, name, value, + if (rc == pcmk_ok) { + rc = command? + attrd_update_delegate(attrd_ipc, command, host, name, value, XML_CIB_TAG_STATUS, NULL, NULL, - user_name, attrd_opts); - } else { - /* (ab)using name/value as resource/operation */ - rc = attrd_clear_delegate(attrd_ipc, host, name, value, - interval_spec, user_name, attrd_opts); + user_name, attrd_opts) + + /* No command means clear fail count (name/value is really + * resource/operation) + */ + : attrd_clear_delegate(attrd_ipc, host, name, value, + interval_spec, user_name, attrd_opts); + crm_debug("Attribute manager request attempt %d of 4: %s (%d)", + attempt, pcmk_strerror(rc), rc); } if (rc == pcmk_ok) { + // Success, we're done break; - } else if (rc != -EAGAIN && rc != -EALREADY) { - crm_info("Disconnecting from attribute manager: %s (%d)", - pcmk_strerror(rc), rc); + } else if ((rc != EAGAIN) && (rc != EALREADY)) { + /* EAGAIN or EALREADY indicates a temporary block, so just try + * again. Otherwise, close the connection for a clean slate. + */ crm_ipc_close(attrd_ipc); } diff --git a/daemons/controld/controld_election.c b/daemons/controld/controld_election.c index 9fbf1e1ebc9..5d6858c0936 100644 --- a/daemons/controld/controld_election.c +++ b/daemons/controld/controld_election.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2018 Andrew Beekhof + * Copyright 2004-2019 Andrew Beekhof * * This source code is licensed under the GNU General Public License version 2 * or later (GPLv2+) WITHOUT ANY WARRANTY. @@ -41,6 +41,13 @@ void controld_remove_voter(const char *uname) { election_remove(fsa_election, uname); + + if (safe_str_eq(uname, fsa_our_dc)) { + /* Clear any election dampening in effect. Otherwise, if the lost DC had + * just won, an immediate new election could fizzle out with no new DC. + */ + election_clear_dampening(fsa_election); + } } void diff --git a/doc/Makefile.am b/doc/Makefile.am index 1c4a1d3a575..aa9ff637f2a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,21 +1,8 @@ # -# doc: Pacemaker code +# Copyright 2004-2019 Andrew Beekhof # -# Copyright (C) 2008 Andrew Beekhof -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/Makefile.common @@ -73,7 +60,6 @@ PNGS_ORIGINAL = Pacemaker_Remote/en-US/images/pcmk-ha-cluster-stack.png \ shared/en-US/images/Partitioning.png \ shared/en-US/images/Welcome.png \ shared/en-US/images/resource-set.png \ - shared/en-US/images/three-sets-complex.png \ shared/en-US/images/three-sets.png \ shared/en-US/images/two-sets.png PNGS_GENERATED = $(SVGS:%.svg=%-small.png) \ diff --git a/doc/Pacemaker_Administration/en-US/Pacemaker_Administration.ent b/doc/Pacemaker_Administration/en-US/Pacemaker_Administration.ent index d9e752b6365..f67f950ee55 100644 --- a/doc/Pacemaker_Administration/en-US/Pacemaker_Administration.ent +++ b/doc/Pacemaker_Administration/en-US/Pacemaker_Administration.ent @@ -1,4 +1,4 @@ - + diff --git a/doc/Pacemaker_Administration/en-US/Revision_History.xml b/doc/Pacemaker_Administration/en-US/Revision_History.xml index eaaacd64571..dae578f0bbe 100644 --- a/doc/Pacemaker_Administration/en-US/Revision_History.xml +++ b/doc/Pacemaker_Administration/en-US/Revision_History.xml @@ -10,33 +10,33 @@ - 1-1 - Tue Dec 4 2018 + 1-0 + Tue Jan 23 2018 KenGaillot kgaillot@redhat.com - - JanPokorný - jpokorny@redhat.com - - Add "Troubleshooting" chapter, minor - clarifications and reformatting + Move administration-oriented information from + Pacemaker Explained into its own + book - 1-0 - Tue Jan 23 2018 + 1-1 + Mon Jan 28 2019 KenGaillot kgaillot@redhat.com + + JanPokorný + jpokorny@redhat.com + - Move administration-oriented information from - Pacemaker Explained into its own - book + Add "Troubleshooting" chapter, minor + clarifications and reformatting diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 3f76d8a4751..c28c8e92199 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -753,15 +753,15 @@ to be an unordered set using "AND" logic by default, and adding Another common situation is for an administrator to create a set of colocated resources. -One way to do this would be to define a resource group (see +The simplest way to do this is to define a resource group (see <>), but that cannot always accurately express the desired -state. +relationships. For example, maybe the resources do not need to be ordered. Another way would be to define each relationship as an individual constraint, -but that causes a constraint explosion as the number of resources and -combinations grow. An example of this approach: +but that causes a difficult-to-follow constraint explosion as the number of +resources and combinations grow. -.Chain of colocated resources +.Colocation chain as individual constraints, where A is placed first, then B, then C, then D ====== [source,XML] ------- @@ -773,12 +773,9 @@ combinations grow. An example of this approach: ------- ====== -To make things easier, resource sets (see <>) can be used -within colocation constraints. As with the chained version, a -resource that can't be active prevents any resource that must be -colocated with it from being active. For example, if +B+ is not -able to run, then both +C+ and by inference +D+ must also remain -stopped. Here is an example +resource_set+: +To express complicated relationships with a simplified syntax +footnote:[which is not the same as saying easy to follow], +<> can be used within colocation constraints. .Equivalent colocation chain expressed using +resource_set+ ====== @@ -797,6 +794,19 @@ stopped. Here is an example +resource_set+: ------- ====== +[NOTE] +==== +Within a +resource_set+, the resources are listed in the order they are +_placed_, which is the reverse of the order in which they are _colocated_. +In the above example, resource +A+ is placed before resource +B+, which is +the same as saying resource +B+ is colocated with resource +A+. +==== + +As with individual constraints, a resource that can't be active prevents any +resource that must be colocated with it from being active. In both of the two +previous examples, if +B+ is unable to run, then both +C+ and by inference +D+ +must remain stopped. + [IMPORTANT] ========= If you use a higher-level tool, pay attention to how it exposes this @@ -804,38 +814,47 @@ functionality. Depending on the tool, creating a set +A B+ may be equivalent to +A with B+, or +B with A+. ========= -This notation can also be used to tell the cluster that sets of resources must -be colocated relative to each other, where the individual members of each set -may or may not depend on each other being active (controlled by the -+sequential+ property). +Resource sets can also be used to tell the cluster that entire _sets_ of +resources must be colocated relative to each other, while the individual +members within any one set may or may not be colocated relative to each other +(determined by the set's +sequential+ property). -In this example, +A+, +B+, and +C+ will each be colocated with +D+. -+D+ must be active, but any of +A+, +B+, or +C+ may be inactive without -affecting any other resources. +In the following example, resources +B+, +C+, and +D+ will each be colocated +with +A+ (which will be placed first). +A+ must be able to run in order for any +of the resources to run, but any of +B+, +C+, or +D+ may be stopped without +affecting any of the others. -.Using colocated sets to specify a common peer +.Using colocated sets to specify a shared dependency ====== [source,XML] ------- - - + - - + + + ------- ====== +[NOTE] +==== +Pay close attention to the order in which resources and sets are listed. +While the members of any one sequential set are placed first to last (i.e., the +colocation dependency is last with first), multiple sets are placed last to +first (i.e. the colocation dependency is first with last). +==== + [IMPORTANT] ==== -A colocated set with +sequential=false+ makes sense only if there is another -set in the constraint. Otherwise, the constraint has no effect. +A colocated set with +sequential="false"+ makes sense only if there is +another set in the constraint. Otherwise, the constraint has no effect. ==== There is no inherent limit to the number and size of the sets used. @@ -848,15 +867,15 @@ before it must also be active. If desired, you can restrict the dependency to instances of promotable clone resources that are in a specific role, using the set's +role+ property. -.Colocation chain in which the members of the middle set have no interdependencies, and the last listed set (which the cluster places first) is restricted to instances in master status. +.Colocation in which the members of the middle set have no interdependencies, and the last set listed applies only to instances in the master role ====== [source,XML] ------- - - + + @@ -864,24 +883,18 @@ resources that are in a specific role, using the set's +role+ property. - - + + ------- ====== -.Visual representation the above example (resources to the left are placed first) -image::images/three-sets-complex.png["Colocation chain",width="16cm",height="9cm",align="center"] +.Visual representation of the above example (resources are placed from left to right) +image::images/pcmk-colocated-sets.png["Colocation chain",width="960px",height="431px",align="center"] [NOTE] ==== -Pay close attention to the order in which resources and sets are listed. -While the colocation dependency for members of any one set is last-to-first, -the colocation dependency for multiple sets is first-to-last. In the above -example, +B+ is colocated with +A+, but +colocated-set-1+ is -colocated with +colocated-set-2+. - Unlike ordered sets, colocated sets do not use the +require-all+ option. ==== diff --git a/doc/Pacemaker_Explained/en-US/Pacemaker_Explained.ent b/doc/Pacemaker_Explained/en-US/Pacemaker_Explained.ent index a767f5ffc27..a79fcf33e82 100644 --- a/doc/Pacemaker_Explained/en-US/Pacemaker_Explained.ent +++ b/doc/Pacemaker_Explained/en-US/Pacemaker_Explained.ent @@ -1,4 +1,4 @@ - + diff --git a/doc/Pacemaker_Explained/en-US/Revision_History.xml b/doc/Pacemaker_Explained/en-US/Revision_History.xml index 3da97ac9b8f..71c5a5b0056 100644 --- a/doc/Pacemaker_Explained/en-US/Revision_History.xml +++ b/doc/Pacemaker_Explained/en-US/Revision_History.xml @@ -141,7 +141,7 @@ 12-0 - Fri Dec 7 2018 + Mon Jan 28 2019 KenGaillotkgaillot@redhat.com ReidWahlnwahl@redhat.com JanPokornýjpokorny@redhat.com diff --git a/doc/Pacemaker_Remote/en-US/Book_Info.xml b/doc/Pacemaker_Remote/en-US/Book_Info.xml index bf11f23ff9f..813240285d9 100644 --- a/doc/Pacemaker_Remote/en-US/Book_Info.xml +++ b/doc/Pacemaker_Remote/en-US/Book_Info.xml @@ -13,7 +13,7 @@ simple textual changes (corrections, translations, etc.). --> 7 - 1 + 2 The document exists as both a reference and deployment guide for the Pacemaker Remote service. diff --git a/doc/Pacemaker_Remote/en-US/Revision_History.xml b/doc/Pacemaker_Remote/en-US/Revision_History.xml index b6360491104..9950f4c7a84 100644 --- a/doc/Pacemaker_Remote/en-US/Revision_History.xml +++ b/doc/Pacemaker_Remote/en-US/Revision_History.xml @@ -56,6 +56,17 @@ KenGaillotkgaillot@redhat.com Update banner for Pacemaker 2.0 and content for CentOS 7.4 with Pacemaker 1.1.16 + + + 7-2 + Mon Jan 29 2019 + + JanPokorný + jpokorny@redhat.com + + Minor reformatting + + diff --git a/doc/shared/en-US/images/pcmk-colocated-sets.svg b/doc/shared/en-US/images/pcmk-colocated-sets.svg new file mode 100644 index 00000000000..9e53fc48f97 --- /dev/null +++ b/doc/shared/en-US/images/pcmk-colocated-sets.svg @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + A + A + + + + B + B + + + + C + C + + + + D + D + + + + E + E + + + + F + F + + + + G + G + + + + + + + + + + + diff --git a/doc/shared/en-US/images/three-sets-complex.png b/doc/shared/en-US/images/three-sets-complex.png deleted file mode 100644 index 4318f6c62f0..00000000000 Binary files a/doc/shared/en-US/images/three-sets-complex.png and /dev/null differ