From 9370a83b0b0731d436ae2569ca793f4124362e4b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 11:17:49 -0600 Subject: [PATCH 01/14] Fix: Build: expand git alias in GNUmakefile --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 2265078f465..1dc80a4d56d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -286,7 +286,7 @@ www: all global doxygen summary: @printf "\n* `date +"%a %b %d %Y"` `git config user.name` <`git config user.email`> $(NEXT_RELEASE)-1" - @printf "\n- Update source tarball to revision: `git id`" + @printf "\n- Update source tarball to revision: `git log --pretty=format:%h -n 1`" @printf "\n- Changesets: `git log --pretty=format:'%h' $(LAST_RELEASE)..HEAD | wc -l`" @printf "\n- Diff: " @git diff -r $(LAST_RELEASE)..HEAD --stat include lib mcp pengine/*.c pengine/*.h cib crmd fencing lrmd tools xml | tail -n 1 From 46b5c0e558c7930afb4538b294a98eec30ef6f30 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 11:29:44 -0600 Subject: [PATCH 02/14] Doc: Pacemaker Explained, Pacemaker Remote: update for 1.1.14 --- doc/Pacemaker_Explained/en-US/Book_Info.xml | 2 +- .../en-US/Ch-Advanced-Resources.txt | 7 ++++++ doc/Pacemaker_Explained/en-US/Ch-Stonith.txt | 23 +++++++++++++++++-- .../en-US/Revision_History.xml | 12 ++++++++++ doc/Pacemaker_Remote/en-US/Book_Info.xml | 2 +- doc/Pacemaker_Remote/en-US/Ch-Intro.txt | 5 ++++ doc/Pacemaker_Remote/en-US/Ch-Options.txt | 12 +++++++--- .../en-US/Revision_History.xml | 7 +++++- 8 files changed, 62 insertions(+), 8 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Book_Info.xml b/doc/Pacemaker_Explained/en-US/Book_Info.xml index 56b9d9bfda1..bce00895244 100644 --- a/doc/Pacemaker_Explained/en-US/Book_Info.xml +++ b/doc/Pacemaker_Explained/en-US/Book_Info.xml @@ -12,7 +12,7 @@ changes (pacemaker), and PUBSNUMBER for simple textual changes (corrections, translations, etc.). --> - 5 + 6 0 diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt index 4060201d925..9d0bb7a43c1 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt @@ -215,6 +215,13 @@ Options inherited from <> resources: indexterm:[clone-node-max,Clone Option] indexterm:[Clone,Option,clone-node-max] +|clone-min +|1 +|Require at least this number of clone instances to be runnable before allowing +resources depending on the clone to be runnable '(since 1.1.14)' + indexterm:[clone-min,Clone Option] + indexterm:[Clone,Option,clone-min] + |notify |true |When stopping or starting a copy of the clone, tell all the other diff --git a/doc/Pacemaker_Explained/en-US/Ch-Stonith.txt b/doc/Pacemaker_Explained/en-US/Ch-Stonith.txt index f9422a9457c..a5bcf0dcfad 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Stonith.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Stonith.txt @@ -550,7 +550,7 @@ Some possible uses of topologies include: * Initiate a kdump and then poweroff the node .Properties of Fencing Levels -[width="95%",cols="1m,6<",options="header",align="center"] +[width="95%",cols="1m,3<",options="header",align="center"] |========================================================= |Field @@ -562,10 +562,22 @@ Some possible uses of topologies include: indexterm:[Fencing,fencing-level,id] |target -|The node to which this level applies +|The name of a single node to which this level applies indexterm:[target,fencing-level] indexterm:[Fencing,fencing-level,target] +|target-pattern +|A regular expression matching the names of nodes to which this level applies +'(since 1.1.14)' + indexterm:[target-pattern,fencing-level] + indexterm:[Fencing,fencing-level,target-pattern] + +|target-attribute +|The name of a node attribute that is set for nodes to which this level applies +'(since 1.1.14)' + indexterm:[target-attribute,fencing-level] + indexterm:[Fencing,fencing-level,target-attribute] + |index |The order in which to attempt the levels. Levels are attempted in ascending order 'until one succeeds'. @@ -871,3 +883,10 @@ be logged but ignored. When a reboot operation is remapped, any action-specific timeout for the remapped action will be used (for example, +pcmk_off_timeout+ will be used when executing the +off+ command, not +pcmk_reboot_timeout+). + +[NOTE] +==== +In Pacemaker versions 1.1.13 and earlier, reboots will not be remapped in the +second case. To achieve the same effect, separate fencing devices for off and +on actions must be configured. +==== diff --git a/doc/Pacemaker_Explained/en-US/Revision_History.xml b/doc/Pacemaker_Explained/en-US/Revision_History.xml index eecd34b59be..33010d5c0eb 100644 --- a/doc/Pacemaker_Explained/en-US/Revision_History.xml +++ b/doc/Pacemaker_Explained/en-US/Revision_History.xml @@ -55,6 +55,18 @@ + + 6-0 + Tue Dec 8 2015 + KenGaillotkgaillot@redhat.com + + + + Update for Pacemaker 1.1.14 + + + + diff --git a/doc/Pacemaker_Remote/en-US/Book_Info.xml b/doc/Pacemaker_Remote/en-US/Book_Info.xml index a26494e7427..12e1ab891d0 100644 --- a/doc/Pacemaker_Remote/en-US/Book_Info.xml +++ b/doc/Pacemaker_Remote/en-US/Book_Info.xml @@ -12,7 +12,7 @@ changes (OS, pacemaker, corosync, pcs), and PUBSNUMBER for simple textual changes (corrections, translations, etc.). --> - 4 + 5 0 diff --git a/doc/Pacemaker_Remote/en-US/Ch-Intro.txt b/doc/Pacemaker_Remote/en-US/Ch-Intro.txt index 438ecd2aa4e..16934907f84 100644 --- a/doc/Pacemaker_Remote/en-US/Ch-Intro.txt +++ b/doc/Pacemaker_Remote/en-US/Ch-Intro.txt @@ -76,6 +76,11 @@ It is recommended to run Pacemaker 1.1.12 or later when using pacemaker_remote due to important bug fixes. An overview of changes in pacemaker_remote capability by version: +.1.1.14 +* Resources that create guest nodes can be included in groups +* reconnect_interval option for remote nodes +* Bug fixes, including a memory leak + .1.1.13 * Support for maintenance mode * Remote nodes can recover without being fenced when the cluster node diff --git a/doc/Pacemaker_Remote/en-US/Ch-Options.txt b/doc/Pacemaker_Remote/en-US/Ch-Options.txt index abe511fd350..f04b8b6e94e 100644 --- a/doc/Pacemaker_Remote/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Remote/en-US/Ch-Options.txt @@ -52,13 +52,19 @@ Descriptions of these instance attributes can be retrieved using the following `pcs` command: ---- # pcs resource describe remote -ocf:pacemaker:remote - - - +ocf:pacemaker:remote - remote resource agent Resource options: server: Server location to connect to. This can be an ip address or hostname. port: tcp port to connect to. + reconnect_interval: Time in seconds to wait before attempting to reconnect to + a remote node after an active connection to the remote + node has been severed. This wait is recurring. If + reconnect fails after the wait period, a new reconnect + attempt will be made after observing the wait time. When + this option is in use, pacemaker will keep attempting to + reach out and connect to the remote node indefinitely + after each wait interval. ---- When defining a remote node's connection resource, it is common and recommended diff --git a/doc/Pacemaker_Remote/en-US/Revision_History.xml b/doc/Pacemaker_Remote/en-US/Revision_History.xml index 269b549a118..1954f14d962 100644 --- a/doc/Pacemaker_Remote/en-US/Revision_History.xml +++ b/doc/Pacemaker_Remote/en-US/Revision_History.xml @@ -31,7 +31,12 @@ KenGaillotkgaillot@redhat.com Targeted CentOS 7.1 and Pacemaker 1.1.12+, updated for current terminology and practice + + 5-0 + Tue Dec 8 2015 + KenGaillotkgaillot@redhat.com + Updated for Pacemaker 1.1.14 + - From 1ca9f82300ea0ce246b0db79ad75564b4ec0b0a8 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 12:23:51 -0600 Subject: [PATCH 03/14] Feature: crmd: make built-in notifications conditional at compile-time The interface is expected to change significantly, so built-in notifications are disabled by default in preparation for the 1.1.14 release. --- crmd/control.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crmd/control.c b/crmd/control.c index d1f9acd14b7..5208dc27b67 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -893,6 +893,8 @@ pe_cluster_option crmd_opts[] = { " To ensure these changes take effect, we can optionally poll the cluster's status for changes." }, +#ifdef RHEL7_COMPAT + /* this interface is expected to change but was released in RHEL 7 */ { "notification-agent", NULL, "string", NULL, "/dev/null", &check_script, "Notification script or tool to be called after significant cluster events", "Full path to a script or binary that will be invoked when resources start/stop/fail, fencing occurs or nodes join/leave the cluster.\n" @@ -902,6 +904,7 @@ pe_cluster_option crmd_opts[] = { "Destination for notifications (Optional)", "Where should the supplied script send notifications to. Useful to avoid hard-coding this in the script." }, +#endif { "load-threshold", NULL, "percentage", NULL, "80%", &check_utilization, "The maximum amount of system resources that should be used by nodes in the cluster", @@ -992,9 +995,11 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void verify_crmd_options(config_hash); +#ifdef RHEL7_COMPAT script = crmd_pref(config_hash, "notification-agent"); value = crmd_pref(config_hash, "notification-recipient"); crmd_enable_notifications(script, value); +#endif value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME); election_trigger->period_ms = crm_get_msec(value); From 7cd6dcf12b2f510baa974a8b9ee612850bc95cc9 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 12:54:13 -0600 Subject: [PATCH 04/14] Build: update version information for 1.1.14 --- lib/cib/Makefile.am | 2 +- lib/fencing/Makefile.am | 2 +- lib/pengine/Makefile.am | 2 +- lib/services/Makefile.am | 2 +- pacemaker.spec.in | 2 +- pengine/Makefile.am | 2 +- version.m4 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 1e50511a4a2..50f56eacc20 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -28,7 +28,7 @@ noinst_HEADERS = libcib_la_SOURCES = cib_ops.c cib_utils.c cib_client.c cib_native.c cib_attrs.c libcib_la_SOURCES += cib_file.c cib_remote.c -libcib_la_LDFLAGS = -version-info 4:2:0 -L$(top_builddir)/lib/pengine/.libs +libcib_la_LDFLAGS = -version-info 5:0:1 -L$(top_builddir)/lib/pengine/.libs libcib_la_LIBADD = $(CRYPTOLIB) $(top_builddir)/lib/pengine/libpe_rules.la $(top_builddir)/lib/common/libcrmcommon.la libcib_la_CFLAGS = -I$(top_srcdir) diff --git a/lib/fencing/Makefile.am b/lib/fencing/Makefile.am index fbe02e4e030..cf6d5fd5a91 100644 --- a/lib/fencing/Makefile.am +++ b/lib/fencing/Makefile.am @@ -25,7 +25,7 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ lib_LTLIBRARIES = libstonithd.la libstonithd_la_SOURCES = st_client.c -libstonithd_la_LDFLAGS = -version-info 3:3:1 +libstonithd_la_LDFLAGS = -version-info 4:0:2 libstonithd_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la AM_CFLAGS = $(AM_CPPFLAGS) diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index 60d1770753e..da08fb99c21 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -30,7 +30,7 @@ libpe_rules_la_LDFLAGS = -version-info 2:5:0 libpe_rules_la_SOURCES = rules.c common.c libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la -libpe_status_la_LDFLAGS = -version-info 9:0:5 +libpe_status_la_LDFLAGS = -version-info 10:0:0 libpe_status_la_SOURCES = status.c unpack.c utils.c complex.c native.c group.c clone.c rules.c common.c libpe_status_la_LIBADD = @CURSESLIBS@ $(top_builddir)/lib/common/libcrmcommon.la diff --git a/lib/services/Makefile.am b/lib/services/Makefile.am index 4deef351238..000298b056d 100644 --- a/lib/services/Makefile.am +++ b/lib/services/Makefile.am @@ -24,7 +24,7 @@ lib_LTLIBRARIES = libcrmservice.la noinst_HEADERS = upstart.h systemd.h services_private.h libcrmservice_la_SOURCES = services.c services_linux.c -libcrmservice_la_LDFLAGS = -version-info 3:0:0 +libcrmservice_la_LDFLAGS = -version-info 4:0:1 libcrmservice_la_CFLAGS = $(GIO_CFLAGS) -DOCF_ROOT_DIR=\"@OCF_ROOT_DIR@\" libcrmservice_la_LIBADD = $(GIO_LIBS) $(top_builddir)/lib/common/libcrmcommon.la $(DBUS_LIBS) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 3639a05776b..78aece0b1e6 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -54,7 +54,7 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager -Version: 1.1.13 +Version: 1.1.14 Release: %{pcmk_release}%{?dist} License: GPLv2+ and LGPLv2+ Url: http://www.clusterlabs.org diff --git a/pengine/Makefile.am b/pengine/Makefile.am index 0e12a1f3cda..faec7057d74 100644 --- a/pengine/Makefile.am +++ b/pengine/Makefile.am @@ -61,7 +61,7 @@ endif noinst_HEADERS = allocate.h utils.h pengine.h #utils.h pengine.h -libpengine_la_LDFLAGS = -version-info 9:0:5 +libpengine_la_LDFLAGS = -version-info 10:0:0 # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version libpengine_la_SOURCES = pengine.c allocate.c utils.c constraints.c libpengine_la_SOURCES += native.c group.c clone.c master.c graph.c utilization.c diff --git a/version.m4 b/version.m4 index 3d5e96b68c3..70596af4456 100644 --- a/version.m4 +++ b/version.m4 @@ -1 +1 @@ -m4_define([VERSION_NUMBER], [1.1.13]) +m4_define([VERSION_NUMBER], [1.1.14]) From 64ccc3a25830d94a1881951901b8d2b338787272 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 12:54:31 -0600 Subject: [PATCH 05/14] Doc: update change log for 1.1.14 --- ChangeLog | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5c90ccd60bb..2643c7a40fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,69 @@ +* Tue Dec 08 2015 Ken Gaillot Pacemaker-1.1.14-rc1-1 +- Update source tarball to revision: 7cd6dcf +- Changesets: 656 +- Diff: 169 files changed, 13014 insertions(+), 7579 deletions(-) + +- Features added since Pacemaker-1.1.13 + + crm_resource: Indicate common reasons why a resource may not start after a cleanup + + crm_resource: New --force-promote and --force-demote options for debugging + + fencing: Support targeting fencing topologies by node name pattern or node attribute + + fencing: Remap sequential topology reboots to all-off-then-all-on + + pengine: Allow guest remote nodes using containers/vms to be nested in a group resource + + pengine: Allow resources to start and stop as soon as their state is known on all nodes + + pengine: Include a list of all and available nodes with clone notifications + + pengine: Addition of the clone resource clone-min metadata option + + pengine: Support of multiple-active=block for resource groups + + remote: reconnect_interval option for remote nodes to delay reconnect after fence + +- Changes since Pacemaker-1.1.13 + + fix multiple memory issues (leaks, use-after-free, double free, use-of-NULL) in components and tools + + cib: Do not terminate due to badly behaving clients + + cman: handle corosync-invented node names of the form Node{id} for peers not in its node list + + controld: replace bashism + + crm_node: Display node state with -l and quorum status with -q, if available + + crmd: resources would sometimes be restarted when only non-unique parameters changed + + crmd: fence remote node after connection failure only once + + crmd: handle resources named the same as cluster nodes + + crmd: Pre-emptively fail in-flight actions when lrmd connections fail + + crmd: Record actions in the CIB as failed if we cannot execute them + + crm_report: Enable password sanitizing by default + + crm_report: Allow log file discovery to be disabled + + crm_resource: Allow the resource configuration to be modified for --force-{check,start,..} calls + + crm_resource: Compensate for -C and -p being called with the child resource for clones + + crm_resource: Correctly clean up all children for anonymous cloned groups + + crm_resource: Correctly clean up failcounts for inactive anonymous clones + + crm_resource: Correctly observe --force when deleting and updating attributes + + crm_shadow: Fix "crm_shadow --diff" + + crm_simulate: Prevent segfault on arches with 64bit time_t + + fencing: ensure "required"/"automatic" only apply to "on" actions + + fencing: Return a provider for the internal fencing agent "#watchdog" instead of logging an error + + fencing: ignore stderr output of fence agents (often used for debug messages) + + libcib: potential user input overflow + + libcluster: overhaul peer cache management + + log: make syslog less noisy + + lrmd: cancel currently pending STONITH op if stonithd connection is lost + + lrmd: Finalize all pending and recurring operations when cleaning up a resource + + pengine: Bug cl#5247 - Imply resources running on a container are stopped when the container is stopped + + pengine: cl#5235 - Prevent graph loops that can be introduced by "load_stopped -> migrate_to" ordering + + pengine: Correctly bypass fencing for resources that do not require it + + pengine: do not timeout remote node recurring monitor op failure until after fencing + + pengine: Ensure recurring monitor operations are cancelled when clone instances are de-allocated + + pengine: fixes segfault in pengine when fencing remote node + + pengine: properly handle blocked clone actions + + pengine: ensure failed actions that occurred in node shutdown are displayed + + remote: Correctly display the usage of the ocf:pacemaker:remote resource agent + + remote: do not fail operations because of a migration + + remote: enable reloads for select remote connection options + + resources: allow for top output with or without percent sign in HealthCPU + + resources: Prevent an error message on stopping "Dummy" resource + + systemd: Prevent segfault when logging failed operations + + systemd: Reconnect to System DBus if the connection is closed + + systemd: set systemd resources' timeout values higher than systemd's own default + + tools: Do not send command lines to syslog + + upstart: Ensure pending structs are correctly unreferenced + + * Wed Jun 24 2015 Andrew Beekhof Pacemaker-1.1.13-1 - Update source tarball to revision: 2a1847e - Changesets: 750 From ce830a70512f3c60cbb71071df01444d5d3ec3b7 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 17:57:53 -0600 Subject: [PATCH 06/14] Fix: crmd: ensure compilation works with built-in notifications disabled Some compiler commands would complain about an unused variable. --- crmd/control.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crmd/control.c b/crmd/control.c index 5208dc27b67..a3dd5ddefb0 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -966,7 +966,9 @@ crmd_pref(GHashTable * options, const char *name) static void config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data) { +#ifdef RHEL7_COMPAT const char *script = NULL; +#endif const char *value = NULL; GHashTable *config_hash = NULL; crm_time_t *now = crm_time_new(NULL); From a9f79457bcc70ee744225e8c39796fc7f50a8080 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Dec 2015 18:00:25 -0600 Subject: [PATCH 07/14] Doc: update change log for 1.1.14-rc2 --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2643c7a40fa..13e0db36d64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +* Tue Dec 08 2015 Ken Gaillot Pacemaker-1.1.14-rc2-1 +- Update source tarball to revision: ce830a7 +- Changesets: 1 +- Diff: 1 file changed, 2 insertions(+) + +- Changes since Pacemaker-1.1.14-rc1 + + crmd: ensure compilation works with built-in notifications disabled * Tue Dec 08 2015 Ken Gaillot Pacemaker-1.1.14-rc1-1 - Update source tarball to revision: 7cd6dcf From 98e69e033835b3d4dfdc8c9cabacae28770725f1 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Wed, 9 Dec 2015 15:01:25 +0100 Subject: [PATCH 08/14] Fix RHBZ#1287315: stonithd: Trigger cib_devices_update in case of deletion of just an attribute --- fencing/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fencing/main.c b/fencing/main.c index e9831f06497..0dc449240c8 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -760,8 +760,13 @@ update_cib_stonith_devices_v2(const char *event, xmlNode * msg) } else if(safe_str_eq(op, "delete") && strstr(xpath, XML_CIB_TAG_RESOURCE)) { const char *rsc_id = NULL; char *search = NULL; - char *mutable = strdup(xpath); + char *mutable = NULL; + if (strstr(xpath, XML_TAG_ATTR_SETS)) { + needs_update = TRUE; + break; + } + mutable = strdup(xpath); rsc_id = strstr(mutable, "primitive[@id=\'"); if (rsc_id != NULL) { rsc_id += strlen("primitive[@id=\'"); From 1eda8f608cd6262c335959d2f52dba23fae67366 Mon Sep 17 00:00:00 2001 From: Hideo Yamauchi Date: Fri, 11 Dec 2015 11:27:31 +0900 Subject: [PATCH 09/14] High : Mistake of the parameter order. crm_make_daemon() cannot make Pid file. --- lib/common/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/utils.c b/lib/common/utils.c index e533c1407b5..7b42b897fa4 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1314,7 +1314,7 @@ crm_pidfile_inuse(const char *filename, long mypid, const char *daemon) } static int -crm_lock_pidfile(const char *name, const char *filename) +crm_lock_pidfile(const char *filename, const char *name) { long mypid = 0; int fd = 0, rc = 0; From ba14d9760d63112c39d9b8890436ba56a1a2fd5b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 15:27:31 -0600 Subject: [PATCH 10/14] doc: Pacemaker Explained: clarify some options Clarifies what "fatal" means in start-failure-is-fatal, and clarifies that start-action and then-action apply to any ordering constraint, not just for multi-state resources. --- .../en-US/Ch-Advanced-Options.txt | 9 ++++- .../en-US/Ch-Advanced-Resources.txt | 29 +++----------- .../en-US/Ch-Constraints.txt | 39 ++++++++++++++----- doc/Pacemaker_Explained/en-US/Ch-Options.txt | 7 ++-- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt index d1cf176d70a..1aaf53b6ae3 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt @@ -244,6 +244,10 @@ it again on the same node. However if a resource fails repeatedly, it is possible that there is an underlying problem on that node, and you might desire trying a different node in such a case. +indexterm:[migration-threshold] +indexterm:[failure-timeout] +indexterm:[start-failure-is-fatal] + Pacemaker allows you to set your preference via the +migration-threshold+ resource option. footnote:[ @@ -272,8 +276,9 @@ minute. There are two exceptions to the migration threshold concept: when a resource either fails to start or fails to stop. -Start failures cause the failcount to be set to +INFINITY+ and thus always -cause the resource to move immediately. +If the cluster property +start-failure-is-fatal+ is set to +true+ (which is the +default), start failures cause the failcount to be set to +INFINITY+ and thus +always cause the resource to move immediately. Stop failures are slightly different and crucial. If a resource fails to stop and STONITH is enabled, then the cluster will fence the node diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt index 9d0bb7a43c1..298c244ca15 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt @@ -589,12 +589,13 @@ location constraints. These constraints are written no differently from those for primitive resources except that the master's +id+ is used. When considering multi-state resources in constraints, for most -purposes it is sufficient to treat them as clones. The exception is -when the +rsc-role+ and/or +with-rsc-role+ fields (for colocation -constraints) and +first-action+ and/or +then-action+ fields (for -ordering constraints) are used. +purposes it is sufficient to treat them as clones. The exception is +that the +first-action+ and/or +then-action+ fields for ordering constraints +may be set to +promote+ or +demote+ to constrain the master role, +and colocation constraints may contain +rsc-role+ and/or +with-rsc-role+ +fields. -.Additional constraint options relevant to multi-state resources +.Additional colocation constraint options for multi-state resources [width="95%",cols="1m,1,3<",options="header",align="center"] |========================================================= @@ -618,24 +619,6 @@ ordering constraints) are used. indexterm:[with-rsc-role,Ordering Constraints] indexterm:[Constraints,Ordering,with-rsc-role] -|first-action -|start -|An additional attribute of ordering constraints that specifies the - action that the +first+ resource must complete before executing the - specified action for the +then+ resource. Allowed values: +start+, - +stop+, +promote+, +demote+. - indexterm:[first-action,Ordering Constraints] - indexterm:[Constraints,Ordering,first-action] - -|then-action -|value of +first-action+ -|An additional attribute of ordering constraints that specifies the - action that the +then+ resource can only execute after the - +first-action+ on the +first+ resource has completed. Allowed - values: +start+, +stop+, +promote+, +demote+. - indexterm:[then-action,Ordering Constraints] - indexterm:[Constraints,Ordering,then-action] - |========================================================= .Constraints involving multi-state resources diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 6826074b4a3..43c28f01b45 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -238,29 +238,44 @@ indexterm:[Constraints,Ordering,id] |first | -|The name of a resource that must be started before the +then+ - resource is allowed to. +|Name of the resource that the +then+ resource depends on indexterm:[first,Ordering Constraints] indexterm:[Constraints,Ordering,first] |then | -|The name of a resource. This resource will start after the +first+ resource. +|Name of the dependent resource indexterm:[then,Ordering Constraints] indexterm:[Constraints,Ordering,then] +|first-action +|start +|The action that the +first+ resource must complete before +then-action+ + can be initiated for the +then+ resource. Allowed values: +start+, + +stop+, +promote+, +demote+. + indexterm:[first-action,Ordering Constraints] + indexterm:[Constraints,Ordering,first-action] + +|then-action +|value of +first-action+ +|The action that the +then+ resource can execute only after the + +first-action+ on the +first+ resource has completed. Allowed + values: +start+, +stop+, +promote+, +demote+. + indexterm:[then-action,Ordering Constraints] + indexterm:[Constraints,Ordering,then-action] + |kind | |How to enforce the constraint. Allowed values: * +Optional:+ Just a suggestion. Only applies if both resources are - starting/stopping. Any change in state by the +first+ resource will have no - effect on the +then+ resource. -* +Mandatory:+ Always. If 'first' is stopping or cannot be started, - 'then' must be stopped. If 'first' is restarted, 'then' (if running) - will be stopped beforehand and started afterward. + executing the specified actions. Any change in state by the +first+ resource + will have no effect on the +then+ resource. +* +Mandatory:+ Always. If +first+ does not perform +first-action+, +then+ will + not be allowed to performed +then-action+. If +first+ is restarted, +then+ + (if running) will be stopped beforehand and started afterward. * +Serialize:+ Ensure that no two stop/start actions occur concurrently - for the resources. 'First' and 'then' can start in either order, + for the resources. +First+ and +then+ can start in either order, but one must complete starting before the other can be started. A typical use case is when resource start-up puts a high load on the host. @@ -269,12 +284,16 @@ indexterm:[Constraints,Ordering,kind] |symmetrical |TRUE -|If true, stop the resources in the reverse order. +|If true, the reverse of the constraint applies for the opposite action (for + example, if B starts after A starts, then B stops before A stops). indexterm:[symmetrical,Ordering Constraints] indexterm:[Ordering Constraints,symmetrical] |========================================================= ++Promote+ and +demote+ apply to the master role of +<> resources. + === Optional and mandatory ordering === Here is an example of ordering constraints where +Database+ 'must' start before diff --git a/doc/Pacemaker_Explained/en-US/Ch-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Options.txt index f8bca12d0af..d7afb61e479 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Options.txt @@ -185,9 +185,10 @@ Should deleted actions be cancelled? | start-failure-is-fatal | TRUE | indexterm:[start-failure-is-fatal,Cluster Option] indexterm:[Cluster,Option,start-failure-is-fatal] -Should a failure to start be treated as fatal for a resource? -If FALSE, the cluster will instead use the resource's -+failcount+ and value for +migration-threshold+ (see <>). +Should a failure to start a resource on a particular node prevent further start +attempts on that node? If FALSE, the cluster will decide whether to try +starting on the same node again based on the resource's current failure count +and +migration-threshold+ (see <>). | enable-startup-probes | TRUE | indexterm:[enable-startup-probes,Cluster Option] From 0b865c7592aff69c5ad232121307a77e75b0999b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 15:30:35 -0600 Subject: [PATCH 11/14] Build: GNUmakefile: get correct line count when doing "make summary" When --pretty=format:%h is piped through wc -l, the line count is one short, so use --pretty=oneline instead. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 1dc80a4d56d..5d617ab0774 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -287,7 +287,7 @@ www: all global doxygen summary: @printf "\n* `date +"%a %b %d %Y"` `git config user.name` <`git config user.email`> $(NEXT_RELEASE)-1" @printf "\n- Update source tarball to revision: `git log --pretty=format:%h -n 1`" - @printf "\n- Changesets: `git log --pretty=format:'%h' $(LAST_RELEASE)..HEAD | wc -l`" + @printf "\n- Changesets: `git log --pretty=oneline $(LAST_RELEASE)..HEAD | wc -l`" @printf "\n- Diff: " @git diff -r $(LAST_RELEASE)..HEAD --stat include lib mcp pengine/*.c pengine/*.h cib crmd fencing lrmd tools xml | tail -n 1 From 97ada3106b956411c776d1a46aee00771b4686a2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 15:35:46 -0600 Subject: [PATCH 12/14] Build: travis: update documentation URL --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b00c49d0c8..9b7333d3f23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ # Control file for the Travis autobuilder -# http://docs.travis-ci.com/user/build-configuration/ +# https://docs.travis-ci.com/user/customizing-the-build/ language: c compiler: @@ -65,6 +65,7 @@ notifications: email: recipients: - andrew@beekhof.net + # whitelist branches: only: From d67de9ce86b3340ce232030f12b0ffa7ba0c037b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 15:44:27 -0600 Subject: [PATCH 13/14] Doc: update change log for 1.1.14-rc3 --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 13e0db36d64..478b6d943b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +* Mon Dec 14 2015 Ken Gaillot Pacemaker-1.1.14-rc3-1 +- Update source tarball to revision: 97ada31 +- Changesets: 7 +- Diff: 2 files changed, 7 insertions(+), 2 deletions(-) + +- Changes since Pacemaker-1.1.14-rc2 + + stonithd: fix issue where deleting a fence device attribute can delete the device + * Tue Dec 08 2015 Ken Gaillot Pacemaker-1.1.14-rc2-1 - Update source tarball to revision: ce830a7 - Changesets: 1 From ea4f3a711486b38f51b7a52d3b39f6d7b621b8da Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 16:04:39 -0600 Subject: [PATCH 14/14] Low: crmd: re-enable built-in notifications --- crmd/control.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crmd/control.c b/crmd/control.c index a3dd5ddefb0..240d00b0762 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -41,6 +41,13 @@ #include #include +/* Enable support for built-in notifications + * + * The interface is expected to change significantly, and this will be defined + * in the upstream master branch only until a new design is finalized. + */ +#define RHEL7_COMPAT + qb_ipcs_service_t *ipcs = NULL; extern gboolean crm_connect_corosync(crm_cluster_t * cluster);