Skip to content

Commit

Permalink
Merge pull request #1686 from kgaillot/release
Browse files Browse the repository at this point in the history
Release 2.0.1-rc4
  • Loading branch information
kgaillot committed Jan 30, 2019
2 parents 788ee2c + 8de16b8 commit 57cc9c1
Show file tree
Hide file tree
Showing 14 changed files with 568 additions and 88 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
* Tue Jan 29 2019 Ken Gaillot <kgaillot@redhat.com> 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 <kgaillot@redhat.com> Pacemaker-2.0.1-rc3
- Changesets: 27
- Diff: 20 files changed, 375 insertions(+), 195 deletions(-)
Expand Down
3 changes: 2 additions & 1 deletion cts/CIB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
41 changes: 27 additions & 14 deletions daemons/controld/controld_attrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
9 changes: 8 additions & 1 deletion daemons/controld/controld_election.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net>
* Copyright 2004-2019 Andrew Beekhof <andrew@beekhof.net>
*
* This source code is licensed under the GNU General Public License version 2
* or later (GPLv2+) WITHOUT ANY WARRANTY.
Expand Down Expand Up @@ -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
Expand Down
20 changes: 3 additions & 17 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
#
# doc: Pacemaker code
# Copyright 2004-2019 Andrew Beekhof <andrew@beekhof.net>
#
# 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

Expand Down Expand Up @@ -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) \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!ENTITY PRODUCT "Pacemaker Administration">
<!ENTITY BOOKID "Pacemaker_Administration">
<!ENTITY YEAR "2009-2018">
<!ENTITY YEAR "2009-2019">
<!ENTITY HOLDER "Andrew Beekhof">
26 changes: 13 additions & 13 deletions doc/Pacemaker_Administration/en-US/Revision_History.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@
<revhistory>

<revision>
<revnumber>1-1</revnumber>
<date>Tue Dec 4 2018</date>
<revnumber>1-0</revnumber>
<date>Tue Jan 23 2018</date>
<author>
<firstname>Ken</firstname><surname>Gaillot</surname>
<email>kgaillot@redhat.com</email>
</author>
<author>
<firstname>Jan</firstname><surname>Pokorný</surname>
<email>jpokorny@redhat.com</email>
</author>
<revdescription>
<simplelist><member>Add "Troubleshooting" chapter, minor
clarifications and reformatting</member></simplelist>
<simplelist><member>Move administration-oriented information from
Pacemaker Explained into its own
book</member></simplelist>
</revdescription>
</revision>

<revision>
<revnumber>1-0</revnumber>
<date>Tue Jan 23 2018</date>
<revnumber>1-1</revnumber>
<date>Mon Jan 28 2019</date>
<author>
<firstname>Ken</firstname><surname>Gaillot</surname>
<email>kgaillot@redhat.com</email>
</author>
<author>
<firstname>Jan</firstname><surname>Pokorný</surname>
<email>jpokorny@redhat.com</email>
</author>
<revdescription>
<simplelist><member>Move administration-oriented information from
Pacemaker Explained into its own
book</member></simplelist>
<simplelist><member>Add "Troubleshooting" chapter, minor
clarifications and reformatting</member></simplelist>
</revdescription>
</revision>

Expand Down
89 changes: 51 additions & 38 deletions doc/Pacemaker_Explained/en-US/Ch-Constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<<group-resources>>), 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]
-------
Expand All @@ -773,12 +773,9 @@ combinations grow. An example of this approach:
-------
======

To make things easier, resource sets (see <<s-resource-sets>>) 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],
<<s-resource-sets,resource sets>> can be used within colocation constraints.

.Equivalent colocation chain expressed using +resource_set+
======
Expand All @@ -797,45 +794,67 @@ 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
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]
-------
<constraints>
<rsc_colocation id="coloc-1" score="INFINITY" >
<resource_set id="colocated-set-1" sequential="false">
<resource_ref id="A"/>
<resource_set id="colocated-set-2" sequential="false">
<resource_ref id="B"/>
<resource_ref id="C"/>
</resource_set>
<resource_set id="colocated-set-2" sequential="true">
<resource_ref id="D"/>
</resource_set>
<resource_set id="colocated-set-1" sequential="true">
<resource_ref id="A"/>
</resource_set>
</rsc_colocation>
</constraints>
-------
======

[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.
Expand All @@ -848,40 +867,34 @@ 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]
-------
<constraints>
<rsc_colocation id="coloc-1" score="INFINITY" >
<resource_set id="colocated-set-1" sequential="true">
<resource_ref id="B"/>
<resource_ref id="A"/>
<resource_ref id="F"/>
<resource_ref id="G"/>
</resource_set>
<resource_set id="colocated-set-2" sequential="false">
<resource_ref id="C"/>
<resource_ref id="D"/>
<resource_ref id="E"/>
</resource_set>
<resource_set id="colocated-set-3" sequential="true" role="Master">
<resource_ref id="G"/>
<resource_ref id="F"/>
<resource_ref id="A"/>
<resource_ref id="B"/>
</resource_set>
</rsc_colocation>
</constraints>
-------
======

.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.
====
2 changes: 1 addition & 1 deletion doc/Pacemaker_Explained/en-US/Pacemaker_Explained.ent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!ENTITY PRODUCT "Pacemaker">
<!ENTITY BOOKID "Pacemaker_Explained">
<!ENTITY YEAR "2009-2018">
<!ENTITY YEAR "2009-2019">
<!ENTITY HOLDER "Andrew Beekhof">
2 changes: 1 addition & 1 deletion doc/Pacemaker_Explained/en-US/Revision_History.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</revision>
<revision>
<revnumber>12-0</revnumber>
<date>Fri Dec 7 2018</date>
<date>Mon Jan 28 2019</date>
<author><firstname>Ken</firstname><surname>Gaillot</surname><email>kgaillot@redhat.com</email></author>
<author><firstname>Reid</firstname><surname>Wahl</surname><email>nwahl@redhat.com</email></author>
<author><firstname>Jan</firstname><surname>Pokorný</surname><email>jpokorny@redhat.com</email></author>
Expand Down
2 changes: 1 addition & 1 deletion doc/Pacemaker_Remote/en-US/Book_Info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
simple textual changes (corrections, translations, etc.).
-->
<edition>7</edition>
<pubsnumber>1</pubsnumber>
<pubsnumber>2</pubsnumber>
<abstract>
<para>
The document exists as both a reference and deployment guide for the Pacemaker Remote service.
Expand Down
Loading

0 comments on commit 57cc9c1

Please sign in to comment.