diff --git a/.gitignore b/.gitignore index af4ebe6929c..8b46f4bcdcc 100644 --- a/.gitignore +++ b/.gitignore @@ -108,6 +108,7 @@ doc/Clusters_from_Scratch.txt doc/Pacemaker_Explained.txt doc/acls.html doc/crm_fencing.html +doc/publican-catalog* fencing/stonith-test fencing/stonith_admin fencing/stonithd @@ -163,7 +164,6 @@ compat_reports .ABI-build abi_dumps logs -xsl *.patch *.diff diff --git a/ChangeLog b/ChangeLog index 8df588a977d..a75ea4de8f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1645,7 +1645,7 @@ + crmd: If there are no nodes to finalize, start an election. + crmd: If there are no nodes to welcome, start an election. + crmd: Prevent node attribute loss by detecting attrd disconnections immediately - + crmd: Prevent node re-probe loops by ensuring manditory actions always complete + + crmd: Prevent node re-probe loops by ensuring mandatory actions always complete + pengine: Bug 2005 - Fix startup ordering of cloned stonith groups + pengine: Bug 2006 - Correctly reprobe cloned groups + pengine: Bug BNC:465484 - Fix the no-quorum-policy=suicide option @@ -2092,7 +2092,7 @@ + cib: Correctly detect configuration changes - num_updates does not count + pengine: Apply stickiness values to the whole group, not the individual resources + pengine: Bug N:385265 - Ensure groups are migrated instead of remaining partially active on the current node - + pengine: Bug N:396293 - Enforce manditory group restarts due to ordering constraints + + pengine: Bug N:396293 - Enforce mandatory group restarts due to ordering constraints + pengine: Correctly recover master instances found active on more than one node + pengine: Fix memory leaks reported by Valgrind + Medium: Admin: crm_mon - Misc improvements from Satomi Taniguchi diff --git a/GNUmakefile b/GNUmakefile index 5d617ab0774..126620b6e98 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -24,7 +24,7 @@ PACKAGE ?= pacemaker # Force 'make dist' to be consistent with 'make export' distdir = $(PACKAGE)-$(TAG) -TARFILE = $(distdir).tar.gz +TARFILE = $(PACKAGE)-$(SHORTTAG).tar.gz DIST_ARCHIVES = $(TARFILE) RPM_ROOT = $(shell pwd) @@ -44,6 +44,9 @@ ARCH ?= $(shell test -e /etc/fedora-release && rpm --eval %{_arch}) MOCK_CFG ?= $(shell test -e /etc/fedora-release && echo fedora-$(F)-$(ARCH)) DISTRO ?= $(shell test -e /etc/SuSE-release && echo suse; echo fedora) TAG ?= $(shell git log --pretty="format:%H" -n 1) +lparen = ( +rparen = ) +SHORTTAG ?= $(shell case $(TAG) in Pacemaker-*$(rparen) echo $(TAG);; *$(rparen) git log --pretty="format:%h" -n 1;; esac) WITH ?= --without doc #WITH ?= --without=doc --with=gcov @@ -151,10 +154,11 @@ srpm-%: export $(PACKAGE)-%.spec sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' $(PACKAGE).spec case "$(WITH)" in \ *pre_release*) \ - sed -i 's/global\ pcmk_release.*/global\ pcmk_release\ 0.%{specversion}.%{shortcommit}.git/' $(PACKAGE).spec; \ - sed -i 's/Version:.*/Version:\ $(shell echo $(NEXT_RELEASE) | sed -e s:Pacemaker-:: -e s:-.*::)/' $(PACKAGE).spec;; \ + sed -i 's/^\(%global pcmk_release \).*/\10.%{specversion}.%{shortcommit}.git/' $(PACKAGE).spec; \ + sed -i 's/^\(%global pcmkversion \).*/\1$(shell echo $(NEXT_RELEASE) | sed -e s:Pacemaker-:: -e s:-.*::)/' $(PACKAGE).spec;; \ *) \ - sed -i 's/Version:.*/Version:\ $(shell git describe --tags $(TAG) | sed -e s:Pacemaker-:: -e s:-.*::)/' $(PACKAGE).spec;;\ + [ "$(TAG)" = "$(SHORTTAG)" ] || sed -i 's/^\(%global pcmk_release \).*/\1%{specversion}.%{shortcommit}.git/' $(PACKAGE).spec; \ + sed -i 's/^\(%global pcmkversion \).*/\1$(shell git describe --tags $(TAG) | sed -e s:Pacemaker-:: -e s:-.*::)/' $(PACKAGE).spec;;\ esac rpmbuild -bs --define "dist .$*" $(RPM_OPTS) $(PACKAGE).spec diff --git a/Makefile.am b/Makefile.am index 49fe5dfde10..0edf0c9c6ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,8 +54,10 @@ core-clean: install-exec-local: $(INSTALL) -d $(DESTDIR)/$(LCRSODIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CONFIG_DIR) + $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CORE_DIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_BLACKBOX_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR) + -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CORE_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR) if BUILD_CS_PLUGIN rm -f $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso $(DESTDIR)$(LCRSODIR)/service_crm.so diff --git a/README.markdown b/README.markdown index c0fbd7d6abf..f92b5e6fa7e 100644 --- a/README.markdown +++ b/README.markdown @@ -37,12 +37,10 @@ This is not meant to be an exhaustive list: * libtool-ltdl-devel * libuuid-devel * pkgconfig -* python +* python (or python-devel if that's preferred as a build dependency) * glib2-devel * libxml2-devel * libxslt-devel -* python-devel -* gcc-c++ * bzip2-devel * gnutls-devel * pam-devel @@ -72,6 +70,10 @@ This is not meant to be an exhaustive list: ## Optional testing dependencies * valgrind (if running CTS valgrind tests) * systemd-python (if using CTS on cluster nodes running systemd) +* rsync (if running CTS container tests) +* libvirt-daemon-driver-lxc (if running CTS container tests) +* libvirt-daemon-lxc (if running CTS container tests) +* libvirt-login-shell (if running CTS container tests) ## Source Control (GIT) diff --git a/attrd/commands.c b/attrd/commands.c index 378a4f80881..5d07748ad07 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -171,6 +171,8 @@ create_attribute(xmlNode *xml) if(dampen > 0) { a->timeout_ms = dampen; a->timer = mainloop_timer_add(a->id, a->timeout_ms, FALSE, attribute_timer_cb, a); + } else if (dampen < 0) { + crm_warn("Ignoring invalid delay %s for attribute %s", value, a->id); } g_hash_table_replace(attributes, a->id, a); @@ -525,7 +527,7 @@ attrd_peer_message(crm_node_t *peer, xmlNode *xml) } } - if (safe_str_eq(op, ATTRD_OP_UPDATE)) { + if (safe_str_eq(op, ATTRD_OP_UPDATE) || safe_str_eq(op, ATTRD_OP_UPDATE_BOTH) || safe_str_eq(op, ATTRD_OP_UPDATE_DELAY)) { attrd_peer_update(peer, xml, host, FALSE); } else if (safe_str_eq(op, ATTRD_OP_SYNC)) { @@ -541,8 +543,9 @@ attrd_peer_message(crm_node_t *peer, xmlNode *xml) } else { host = NULL; } - attrd_peer_remove(host_id, host, TRUE, peer->uname); + crm_notice("Processing %s from %s: %s %u", op, peer->uname, host, host_id); + attrd_peer_remove(host_id, host, TRUE, peer->uname); } else if (safe_str_eq(op, ATTRD_OP_SYNC_RESPONSE) && safe_str_neq(peer->uname, attrd_cluster->uname)) { @@ -589,15 +592,27 @@ attrd_peer_remove(uint32_t nodeid, const char *host, gboolean uncache, const cha attribute_t *a = NULL; GHashTableIter aIter; - crm_notice("Removing all %s attributes for %s", host, source); + crm_notice("Removing all %s (%u) attributes for %s", host, nodeid, source); if(host == NULL) { return; } g_hash_table_iter_init(&aIter, attributes); while (g_hash_table_iter_next(&aIter, NULL, (gpointer *) & a)) { - if(g_hash_table_remove(a->values, host)) { - crm_debug("Removed %s[%s] for %s", a->id, host, source); + attribute_value_t *v = g_hash_table_lookup(a->values, host); + + if(v && v->current) { + free(v->current); + v->current = NULL; + a->changed = TRUE; + + crm_debug("Removed %s[%s]=%s for %s", a->id, host, v->current, source); + if(a->timer) { + crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id); + mainloop_timer_start(a->timer); + } else { + write_or_elect_attribute(a); + } } } @@ -621,6 +636,22 @@ static attribute_value_t * attrd_lookup_or_create_value(GHashTable *values, const char *host, xmlNode *xml) { attribute_value_t *v = g_hash_table_lookup(values, host); + int is_remote = 0; + + crm_element_value_int(xml, F_ATTRD_IS_REMOTE, &is_remote); + if (is_remote) { + /* If we previously assumed this node was an unseen cluster node, + * remove its entry from the cluster peer cache. + */ + crm_node_t *dup = crm_find_peer(0, host); + + if (dup && (dup->uuid == NULL)) { + reap_crm_member(0, host); + } + + /* Ensure this host is in the remote peer cache */ + crm_remote_peer_cache_add(host); + } if (v == NULL) { v = calloc(1, sizeof(attribute_value_t)); @@ -629,11 +660,7 @@ attrd_lookup_or_create_value(GHashTable *values, const char *host, xmlNode *xml) v->nodename = strdup(host); CRM_ASSERT(v->nodename != NULL); - crm_element_value_int(xml, F_ATTRD_IS_REMOTE, &v->is_remote); - if (v->is_remote == TRUE) { - crm_remote_peer_cache_add(host); - } - + v->is_remote = is_remote; g_hash_table_replace(values, v->nodename, v); } return(v); @@ -644,14 +671,58 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, const char *host, bool filter) { bool changed = FALSE; attribute_value_t *v = NULL; + int dampen = 0; + const char *op = crm_element_value(xml, F_ATTRD_TASK); const char *attr = crm_element_value(xml, F_ATTRD_ATTRIBUTE); const char *value = crm_element_value(xml, F_ATTRD_VALUE); + const char *dvalue = crm_element_value(xml, F_ATTRD_DAMPEN); attribute_t *a = g_hash_table_lookup(attributes, attr); if(a == NULL) { - a = create_attribute(xml); + if (safe_str_eq(op, ATTRD_OP_UPDATE) || safe_str_eq(op, ATTRD_OP_UPDATE_BOTH)) { + a = create_attribute(xml); + } else { + crm_warn("Update error (attribute %s not found)", attr); + return; + } + } + + if (safe_str_eq(op, ATTRD_OP_UPDATE_BOTH) || safe_str_eq(op, ATTRD_OP_UPDATE_DELAY)) { + if (dvalue) { + dampen = crm_get_msec(dvalue); + if (dampen >= 0) { + if (a->timeout_ms != dampen) { + mainloop_timer_stop(a->timer); + mainloop_timer_del(a->timer); + a->timeout_ms = dampen; + if (dampen > 0) { + a->timer = mainloop_timer_add(a->id, a->timeout_ms, FALSE, attribute_timer_cb, a); + crm_info("Update attribute %s with delay %dms (%s)", a->id, dampen, dvalue); + } else { + a->timer = NULL; + crm_info("Update attribute %s with not delay", a->id); + } + //if dampen is changed, attrd writes in a current value immediately. + write_or_elect_attribute(a); + if (safe_str_eq(op, ATTRD_OP_UPDATE_DELAY)) { + return; + } + } else { + if (safe_str_eq(op, ATTRD_OP_UPDATE_DELAY)) { + crm_trace("Unchanged attribute %s with delay %dms (%s).(ATTRD_OP_UPDATE_DELAY)", a->id, dampen, dvalue); + return; + } + } + } else { + crm_warn("Update error (A positive number is necessary for delay parameter. attribute %s : %dms (%s))", a->id, dampen, dvalue); + return; + } + } else { + crm_warn("Update error (delay parameter is necessary for the update of the attribute %s)", a->id); + return; + } } if(host == NULL) { @@ -694,7 +765,6 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, const char *host, bool filter) v->current = NULL; } changed = TRUE; - } else { crm_trace("Unchanged %s[%s] from %s is %s", attr, host, peer->uname, value); } diff --git a/attrd/internal.h b/attrd/internal.h index 1cdbc91f7a7..0207da85a04 100644 --- a/attrd/internal.h +++ b/attrd/internal.h @@ -2,7 +2,7 @@ * Copyright (C) 2013 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/attrd/main.c b/attrd/main.c index 069e9faee4d..ba327f36041 100644 --- a/attrd/main.c +++ b/attrd/main.c @@ -226,6 +226,11 @@ attrd_ipc_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) op = crm_element_value(xml, F_ATTRD_TASK); + if (client->name == NULL) { + const char *value = crm_element_value(xml, F_ORIG); + client->name = crm_strdup_printf("%s.%d", value?value:"unknown", client->pid); + } + if (safe_str_eq(op, ATTRD_OP_PEER_REMOVE)) { attrd_send_ack(client, id, flags); attrd_client_peer_remove(client->name, xml); @@ -234,6 +239,14 @@ attrd_ipc_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) attrd_send_ack(client, id, flags); attrd_client_update(xml); + } else if (safe_str_eq(op, ATTRD_OP_UPDATE_BOTH)) { + attrd_send_ack(client, id, flags); + attrd_client_update(xml); + + } else if (safe_str_eq(op, ATTRD_OP_UPDATE_DELAY)) { + attrd_send_ack(client, id, flags); + attrd_client_update(xml); + } else if (safe_str_eq(op, ATTRD_OP_REFRESH)) { attrd_send_ack(client, id, flags); attrd_client_refresh(); @@ -369,8 +382,10 @@ main(int argc, char **argv) election_fini(writer); crm_client_disconnect_all(ipcs); - qb_ipcs_destroy(ipcs); - g_hash_table_destroy(attributes); + if (ipcs) { + qb_ipcs_destroy(ipcs); + g_hash_table_destroy(attributes); + } if (the_cib) { the_cib->cmds->signoff(the_cib); diff --git a/cib/callbacks.c b/cib/callbacks.c index 69bace90bbe..3f8a92d985a 100644 --- a/cib/callbacks.c +++ b/cib/callbacks.c @@ -1018,7 +1018,7 @@ cib_process_request(xmlNode * request, gboolean force_synchronous, gboolean priv "Forwarding %s operation for section %s to %s (origin=%s/%s/%s)", op, section ? section : "'all'", - host ? host : "master", + host ? host : cib_legacy_mode() ? "master" : "all", originator ? originator : "local", client_name, call_id); @@ -1088,7 +1088,7 @@ cib_process_request(xmlNode * request, gboolean force_synchronous, gboolean priv finished = time(NULL); if (finished - now > 3) { - crm_trace("%s operation took %ds to complete", op, finished - now); + crm_trace("%s operation took %lds to complete", op, (long)(finished - now)); crm_write_blackbox(0, NULL); } @@ -1286,8 +1286,12 @@ cib_process_command(xmlNode * request, xmlNode ** reply, xmlNode ** cib_diff, gb } if (rc == pcmk_ok && is_not_set(call_options, cib_dryrun)) { + crm_trace("Activating %d %s %s", is_set(call_options, cib_zero_copy), + crm_element_value(current_cib, XML_ATTR_NUMUPDATES), + crm_element_value(result_cib, XML_ATTR_NUMUPDATES)); if(is_not_set(call_options, cib_zero_copy)) { rc = activateCibXml(result_cib, config_changed, op); + crm_trace("Activated %d %s", rc, crm_element_value(current_cib, XML_ATTR_NUMUPDATES)); } if (rc == pcmk_ok && cib_internal_config_changed(*cib_diff)) { @@ -1326,15 +1330,16 @@ cib_process_command(xmlNode * request, xmlNode ** reply, xmlNode ** cib_diff, gb output = result_cib; } else { + crm_trace("Not activating %d %d %s", rc, is_set(call_options, cib_dryrun), crm_element_value(result_cib, XML_ATTR_NUMUPDATES)); if(is_not_set(call_options, cib_zero_copy)) { free_xml(result_cib); } } - if ((call_options & cib_inhibit_notify) == 0) { + if ((call_options & (cib_inhibit_notify|cib_dryrun)) == 0) { const char *client = crm_element_value(request, F_CIB_CLIENTNAME); - crm_trace("Sending notifications"); + crm_trace("Sending notifications %d", is_set(call_options, cib_dryrun)); cib_diff_notify(call_options, client, call_id, op, input, rc, *cib_diff); } diff --git a/cib/callbacks.h b/cib/callbacks.h index a49428e1013..b4d48d600af 100644 --- a/cib/callbacks.h +++ b/cib/callbacks.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/cib/cibio.h b/cib/cibio.h index 3eec263ee2f..89b721bf267 100644 --- a/cib/cibio.h +++ b/cib/cibio.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/cib/cibmessages.h b/cib/cibmessages.h index 5f52b449d21..720c56ce90f 100644 --- a/cib/cibmessages.h +++ b/cib/cibmessages.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/cib/common.h b/cib/common.h index 6e08f09f12d..a2e25ece52c 100644 --- a/cib/common.h +++ b/cib/common.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/cib/io.c b/cib/io.c index 068275f1658..ff6610a6c99 100644 --- a/cib/io.c +++ b/cib/io.c @@ -183,7 +183,9 @@ static int cib_archive_sort(const struct dirent ** a, const struct dirent **b) rc = -1; } - crm_trace("%s (%u) vs. %s (%u) : %d", a[0]->d_name, a_age, b[0]->d_name, b_age, rc); + crm_trace("%s (%lu) vs. %s (%lu) : %d", + a[0]->d_name, (unsigned long)a_age, + b[0]->d_name, (unsigned long)b_age, rc); return rc; } diff --git a/cib/main.c b/cib/main.c index cbaf7b515b4..cc3a463d180 100644 --- a/cib/main.c +++ b/cib/main.c @@ -485,14 +485,16 @@ cib_init(void) } if (stand_alone == FALSE) { + if (is_openais_cluster()) { + crm_set_status_callback(&cib_peer_update_callback); + } + if (crm_cluster_connect(&crm_cluster) == FALSE) { crm_crit("Cannot sign in to the cluster... terminating"); crm_exit(DAEMON_RESPAWN_STOP); } cib_our_uname = crm_cluster.uname; - if (is_openais_cluster()) { - crm_set_status_callback(&cib_peer_update_callback); - } + #if SUPPORT_HEARTBEAT if (is_heartbeat_cluster()) { diff --git a/cib/notify.h b/cib/notify.h index a14b4a0cac8..93540185c68 100644 --- a/cib/notify.h +++ b/cib/notify.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/cib/remote.c b/cib/remote.c index c739f82c928..09712f38598 100644 --- a/cib/remote.c +++ b/cib/remote.c @@ -436,7 +436,7 @@ cib_handle_remote_msg(crm_client_t * client, xmlNode * command) value = crm_element_value(command, F_CIB_CALLBACK_TOKEN); if (value != NULL) { client->userdata = strdup(value); - crm_trace("Callback channel for %s is %s", client->id, client->userdata); + crm_trace("Callback channel for %s is %s", client->id, (char*)client->userdata); } else { client->userdata = strdup(client->id); diff --git a/configure.ac b/configure.ac index c200a68e0ee..93ace42ed24 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,12 @@ dnl checks for library functions dnl checks for system services m4_include([version.m4]) -AC_INIT([pacemaker], VERSION_NUMBER, pacemaker@oss.clusterlabs.org,pacemaker,http://clusterlabs.org) +AC_INIT([pacemaker], VERSION_NUMBER, [pacemaker@oss.clusterlabs.org], + [pacemaker], PCMK_URL) +dnl Workaround autoconf < 2.64 +if test x"${PACKAGE_URL}" = x""; then + AC_SUBST([PACKAGE_URL], PCMK_URL) +fi PCMK_FEATURES="" HB_PKG=heartbeat @@ -307,8 +312,8 @@ AC_ARG_WITH(coverage, PUBLICAN_BRAND="common" AC_ARG_WITH(brand, - [ --with-brand=brand Brand to use for generated documentation [$PUBLICAN_BRAND]], - [ PUBLICAN_BRAND="$withval" ]) + [ --with-brand=brand Brand to use for generated documentation (set empty for no docs) [$PUBLICAN_BRAND]], + [ test x"$withval" = x"no" || PUBLICAN_BRAND="$withval" ]) AC_SUBST(PUBLICAN_BRAND) ASCIIDOC_CLI_TYPE="pcs" @@ -601,11 +606,31 @@ fi AM_CONDITIONAL(BUILD_STONITH_CONFIG, test $SUPPORT_STONITH_CONFIG = 1) AC_DEFINE_UNQUOTED(SUPPORT_STONITH_CONFIG, $SUPPORT_STONITH_CONFIG, Support a stand-alone stonith config file in addition to the CIB) -AM_CONDITIONAL(BUILD_DOCBOOK, test x"${PUBLICAN}" != x"" -a x"${INKSCAPE}" != x"") -if test x"${PUBLICAN}" != x"" -a x"${INKSCAPE}" != x""; then - AC_MSG_NOTICE(Enabling publican) +publican_intree_brand=no +if test x"${PUBLICAN_BRAND}" != x"" \ + && test x"${PUBLICAN}" != x"" \ + && test x"${INKSCAPE}" != x""; then + dnl special handling for clusterlabs brand (possibly in-tree version used) + test "${PUBLICAN_BRAND}" != "clusterlabs" \ + || test -d /usr/share/publican/Common_Content/clusterlabs + if test $? -ne 0; then + dnl Unknown option: brand_dir vs. Option brand_dir requires an argument + if ${PUBLICAN} build --brand_dir 2>&1 | grep -Eq 'brand_dir$'; then + AC_MSG_WARN([Cannot use in-tree clusterlabs brand, resorting to common]) + PUBLICAN_BRAND=common + else + publican_intree_brand=yes + fi + fi + AC_MSG_NOTICE([Enabling Publican-generated documentation using ${PUBLICAN_BRAND} brand]) PCMK_FEATURES="$PCMK_FEATURES publican-docs" fi +AM_CONDITIONAL([BUILD_DOCBOOK], + [test x"${PUBLICAN_BRAND}" != x"" \ + && test x"${PUBLICAN}" != x"" \ + && test x"${INKSCAPE}" != x""]) +AM_CONDITIONAL([PUBLICAN_INTREE_BRAND], + [test x"${publican_intree_brand}" = x"yes"]) dnl ======================================================================== dnl checks for library functions to replace them @@ -941,12 +966,18 @@ fi dnl Check for printw() prototype compatibility if test X"$CURSESLIBS" != X"" && cc_supports_flag -Wcast-qual && cc_supports_flag -Werror; then - AC_MSG_CHECKING(whether printw() requires argument of "const char *") ac_save_LIBS=$LIBS - LIBS="$CURSESLIBS $LIBS" + LIBS="$CURSESLIBS" ac_save_CFLAGS=$CFLAGS CFLAGS="-Wcast-qual -Werror" + # avoid broken test because of hardened build environment in Fedora 23+ + # - https://fedoraproject.org/wiki/Changes/Harden_All_Packages + # - https://bugzilla.redhat.com/1297985 + if cc_supports_flag -fPIC; then + CFLAGS="$CFLAGS -fPIC" + fi + AC_MSG_CHECKING(whether printw() requires argument of "const char *") AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ @@ -1028,22 +1059,16 @@ if test x${enable_no_stack} = xyes; then SUPPORT_CS=no fi -SAVE_CPPFLAGS="$CPPFLAGS" -SAVE_LIBS="$LIBS" -PKG_CHECK_MODULES(libqb, libqb >= 0.13, HAVE_libqb=1, HAVE_libqb=0) -CPPFLAGS="$CPPFLAGS $libqb_CFLAGS" -LIBS="$LIBS $libqb_LIBS" +PKG_CHECK_MODULES(libqb, libqb >= 0.13, HAVE_libqb=1) +CPPFLAGS="$libqb_CFLAGS $CPPFLAGS" +LIBS="$libqb_LIBS $LIBS" AC_CHECK_HEADERS(qb/qbipc_common.h) AC_CHECK_LIB(qb, qb_ipcs_connection_auth_set) -CPPFLAGS="$SAVE_CPPFLAGS" -LIBS="$SAVE_LIBS" -LIBQB_LOG=1 PCMK_FEATURES="$PCMK_FEATURES libqb-logging libqb-ipc" AC_CHECK_FUNCS(qb_ipcs_connection_get_buffer_size, AC_DEFINE(HAVE_IPCS_GET_BUFFER_SIZE, 1, [Have qb_ipcc_get_buffer_size function])) -LIBS="$LIBS $libqb_LIBS" AC_CHECK_HEADERS(heartbeat/hb_config.h) AC_CHECK_HEADERS(heartbeat/glue_config.h) @@ -1069,7 +1094,7 @@ fi if test $HAVE_GLUE = 1; then dnl On Debian, AC_CHECK_LIBS fail if a library has any unresolved symbols - dnl So check for all the depenancies (so they're added to LIBS) before checking for -lplumb + dnl So check for all the dependencies (so they're added to LIBS) before checking for -lplumb AC_CHECK_LIB(pils, PILLoadPlugin) AC_CHECK_LIB(plumb, G_main_add_IPC_Channel) fi @@ -1712,6 +1737,36 @@ if test "$GCC" != yes; then else CFLAGS="$CFLAGS -ggdb" +dnl when we don't have diagnostic push / pull we can't explicitely disable +dnl checking for nonliteral formats in the places where they occur on purpose +dnl thus we disable nonliteral format checking globally as we are aborting +dnl on warnings. +dnl what makes the things really ugly is that nonliteral format checking is +dnl obviously available as an extra switch in very modern gcc but for older +dnl gcc this is part of -Wformat=2 +dnl so if we have push/pull we can enable -Wformat=2 -Wformat-nonliteral +dnl if we don't have push/pull but -Wformat-nonliteral we can enable -Wformat=2 +dnl otherwise none of both + + gcc_diagnostic_push_pull=no + SAVED_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([for gcc diagnostic push / pull]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#pragma GCC diagnostic push +#pragma GCC diagnostic pop + ]])], [ + AC_MSG_RESULT([yes]) + gcc_diagnostic_push_pull=yes + ], AC_MSG_RESULT([no])) + CFLAGS="$SAVED_CFLAGS" + + if cc_supports_flag "-Wformat-nonliteral"; then + gcc_format_nonliteral=yes + else + gcc_format_nonliteral=no + fi + # We had to eliminate -Wnested-externs because of libtool changes EXTRA_FLAGS="-fgnu89-inline -Wall @@ -1721,9 +1776,7 @@ else -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal - -Wformat=2 -Wformat-security - -Wformat-nonliteral -Wmissing-prototypes -Wmissing-declarations -Wnested-externs @@ -1735,6 +1788,19 @@ else -Wunused-but-set-variable -Wunsigned-char" + if test "x$gcc_diagnostic_push_pull" = "xyes"; then + AC_DEFINE([GCC_FORMAT_NONLITERAL_CHECKING_ENABLED], [], + [gcc can complain about nonliterals in format]) + EXTRA_FLAGS="$EXTRA_FLAGS + -Wformat=2 + -Wformat-nonliteral" + else + if test "x$gcc_format_nonliteral" = "xyes"; then + EXTRA_FLAGS="$EXTRA_FLAGS + -Wformat=2" + fi + fi + # Additional warnings it might be nice to enable one day # -Wshadow # -Wunreachable-code diff --git a/crmd/callbacks.c b/crmd/callbacks.c index b21232b6165..62064a1d84a 100644 --- a/crmd/callbacks.c +++ b/crmd/callbacks.c @@ -107,13 +107,14 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d uint32_t old = 0; uint32_t changed = 0; bool appeared = FALSE; + bool is_remote = is_set(node->flags, crm_remote_node); const char *status = NULL; /* Crmd waits to receive some information from the membership layer before * declaring itself operational. If this is being called for a cluster node, * indicate that we have it. */ - if (!is_set(node->flags, crm_remote_node)) { + if (!is_remote) { set_bit(fsa_input_register, R_PEER_DATA); } @@ -126,21 +127,21 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d /* If we've never seen the node, then it also wont be in the status section */ crm_info("%s is now %s", node->uname, state_text(node->state)); return; + case crm_status_rstate: - crm_info("Remote node %s is now %s (was %s)", - node->uname, state_text(node->state), state_text(data)); - /* Keep going */ case crm_status_nstate: - crm_info("%s is now %s (was %s)", - node->uname, state_text(node->state), state_text(data)); + /* This callback should not be called unless the state actually + * changed, but here's a failsafe just in case. + */ + CRM_CHECK(safe_str_neq(data, node->state), return); - if (safe_str_eq(data, node->state)) { - /* State did not change */ - return; + crm_info("%s node %s is now %s (was %s)", + (is_remote? "Remote" : "Cluster"), + node->uname, state_text(node->state), state_text(data)); - } else if(safe_str_eq(CRM_NODE_MEMBER, node->state)) { + if (safe_str_eq(CRM_NODE_MEMBER, node->state)) { appeared = TRUE; - if (!is_set(node->flags, crm_remote_node)) { + if (!is_remote) { remove_stonith_cleanup(node->uname); } } @@ -197,10 +198,11 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d if (AM_I_DC) { xmlNode *update = NULL; int flags = node_update_peer; - gboolean alive = crm_is_peer_active(node); - crm_action_t *down = match_down_event(0, node->uuid, NULL, appeared); + gboolean alive = is_remote? appeared : crm_is_peer_active(node); + crm_action_t *down = match_down_event(node->uuid, appeared); - crm_trace("Alive=%d, appear=%d, down=%p", alive, appeared, down); + crm_trace("Alive=%d, appeared=%d, down=%d", + alive, appeared, (down? down->id : -1)); if (alive && type == crm_status_processes) { register_fsa_input_before(C_FSA_INTERNAL, I_NODE_JOIN, NULL); @@ -215,35 +217,55 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d crm_trace("Updating CIB %s stonithd reported fencing of %s complete", (down->confirmed? "after" : "before"), node->uname); - } else if (alive == FALSE) { + } else if ((alive == FALSE) && safe_str_eq(task, CRM_OP_SHUTDOWN)) { crm_notice("%s of %s (op %d) is complete", task, node->uname, down->id); - /* down->confirmed = TRUE; Only stonith-ng returning should imply completion */ + /* down->confirmed = TRUE; */ stop_te_timer(down->timer); - flags |= node_update_join | node_update_expected; - crmd_peer_down(node, FALSE); - check_join_state(fsa_state, __FUNCTION__); + if (!is_remote) { + flags |= node_update_join | node_update_expected; + crmd_peer_down(node, FALSE); + check_join_state(fsa_state, __FUNCTION__); + } update_graph(transition_graph, down); trigger_graph(); } else { - crm_trace("Other %p", down); + crm_trace("Node %s is %salive, was expected to %s (op %d)", + node->uname, (alive? "" : "not "), task, down->id); } } else if (appeared == FALSE) { crm_notice("Stonith/shutdown of %s not matched", node->uname); - crm_update_peer_join(__FUNCTION__, node, crm_join_none); - check_join_state(fsa_state, __FUNCTION__); + if (!is_remote) { + crm_update_peer_join(__FUNCTION__, node, crm_join_none); + check_join_state(fsa_state, __FUNCTION__); + } abort_transition(INFINITY, tg_restart, "Node failure", NULL); fail_incompletable_actions(transition_graph, node->uuid); } else { - crm_trace("Other %p", down); + crm_trace("Node %s came up, was not expected to be down", + node->uname); + } + + if (is_remote) { + /* A pacemaker_remote node won't have its cluster status updated + * in the CIB by membership-layer callbacks, so do it here. + */ + flags |= node_update_cluster; + + /* Trigger resource placement on newly integrated nodes */ + if (appeared) { + abort_transition(INFINITY, tg_restart, + "pacemaker_remote node integrated", NULL); + } } + /* Update the CIB node state */ update = do_update_node_cib(node, flags, NULL, __FUNCTION__); fsa_cib_anon_update(XML_CIB_TAG_STATUS, update, cib_scope_local | cib_quorum_override | cib_can_create); diff --git a/crmd/cib.c b/crmd/cib.c index 2590ab6f33c..189b3591985 100644 --- a/crmd/cib.c +++ b/crmd/cib.c @@ -58,6 +58,7 @@ do_cib_updated(const char *event, xmlNode * msg) int format= 1; xmlNode *patchset = get_message_xml(msg, F_CIB_UPDATE_RESULT); xmlNode *change = NULL; + xmlXPathObject *xpathObj = NULL; CRM_CHECK(msg != NULL, return); crm_element_value_int(msg, F_CIB_RC, &rc); @@ -68,20 +69,39 @@ do_cib_updated(const char *event, xmlNode * msg) crm_element_value_int(patchset, "format", &format); if (format == 1) { - if (get_xpath_object - ("//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED "//" XML_CIB_TAG_CRMCONFIG, msg, - LOG_TRACE) != NULL) { + if ((xpathObj = xpath_search( + msg, + "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED "//" XML_CIB_TAG_CRMCONFIG " | " \ + "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED "//" XML_CIB_TAG_NOTIFICATIONS + )) != NULL) { + freeXpathObject(xpathObj); mainloop_set_trigger(config_read); } - } else if (format == 2) { for (change = __xml_first_child(patchset); change != NULL; change = __xml_next(change)) { const char *xpath = crm_element_value(change, XML_DIFF_PATH); - if (xpath != NULL - && strstr(xpath, "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_CRMCONFIG "/")) { - mainloop_set_trigger(config_read); - break; + + if (xpath == NULL) { + continue; } + + /* modifying properties */ + if (!strstr(xpath, "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_CRMCONFIG "/") && + !strstr(xpath, "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_NOTIFICATIONS)) { + xmlNode *section = NULL; + const char *name = NULL; + + /* adding notifications section */ + if ((strcmp(xpath, "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION) != 0) || + ((section = __xml_first_child(change)) == NULL) || + ((name = crm_element_name(section)) == NULL) || + (strcmp(name, XML_CIB_TAG_NOTIFICATIONS) != 0)) { + continue; + } + } + + mainloop_set_trigger(config_read); + break; } } else { diff --git a/crmd/control.c b/crmd/control.c index 56a5f4114e4..ac8bb1162a2 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); @@ -931,7 +938,7 @@ pe_cluster_option crmd_opts[] = { "Delay cluster recovery for the configured interval to allow for additional/related events to occur.\n" "Useful if your configuration is sensitive to the order in which ping updates arrive." }, - { "stonith-watchdog-timeout", NULL, "time", NULL, NULL, &check_timer, + { "stonith-watchdog-timeout", NULL, "time", NULL, NULL, &check_sbd_timeout, "How long to wait before we can assume nodes are safely down", NULL }, { "no-quorum-policy", "no_quorum_policy", "enum", "stop, freeze, ignore, suicide", "stop", &check_quorum, NULL, NULL }, @@ -972,8 +979,6 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void const char *value = NULL; GHashTable *config_hash = NULL; crm_time_t *now = crm_time_new(NULL); - long st_timeout = 0; - long sbd_timeout = 0; if (rc != pcmk_ok) { fsa_data_t *msg_data = NULL; @@ -1014,41 +1019,8 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void throttle_load_target = strtof(value, NULL) / 100; } - value = getenv("SBD_WATCHDOG_TIMEOUT"); - sbd_timeout = crm_get_msec(value); - - value = crmd_pref(config_hash, "stonith-watchdog-timeout"); - st_timeout = crm_get_msec(value); - - if(st_timeout > 0 && !daemon_option_enabled(crm_system_name, "watchdog")) { - do_crm_log_always(LOG_EMERG, "Shutting down pacemaker, no watchdog device configured"); - crmd_exit(DAEMON_RESPAWN_STOP); - - } else if(!daemon_option_enabled(crm_system_name, "watchdog")) { - crm_trace("Watchdog disabled"); - - } else if(value == NULL && sbd_timeout > 0) { - char *timeout = NULL; - - st_timeout = 2 * sbd_timeout / 1000; - timeout = crm_strdup_printf("%lds", st_timeout); - crm_notice("Setting stonith-watchdog-timeout=%s", timeout); - - update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, - "stonith-watchdog-timeout", timeout, FALSE, NULL, NULL); - free(timeout); - - } else if(st_timeout <= 0) { - crm_notice("Watchdog enabled but stonith-watchdog-timeout is disabled"); - - } else if(st_timeout < sbd_timeout) { - do_crm_log_always(LOG_EMERG, "Shutting down pacemaker, stonith-watchdog-timeout (%ldms) is too short (must be greater than %ldms)", - st_timeout, sbd_timeout); - crmd_exit(DAEMON_RESPAWN_STOP); - } - value = crmd_pref(config_hash, "no-quorum-policy"); - if (safe_str_eq(value, "suicide") && daemon_option_enabled(crm_system_name, "watchdog")) { + if (safe_str_eq(value, "suicide") && pcmk_locate_sbd()) { no_quorum_suicide_escalation = TRUE; } @@ -1089,6 +1061,35 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void fsa_cluster_name = strdup(value); } +#if 0 + { + int sub_call_id; + + sub_call_id = fsa_cib_conn->cmds->query(fsa_cib_conn, + "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION + "/" XML_CIB_TAG_NOTIFICATIONS "/" XML_CIB_TAG_NOTIFY, NULL, + cib_scope_local | cib_xpath); + + fsa_register_cib_callback(sub_call_id, FALSE, NULL, + notifications_query_callback); + + crm_trace("Querying the CIB for notifications ... call %d", sub_call_id); + } +#endif + + { + xmlNode *cib_object = NULL; + int rc; + + rc = fsa_cib_conn->cmds->query(fsa_cib_conn, + "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION + "/" XML_CIB_TAG_NOTIFICATIONS "/" XML_CIB_TAG_NOTIFY, &cib_object, + cib_scope_local | cib_xpath | cib_sync_call); + + notifications_query_callback(msg, call_id, rc, cib_object, user_data); + free_xml(cib_object); + } + set_bit(fsa_input_register, R_READ_CONFIG); crm_trace("Triggering FSA: %s", __FUNCTION__); mainloop_set_trigger(fsa_source); diff --git a/crmd/crmd.h b/crmd/crmd.h index 031f4143363..db40fc32ba7 100644 --- a/crmd/crmd.h +++ b/crmd/crmd.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -24,7 +24,6 @@ # define DAEMON_DEBUG DEVEL_DIR"/"SYS_NAME".debug" extern GMainLoop *crmd_mainloop; -extern GHashTable *ipc_clients; extern bool no_quorum_suicide_escalation; extern void crmd_metadata(void); diff --git a/crmd/crmd_callbacks.h b/crmd/crmd_callbacks.h index 2fc944cd6c5..20d53ad08c5 100644 --- a/crmd/crmd_callbacks.h +++ b/crmd/crmd_callbacks.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/crmd_fsa.h b/crmd/crmd_fsa.h index f0fea17db48..df04a945bc2 100644 --- a/crmd/crmd_fsa.h +++ b/crmd/crmd_fsa.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/crmd_lrm.h b/crmd/crmd_lrm.h index 826ab1cf32b..412ce5be8a1 100644 --- a/crmd/crmd_lrm.h +++ b/crmd/crmd_lrm.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -123,6 +123,7 @@ lrm_state_t *lrm_state_find_or_create(const char *node_name); * Regular resources go to the lrmd, and remote connection resources are * handled locally in the crmd. */ +void lrm_state_disconnect_only(lrm_state_t * lrm_state); void lrm_state_disconnect(lrm_state_t * lrm_state); int lrm_state_ipc_connect(lrm_state_t * lrm_state); int lrm_state_remote_connect_async(lrm_state_t * lrm_state, const char *server, int port, @@ -158,7 +159,6 @@ int remote_ra_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *acti int start_delay, /* ms */ lrmd_key_value_t * params); void remote_ra_cleanup(lrm_state_t * lrm_state); - -xmlNode *simple_remote_node_status(const char *node_name, xmlNode *parent, const char *source); +void remote_ra_fail(const char *node_name); gboolean process_lrm_event(lrm_state_t * lrm_state, lrmd_event_data_t * op, struct recurring_op_s *pending); diff --git a/crmd/crmd_messages.h b/crmd/crmd_messages.h index 732cc7acbbc..44ce1d60362 100644 --- a/crmd/crmd_messages.h +++ b/crmd/crmd_messages.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -111,4 +111,6 @@ extern enum crmd_fsa_input handle_message(xmlNode * stored_msg, enum crmd_fsa_ca extern ha_msg_input_t *copy_ha_msg_input(ha_msg_input_t * orig); +void send_remote_state_message(const char *node_name, gboolean node_up); + #endif diff --git a/crmd/crmd_utils.h b/crmd/crmd_utils.h index 9ef7a71e5b0..040a3a3930d 100644 --- a/crmd/crmd_utils.h +++ b/crmd/crmd_utils.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/election.c b/crmd/election.c index cfa68ab84d1..a0b2c450db1 100644 --- a/crmd/election.c +++ b/crmd/election.c @@ -173,7 +173,7 @@ do_dc_takeover(long long action, int rc = pcmk_ok; xmlNode *cib = NULL; const char *cluster_type = name_for_cluster_type(get_cluster_type()); - const char *watchdog = NULL; + pid_t watchdog = pcmk_locate_sbd(); crm_info("Taking over DC status for this partition"); set_bit(fsa_input_register, R_THE_DC); @@ -196,11 +196,8 @@ do_dc_takeover(long long action, fsa_cib_update(XML_TAG_CIB, cib, cib_quorum_override, rc, NULL); fsa_register_cib_callback(rc, FALSE, NULL, feature_update_callback); - watchdog = daemon_option("watchdog"); - if (watchdog) { - update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, - XML_ATTR_HAVE_WATCHDOG, watchdog, FALSE, NULL, NULL); - } + update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, + XML_ATTR_HAVE_WATCHDOG, watchdog?"true":"false", FALSE, NULL, NULL); update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "dc-version", PACEMAKER_VERSION "-" BUILD_VERSION, FALSE, NULL, NULL); diff --git a/crmd/fsa_defines.h b/crmd/fsa_defines.h index 6efb52660d9..0257f2d2bdf 100644 --- a/crmd/fsa_defines.h +++ b/crmd/fsa_defines.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/fsa_matrix.h b/crmd/fsa_matrix.h index 04e697e9d54..e0b6beb7379 100644 --- a/crmd/fsa_matrix.h +++ b/crmd/fsa_matrix.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/fsa_proto.h b/crmd/fsa_proto.h index 1323c645adb..9d554152b0d 100644 --- a/crmd/fsa_proto.h +++ b/crmd/fsa_proto.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/lrm.c b/crmd/lrm.c index a73b2a92e07..71f689c53c4 100644 --- a/crmd/lrm.c +++ b/crmd/lrm.c @@ -601,7 +601,7 @@ build_parameter_list(lrmd_event_data_t *op, xmlNode *metadata, xmlNode *result, if(result && accept) { value = g_hash_table_lookup(op->params, name); if(value != NULL) { - crm_trace("Adding attr to the xml result", name, target?"":"not ", criteria); + crm_trace("Adding attr %s=%s to the xml result", name, value); crm_xml_add(result, name, value); } } @@ -837,20 +837,15 @@ do_lrm_query_internal(lrm_state_t *lrm_state, int update_flags) xmlNode *xml_state = NULL; xmlNode *xml_data = NULL; xmlNode *rsc_list = NULL; - const char *uuid = NULL; + crm_node_t *peer = NULL; - if (lrm_state_is_local(lrm_state)) { - crm_node_t *peer = crm_get_peer(0, lrm_state->node_name); - xml_state = do_update_node_cib(peer, update_flags, NULL, __FUNCTION__); - uuid = fsa_our_uuid; + peer = crm_get_peer_full(0, lrm_state->node_name, CRM_GET_PEER_ANY); + CRM_CHECK(peer != NULL, return NULL); - } else { - xml_state = simple_remote_node_status(lrm_state->node_name, NULL, __FUNCTION__); - uuid = lrm_state->node_name; - } + xml_state = do_update_node_cib(peer, update_flags, NULL, __FUNCTION__); xml_data = create_xml_node(xml_state, XML_CIB_TAG_LRM); - crm_xml_add(xml_data, XML_ATTR_ID, uuid); + crm_xml_add(xml_data, XML_ATTR_ID, peer->uuid); rsc_list = create_xml_node(xml_data, XML_LRM_TAG_RESOURCES); /* Build a list of active (not always running) resources */ @@ -1933,7 +1928,7 @@ stop_recurring_action_by_rsc(gpointer key, gpointer value, gpointer user_data) struct recurring_op_s *op = (struct recurring_op_s *)value; if (op->interval != 0 && crm_str_eq(op->rsc_id, event->rsc->id, TRUE)) { - crm_debug("Cancelling op %d for %s (%s)", op->call_id, op->rsc_id, key); + crm_debug("Cancelling op %d for %s (%s)", op->call_id, op->rsc_id, (char*)key); remove = !cancel_op(event->lrm_state, event->rsc->id, key, op->call_id, FALSE); } @@ -2128,59 +2123,6 @@ cib_rsc_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *use } } -/* - * \internal - * \brief Initialize status section for a newly started pacemaker_remote node - * - * Clear the XML_NODE_IS_FENCED flag in the CIB status section for a remote node - * or guest node (intended to be called when the node starts). If the node ever - * needs to be fenced, this flag will allow various actions to determine whether - * the fencing has happened yet. - * - * \param[in] node_name Name of new remote node - * \param[in] call_opt Call options to pass to CIB update method - */ -static void -remote_node_init_status(const char *node_name, int call_opt) -{ - int call_id = 0; - xmlNode *update = create_xml_node(NULL, XML_CIB_TAG_STATUS); - xmlNode *state; - - state = simple_remote_node_status(node_name, update,__FUNCTION__); - crm_xml_add(state, XML_NODE_IS_FENCED, "0"); - - /* TODO: Consider forcing a synchronous or asynchronous call here. - * In practice, it's currently always async, the benefit of which is - * quicker startup. The argument for sync is to close the tiny window - * in which the remote connection could drop immediately after connecting, - * and fencing might not happen because it appears to already have been. - */ - fsa_cib_update(XML_CIB_TAG_STATUS, update, call_opt, call_id, NULL); - if (call_id < 0) { - /* TODO: Return an error code on failure, and handle it somehow. - * If this fails, later actions could mistakenly think the node has - * already been fenced, thus preventing actual fencing, or allowing - * recurring monitor failures to be cleared too soon. - */ - crm_perror(LOG_WARNING, - "Initializing status for pacemaker_remote node %s in CIB", - node_name); - } - free_xml(update); -} - -static void -remote_node_clear_status(const char *node_name, int call_opt) -{ - if (node_name == NULL) { - return; - } - remote_node_init_status(node_name, call_opt); - erase_status_tag(node_name, XML_CIB_TAG_LRM, call_opt); - erase_status_tag(node_name, XML_TAG_TRANSIENT_NODEATTRS, call_opt); -} - static int do_update_resource(const char *node_name, lrmd_rsc_info_t * rsc, lrmd_event_data_t * op) { @@ -2246,24 +2188,6 @@ do_update_resource(const char *node_name, lrmd_rsc_info_t * rsc, lrmd_event_data crm_xml_add(iter, XML_RSC_ATTR_CONTAINER, container); } - CRM_CHECK(rsc->type != NULL, crm_err("Resource %s has no value for type", op->rsc_id)); - CRM_CHECK(rsc->class != NULL, crm_err("Resource %s has no value for class", op->rsc_id)); - - /* check to see if we need to initialize remote-node related status sections */ - if (safe_str_eq(op->op_type, "start") && op->rc == 0 && op->op_status == PCMK_LRM_OP_DONE) { - const char *remote_node = g_hash_table_lookup(op->params, CRM_META"_remote_node"); - - if (remote_node) { - /* A container for a remote-node has started, initialize remote-node's status */ - crm_info("Initalizing lrm status for container remote-node %s. Container successfully started.", remote_node); - remote_node_clear_status(remote_node, call_opt); - } else if (container == FALSE && safe_str_eq(rsc->type, "remote") && safe_str_eq(rsc->provider, "pacemaker")) { - /* baremetal remote node connection resource has started, initialize remote-node's status */ - crm_info("Initializing lrm status for baremetal remote-node %s", rsc->id); - remote_node_clear_status(rsc->id, call_opt); - } - } - } else { crm_warn("Resource %s no longer exists in the lrmd", op->rsc_id); send_direct_ack(NULL, NULL, rsc, op, op->rsc_id); @@ -2272,7 +2196,7 @@ do_update_resource(const char *node_name, lrmd_rsc_info_t * rsc, lrmd_event_data crm_log_xml_trace(update, __FUNCTION__); - /* make it an asyncronous call and be done with it + /* make it an asynchronous call and be done with it * * Best case: * the resource state will be discovered during diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 0e52ff6b1cc..048e7beb493 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -19,12 +19,14 @@ #include #include #include +#include #include #include #include #include #include +#include GHashTable *lrm_state_table = NULL; extern GHashTable *proxy_table; @@ -73,7 +75,7 @@ fail_pending_op(gpointer key, gpointer value, gpointer user_data) crm_trace("Pre-emptively failing %s_%s_%d on %s (call=%s, %s)", op->rsc_id, op->op_type, op->interval, - lrm_state->node_name, key, op->user_data); + lrm_state->node_name, (char*)key, op->user_data); event.type = lrmd_event_exec_complete; event.rsc_id = op->rsc_id; @@ -238,7 +240,8 @@ lrm_state_init_local(void) proxy_table = g_hash_table_new_full(crm_strcase_hash, crm_strcase_equal, NULL, remote_proxy_free); if (!proxy_table) { - g_hash_table_destroy(lrm_state_table); + g_hash_table_destroy(lrm_state_table); + lrm_state_table = NULL; return FALSE; } @@ -286,8 +289,47 @@ lrm_state_get_list(void) return g_hash_table_get_values(lrm_state_table); } +static remote_proxy_t * +find_connected_proxy_by_node(const char * node_name) +{ + GHashTableIter gIter; + remote_proxy_t *proxy = NULL; + + CRM_CHECK(proxy_table != NULL, return NULL); + + g_hash_table_iter_init(&gIter, proxy_table); + + while (g_hash_table_iter_next(&gIter, NULL, (gpointer *) &proxy)) { + if (proxy->source + && safe_str_eq(node_name, proxy->node_name)) { + return proxy; + } + } + + return NULL; +} + +static void +remote_proxy_disconnect_by_node(const char * node_name) +{ + remote_proxy_t *proxy = NULL; + + CRM_CHECK(proxy_table != NULL, return); + + while ((proxy = find_connected_proxy_by_node(node_name)) != NULL) { + /* mainloop_del_ipc_client() eventually calls remote_proxy_disconnected() + * , which removes the entry from proxy_table. + * Do not do this in a g_hash_table_iter_next() loop. */ + if (proxy->source) { + mainloop_del_ipc_client(proxy->source); + } + } + + return; +} + void -lrm_state_disconnect(lrm_state_t * lrm_state) +lrm_state_disconnect_only(lrm_state_t * lrm_state) { int removed = 0; @@ -295,12 +337,25 @@ lrm_state_disconnect(lrm_state_t * lrm_state) return; } crm_trace("Disconnecting %s", lrm_state->node_name); + + remote_proxy_disconnect_by_node(lrm_state->node_name); + ((lrmd_t *) lrm_state->conn)->cmds->disconnect(lrm_state->conn); if (is_not_set(fsa_input_register, R_SHUTDOWN)) { removed = g_hash_table_foreach_remove(lrm_state->pending_ops, fail_pending_op, lrm_state); crm_trace("Synthesized %d operation failures for %s", removed, lrm_state->node_name); } +} + +void +lrm_state_disconnect(lrm_state_t * lrm_state) +{ + if (!lrm_state->conn) { + return; + } + + lrm_state_disconnect_only(lrm_state); lrmd_api_delete(lrm_state->conn); lrm_state->conn = NULL; @@ -463,6 +518,35 @@ crmd_proxy_dispatch(const char *session, xmlNode *msg) trigger_fsa(fsa_source); } +static void +remote_config_check(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data) +{ + if (rc != pcmk_ok) { + crm_err("Query resulted in an error: %s", pcmk_strerror(rc)); + + if (rc == -EACCES || rc == -pcmk_err_schema_validation) { + crm_err("The cluster is mis-configured - shutting down and staying down"); + } + + } else { + lrmd_t * lrmd = (lrmd_t *)user_data; + crm_time_t *now = crm_time_new(NULL); + GHashTable *config_hash = g_hash_table_new_full( + crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); + + crm_debug("Call %d : Parsing CIB options", call_id); + + unpack_instance_attributes( + output, output, XML_CIB_TAG_PROPSET, NULL, config_hash, CIB_OPTIONS_FIRST, FALSE, now); + + /* Now send it to the remote peer */ + remote_proxy_check(lrmd, config_hash); + + g_hash_table_destroy(config_hash); + crm_time_free(now); + } +} + static void remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) { @@ -479,9 +563,23 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) CRM_CHECK(session != NULL, return); crm_element_value_int(msg, F_LRMD_IPC_MSG_ID, &msg_id); - /* This is msg from remote ipc client going to real ipc server */ - if (safe_str_eq(op, "new")) { + + if (safe_str_eq(op, LRMD_IPC_OP_SHUTDOWN_REQ)) { + char *now_s = NULL; + time_t now = time(NULL); + + crm_notice("Graceful proxy shutdown of %s", lrm_state->node_name); + + now_s = crm_itoa(now); + update_attrd(lrm_state->node_name, XML_CIB_ATTR_SHUTDOWN, now_s, NULL, TRUE); + free(now_s); + + remote_proxy_ack_shutdown(lrmd); + return; + + } else if (safe_str_eq(op, LRMD_IPC_OP_NEW)) { + int rc; const char *channel = crm_element_value(msg, F_LRMD_IPC_IPC_SERVER); CRM_CHECK(channel != NULL, return); @@ -490,10 +588,15 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) remote_proxy_notify_destroy(lrmd, session); } crm_trace("new remote proxy client established to %s, session id %s", channel, session); - } else if (safe_str_eq(op, "destroy")) { + + /* Look up stonith-watchdog-timeout and send to the remote peer for validation */ + rc = fsa_cib_conn->cmds->query(fsa_cib_conn, XML_CIB_TAG_CRMCONFIG, NULL, cib_scope_local); + fsa_cib_conn->cmds->register_callback_full(fsa_cib_conn, rc, 10, FALSE, lrmd, "remote_config_check", remote_config_check, NULL); + + } else if (safe_str_eq(op, LRMD_IPC_OP_DESTROY)) { remote_proxy_end_session(session); - } else if (safe_str_eq(op, "request")) { + } else if (safe_str_eq(op, LRMD_IPC_OP_REQUEST)) { int flags = 0; xmlNode *request = get_message_xml(msg, F_LRMD_IPC_MSG); const char *name = crm_element_value(msg, F_LRMD_IPC_CLIENT); diff --git a/crmd/membership.c b/crmd/membership.c index 27ae710cae0..ca63cc465a4 100644 --- a/crmd/membership.c +++ b/crmd/membership.c @@ -134,16 +134,17 @@ do_update_node_cib(crm_node_t * node, int flags, xmlNode * parent, const char *s const char *value = NULL; xmlNode *node_state; - if (is_set(node->flags, crm_remote_node)) { - return simple_remote_node_status(node->uname, parent, source); - } - if (!node->state) { crm_info("Node update for %s cancelled: no state, not seen yet", node->uname); return NULL; } node_state = create_xml_node(parent, XML_CIB_TAG_STATE); + + if (is_set(node->flags, crm_remote_node)) { + crm_xml_add(node_state, XML_NODE_IS_REMOTE, XML_BOOLEAN_TRUE); + } + set_uuid(node_state, XML_ATTR_UUID, node); if (crm_element_value(node_state, XML_ATTR_UUID) == NULL) { @@ -154,36 +155,32 @@ do_update_node_cib(crm_node_t * node, int flags, xmlNode * parent, const char *s crm_xml_add(node_state, XML_ATTR_UNAME, node->uname); - if (flags & node_update_cluster) { - if (safe_str_eq(node->state, CRM_NODE_MEMBER)) { - value = XML_BOOLEAN_YES; - } else if (node->state) { - value = XML_BOOLEAN_NO; - } else { - value = NULL; - } - crm_xml_add(node_state, XML_NODE_IN_CLUSTER, value); + if ((flags & node_update_cluster) && node->state) { + crm_xml_add_boolean(node_state, XML_NODE_IN_CLUSTER, + safe_str_eq(node->state, CRM_NODE_MEMBER)); } - if (flags & node_update_peer) { - value = OFFLINESTATUS; - if (node->processes & proc_flags) { - value = ONLINESTATUS; + if (!is_set(node->flags, crm_remote_node)) { + if (flags & node_update_peer) { + value = OFFLINESTATUS; + if (node->processes & proc_flags) { + value = ONLINESTATUS; + } + crm_xml_add(node_state, XML_NODE_IS_PEER, value); } - crm_xml_add(node_state, XML_NODE_IS_PEER, value); - } - if (flags & node_update_join) { - if(node->join <= crm_join_none) { - value = CRMD_JOINSTATE_DOWN; - } else { - value = CRMD_JOINSTATE_MEMBER; + if (flags & node_update_join) { + if (node->join <= crm_join_none) { + value = CRMD_JOINSTATE_DOWN; + } else { + value = CRMD_JOINSTATE_MEMBER; + } + crm_xml_add(node_state, XML_NODE_JOIN_STATE, value); } - crm_xml_add(node_state, XML_NODE_JOIN_STATE, value); - } - if (flags & node_update_expected) { - crm_xml_add(node_state, XML_NODE_EXPECTED, node->expected); + if (flags & node_update_expected) { + crm_xml_add(node_state, XML_NODE_EXPECTED, node->expected); + } } crm_xml_add(node_state, XML_ATTR_ORIGIN, source); diff --git a/crmd/messages.c b/crmd/messages.c index 5114519da78..060396ff9d7 100644 --- a/crmd/messages.c +++ b/crmd/messages.c @@ -654,6 +654,31 @@ handle_failcount_op(xmlNode * stored_msg) return I_NULL; } +/*! + * \brief Handle a CRM_OP_REMOTE_STATE message by updating remote peer cache + * + * \param[in] msg Message XML + * + * \return Next FSA input + */ +static enum crmd_fsa_input +handle_remote_state(xmlNode *msg) +{ + const char *remote_uname = ID(msg); + const char *remote_is_up = crm_element_value(msg, XML_NODE_IN_CLUSTER); + crm_node_t *remote_peer; + + CRM_CHECK(remote_uname && remote_is_up, return I_NULL); + + remote_peer = crm_remote_peer_get(remote_uname); + CRM_CHECK(remote_peer, return I_NULL); + + crm_update_peer_state(__FUNCTION__, remote_peer, + crm_is_true(remote_is_up)? + CRM_NODE_MEMBER : CRM_NODE_LOST, 0); + return I_NULL; +} + enum crmd_fsa_input handle_request(xmlNode * stored_msg, enum crmd_fsa_cause cause) { @@ -710,6 +735,10 @@ handle_request(xmlNode * stored_msg, enum crmd_fsa_cause cause) /* a slave wants to shut down */ /* create cib fragment and add to message */ return handle_shutdown_request(stored_msg); + + } else if (strcmp(op, CRM_OP_REMOTE_STATE) == 0) { + /* a remote connection host is letting us know the node state */ + return handle_remote_state(stored_msg); } } @@ -980,3 +1009,35 @@ delete_ha_msg_input(ha_msg_input_t * orig) free_xml(orig->msg); free(orig); } + +/*! + * \internal + * \brief Notify the DC of a remote node state change + * + * \param[in] node_name Node's name + * \param[in] node_up TRUE if node is up, FALSE if down + */ +void +send_remote_state_message(const char *node_name, gboolean node_up) +{ + /* If we don't have a DC, or the message fails, we have a failsafe: + * the DC will eventually pick up the change via the CIB node state. + * The message allows it to happen sooner if possible. + */ + if (fsa_our_dc) { + xmlNode *msg = create_request(CRM_OP_REMOTE_STATE, NULL, fsa_our_dc, + CRM_SYSTEM_DC, CRM_SYSTEM_CRMD, NULL); + + crm_info("Notifying DC %s of pacemaker_remote node %s %s", + fsa_our_dc, node_name, (node_up? "coming up" : "going down")); + crm_xml_add(msg, XML_ATTR_ID, node_name); + crm_xml_add_boolean(msg, XML_NODE_IN_CLUSTER, node_up); + send_cluster_message(crm_get_peer(0, fsa_our_dc), crm_msg_crmd, msg, + TRUE); + free_xml(msg); + } else { + crm_debug("No DC to notify of pacemaker_remote node %s %s", + node_name, (node_up? "coming up" : "going down")); + } +} + diff --git a/crmd/notify.c b/crmd/notify.c index d5e211a09f3..56cce3ba7a1 100644 --- a/crmd/notify.c +++ b/crmd/notify.c @@ -19,121 +19,709 @@ #include #include #include +#include #include "notify.h" +#include "crmd_messages.h" char *notify_script = NULL; char *notify_target = NULL; +GListPtr notify_list = NULL; + +typedef struct { + char *name; + char *value; +} envvar_t; + +typedef struct { + char *id; + char *path; + int timeout; + char *tstamp_format; + char *recipient; + GListPtr envvars; +} notify_entry_t; + +enum notify_keys_e{ + CRM_notify_recipient = 0, + CRM_notify_node, + CRM_notify_nodeid, + CRM_notify_rsc, + CRM_notify_task, + CRM_notify_interval, + CRM_notify_desc, + CRM_notify_status, + CRM_notify_target_rc, + CRM_notify_rc, + CRM_notify_kind, + CRM_notify_version, + CRM_notify_node_sequence, + CRM_notify_timestamp +}; + +/* + * to allow script compatibility we can have more than one + * set of environment variables + */ +static const char *notify_keys[][3] = +{ + [CRM_notify_recipient] = {"CRM_notify_recipient", "CRM_alert_recipient", NULL}, + [CRM_notify_node] = {"CRM_notify_node", "CRM_alert_node", NULL}, + [CRM_notify_nodeid] = {"CRM_notify_nodeid", "CRM_alert_nodeid", NULL}, + [CRM_notify_rsc] = {"CRM_notify_rsc", "CRM_alert_rsc", NULL}, + [CRM_notify_task] = {"CRM_notify_task", "CRM_alert_task", NULL}, + [CRM_notify_interval] = {"CRM_notify_interval", "CRM_alert_interval", NULL}, + [CRM_notify_desc] = {"CRM_notify_desc", "CRM_alert_desc", NULL}, + [CRM_notify_status] = {"CRM_notify_status", "CRM_alert_status", NULL}, + [CRM_notify_target_rc] = {"CRM_notify_target_rc", "CRM_alert_target_rc", NULL}, + [CRM_notify_rc] = {"CRM_notify_rc", "CRM_alert_rc", NULL}, + [CRM_notify_kind] = {"CRM_notify_kind", "CRM_alert_kind", NULL}, + [CRM_notify_version] = {"CRM_notify_version", "CRM_alert_version", NULL}, + [CRM_notify_node_sequence] = {"CRM_notify_node_sequence", "CRM_alert_node_sequence", NULL}, + [CRM_notify_timestamp] = {"CRM_notify_timestamp", "CRM_alert_timestamp", NULL} +}; + +/* + * higher accuracy time stuff to be generalized and moved to + * e.g. lib/common/utils.c|iso8601.c + */ + +#include +#include +#include +#include + +typedef struct crm_time_us crm_time_hr_t; +crm_time_hr_t *crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt); +void crm_time_set_hr_dt(crm_time_t *target, crm_time_hr_t *hr_dt); +crm_time_hr_t *crm_time_timeval_hr_convert(crm_time_hr_t *target, + struct timeval *tv); +crm_time_hr_t *crm_time_hr_new(const char *date_time); +void crm_time_hr_free(crm_time_hr_t * hr_dt); +char *crm_time_format_hr(const char *format, crm_time_hr_t * hr_dt); + +crm_time_t *parse_date(const char *date_str); /* in iso8601.c global but + not in header */ + +struct crm_time_us { + int years; + int months; /* Only for durations */ + int days; + int seconds; + int offset; /* Seconds */ + bool duration; + int useconds; +}; -static const char *notify_keys[] = -{ - "CRM_notify_recipient", - "CRM_notify_node", - "CRM_notify_nodeid", - "CRM_notify_rsc", - "CRM_notify_task", - "CRM_notify_interval", - "CRM_notify_desc", - "CRM_notify_status", - "CRM_notify_target_rc", - "CRM_notify_rc", - "CRM_notify_kind", - "CRM_notify_version", +struct crm_time_s { + int years; + int months; /* Only for durations */ + int days; + int seconds; + int offset; /* Seconds */ + bool duration; }; + +static void +ha_get_tm_time( struct tm *target, crm_time_t *source) +{ + *target = (struct tm) { + .tm_year = source->years - 1900, + .tm_yday = source->days - 1, + .tm_sec = source->seconds % 60, + .tm_min = ( source->seconds / 60 ) % 60, + .tm_hour = source->seconds / 60 / 60, + +#if defined(HAVE_STRUCT_TM_TM_GMTOFF) + .tm_gmtoff = source->offset +#endif + }; +} + +crm_time_hr_t * +crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt) +{ + crm_time_hr_t *hr_dt = NULL; + + if (dt) { + hr_dt = target?target:calloc(1, sizeof(crm_time_hr_t)); + if (hr_dt) { + *hr_dt = (crm_time_hr_t) { + .years = dt->years, + .months = dt->months, + .days = dt->days, + .seconds = dt->seconds, + .offset = dt->offset, + .duration = dt->duration + }; + } + } + + return hr_dt; +} + void -crmd_enable_notifications(const char *script, const char *target) +crm_time_set_hr_dt(crm_time_t *target, crm_time_hr_t *hr_dt) { - free(notify_script); - notify_script = NULL; + CRM_ASSERT((hr_dt) && (target)); + *target = (crm_time_t) { + .years = hr_dt->years, + .months = hr_dt->months, + .days = hr_dt->days, + .seconds = hr_dt->seconds, + .offset = hr_dt->offset, + .duration = hr_dt->duration + }; +} - free(notify_target); - notify_target = NULL; +crm_time_hr_t * +crm_time_timeval_hr_convert(crm_time_hr_t *target, struct timeval *tv) +{ + crm_time_t dt; + crm_time_hr_t *ret; + + crm_time_set_timet(&dt, &tv->tv_sec); + ret = crm_time_hr_convert(target, &dt); + if (ret) { + ret->useconds = tv->tv_usec; + } + return ret; +} + +crm_time_hr_t * +crm_time_hr_new(const char *date_time) +{ + crm_time_hr_t *hr_dt = NULL; + struct timeval tv_now; + + if (!date_time) { + if (gettimeofday(&tv_now, NULL) == 0) { + hr_dt = crm_time_timeval_hr_convert(NULL, &tv_now); + } + } else { + crm_time_t *dt; + + dt = parse_date(date_time); + hr_dt = crm_time_hr_convert(NULL, dt); + crm_time_free(dt); + } + return hr_dt; +} + +void +crm_time_hr_free(crm_time_hr_t * hr_dt) +{ + free(hr_dt); +} + +char * +crm_time_format_hr(const char *format, crm_time_hr_t * hr_dt) +{ + const char *mark_s; + int max = 128, scanned_pos = 0, printed_pos = 0, fmt_pos = 0, + date_len = 0, nano_digits, fmt_len; + char nano_s[10], date_s[max+1], nanofmt_s[5] = "%", *tmp_fmt_s; + struct tm tm; + crm_time_t dt; + + if (!format) { + return NULL; + } + crm_time_set_hr_dt(&dt, hr_dt); + ha_get_tm_time(&tm, &dt); + sprintf(nano_s, "%06d000", hr_dt->useconds); + + while ((format[scanned_pos]) != '\0') { + fmt_len = 0; + mark_s = strchr(&format[scanned_pos], '%'); + if (mark_s) { + fmt_pos = mark_s - format; + fmt_len = 1; + while ((format[fmt_pos+fmt_len] != '\0') && + (format[fmt_pos+fmt_len] >= '0') && + (format[fmt_pos+fmt_len] <= '9')) { + fmt_len++; + } + scanned_pos = fmt_pos + fmt_len + 1; + if (format[fmt_pos+fmt_len] == 'N') { + nano_digits = atoi(&format[fmt_pos+1]); + nano_digits = (nano_digits > 6)?6:nano_digits; + nano_digits = (nano_digits < 0)?0:nano_digits; + sprintf(&nanofmt_s[1], ".%ds", nano_digits); + } else { + if (format[fmt_pos+fmt_len] != 0) { + continue; + } + fmt_pos = scanned_pos; /* print till end */ + } + } else { + scanned_pos = strlen(format); + fmt_pos = scanned_pos; /* print till end */ + } + tmp_fmt_s = strndup(&format[printed_pos], fmt_pos - printed_pos); +#ifdef GCC_FORMAT_NONLITERAL_CHECKING_ENABLED +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif + date_len += strftime(&date_s[date_len], max-date_len, tmp_fmt_s, &tm); +#ifdef GCC_FORMAT_NONLITERAL_CHECKING_ENABLED +#pragma GCC diagnostic pop +#endif + printed_pos = scanned_pos; + free(tmp_fmt_s); + if (nano_digits) { +#ifdef GCC_FORMAT_NONLITERAL_CHECKING_ENABLED +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif + date_len += snprintf(&date_s[date_len], max-date_len, + nanofmt_s, nano_s); +#ifdef GCC_FORMAT_NONLITERAL_CHECKING_ENABLED +#pragma GCC diagnostic pop +#endif + nano_digits = 0; + } + } + + return (date_len == 0)?NULL:strdup(date_s); +} + +/* + * end of possibly generic time-handling stuff + */ + + +/* + * syncronize local data with cib + */ + +static void +free_envvar_entry(envvar_t *entry) +{ + free(entry->name); + free(entry->value); + free(entry); +} + +static void +free_notify_list_entry(notify_entry_t *entry) +{ + free(entry->id); + free(entry->path); + free(entry->tstamp_format); + free(entry->recipient); + if (entry->envvars) { + g_list_free_full(entry->envvars, + (GDestroyNotify) free_envvar_entry); + } + free(entry); +} + +static void +free_notify_list() +{ + if (notify_list) { + g_list_free_full(notify_list, (GDestroyNotify) free_notify_list_entry); + notify_list = NULL; + } +} + +static gpointer +copy_envvar_entry(envvar_t * src, + gpointer data) +{ + envvar_t *dst = calloc(1, sizeof(envvar_t)); + + CRM_ASSERT(dst); + dst->name = strdup(src->name); + dst->value = src->value?strdup(src->value):NULL; + return (gpointer) dst; +} + +static GListPtr +add_dup_envvar(GListPtr envvar_list, + envvar_t *entry) +{ + return g_list_prepend(envvar_list, copy_envvar_entry(entry, NULL)); +} + +static GListPtr +drop_envvars(GListPtr envvar_list, int count) +{ + int i; + + for (i = 0; + (envvar_list) && ((count < 0) || (i < count)); + i++) { + free_envvar_entry((envvar_t *) g_list_first(envvar_list)->data); + envvar_list = g_list_delete_link(envvar_list, + g_list_first(envvar_list)); + } + return envvar_list; +} + +static GListPtr +copy_envvar_list_remove_dupes(GListPtr src) +{ + GListPtr dst = NULL, ls, ld; + + /* we are adding to the front so variable dupes coming via + * recipient-section have got precedence over those in the + * global section - we don't expect that many variables here + * that it pays off to go for a hash-table to make dupe elimination + * more efficient - maybe later when we might decide to do more + * with the variables than cycling through them + */ + + for (ls = g_list_first(src); ls; ls = g_list_next(ls)) { + for (ld = g_list_first(dst); ld; ld = g_list_next(ld)) { + if (!strcmp(((envvar_t *)(ls->data))->name, + ((envvar_t *)(ld->data))->name)) { + break; + } + } + if (!ld) { + dst = g_list_prepend(dst, + copy_envvar_entry((envvar_t *)(ls->data), NULL)); + } + } + + return dst; +} + +static void +add_dup_notify_list_entry(notify_entry_t *entry) +{ + notify_entry_t *new_entry = + (notify_entry_t *) calloc(1, sizeof(notify_entry_t)); + + CRM_ASSERT(new_entry); + *new_entry = (notify_entry_t) { + .id = strdup(entry->id), + .path = strdup(entry->path), + .timeout = entry->timeout, + .tstamp_format = entry->tstamp_format?strdup(entry->tstamp_format):NULL, + .recipient = entry->recipient?strdup(entry->recipient):NULL, + .envvars = entry->envvars? + copy_envvar_list_remove_dupes(entry->envvars) + :NULL + }; + notify_list = g_list_prepend(notify_list, new_entry); +} + +static GListPtr +get_envvars_from_cib(xmlNode *basenode, GListPtr list, int *count) +{ + xmlNode *envvar; + xmlNode *pair; + + if ((!basenode) || + (!(envvar = first_named_child(basenode, XML_TAG_ATTR_SETS)))) { + return list; + } + + for (pair = first_named_child(envvar, XML_CIB_TAG_NVPAIR); + pair; pair = __xml_next(pair)) { + + envvar_t envvar_entry = (envvar_t) { + .name = (char *) crm_element_value(pair, XML_NVPAIR_ATTR_NAME), + .value = (char *) crm_element_value(pair, XML_NVPAIR_ATTR_VALUE) + }; + crm_trace("Found environment variable %s = '%s'", envvar_entry.name, + envvar_entry.value?envvar_entry.value:""); + (*count)++; + list = add_dup_envvar(list, &envvar_entry); + } + + return list; +} + +static GHashTable * +get_meta_attrs_from_cib(xmlNode *basenode, notify_entry_t *entry) +{ + GHashTable *config_hash = + g_hash_table_new_full(crm_str_hash, g_str_equal, + g_hash_destroy_str, g_hash_destroy_str); + crm_time_t *now = crm_time_new(NULL); + const char *value = NULL; + + unpack_instance_attributes(basenode, basenode, XML_TAG_META_SETS, NULL, + config_hash, NULL, FALSE, now); + + value = g_hash_table_lookup(config_hash, XML_NOTIFY_ATTR_TIMEOUT); + if (value) { + entry->timeout = crm_get_msec(value); + crm_trace("Found timeout %dmsec", entry->timeout); + } + value = g_hash_table_lookup(config_hash, XML_NOTIFY_ATTR_TSTAMP_FORMAT); + if (value) { + entry->tstamp_format = (char *) value; + crm_trace("Found timestamp format string '%s'", value); + } + + crm_time_free(now); + return config_hash; /* keep hash as long as strings are needed */ +} + +void +notifications_query_callback(xmlNode * msg, int call_id, int rc, + xmlNode * output, void *user_data) +{ + xmlNode *notify = output; + notify_entry_t entry; + + free_notify_list(); + + if (rc != pcmk_ok) { + crm_info("No optional alerts section in cib"); + + if (notify_script) { + entry = (notify_entry_t) { + .id = (char *) "legacy_notification", + .path = notify_script, + .timeout = CRMD_NOTIFY_DEFAULT_TIMEOUT_MS, + .recipient = notify_target + }; + add_dup_notify_list_entry(&entry); + crm_info("Legacy Notifications enabled"); + } - if(script == NULL || safe_str_eq(script, "/dev/null")) { - crm_notice("Notifications disabled"); return; + } else { + crm_info("We have an alerts section in the cib"); + + if (notify_script) { + crm_warn("Cib contains configuration for Legacy Notifications " + "which is overruled by alerts section"); + } + } + + if ((notify) && + (crm_element_name(notify)) && + (strcmp(crm_element_name(notify), XML_CIB_TAG_NOTIFY) != 0)) { + notify = first_named_child(notify, XML_CIB_TAG_NOTIFY); } - notify_script = strdup(script); - notify_target = strdup(target); - crm_notice("Notifications enabled"); + for (; notify; notify = __xml_next(notify)) { + xmlNode *recipient; + int recipients = 0, envvars = 0; + GHashTable *config_hash = NULL; + + entry = (notify_entry_t) { + .id = (char *) crm_element_value(notify, XML_ATTR_ID), + .path = (char *) crm_element_value(notify, XML_NOTIFY_ATTR_PATH), + .timeout = CRMD_NOTIFY_DEFAULT_TIMEOUT_MS + }; + + entry.envvars = + get_envvars_from_cib(notify, + entry.envvars, + &envvars); + + config_hash = + get_meta_attrs_from_cib(notify, &entry); + + crm_debug("Found notification: id=%s, path=%s, timeout=%d, " + "tstamp_format=%s, %d additional environment variables", + entry.id, entry.path, entry.timeout, + entry.tstamp_format, envvars); + + for (recipient = first_named_child(notify, + XML_CIB_TAG_NOTIFY_RECIPIENT); + recipient; recipient = __xml_next(recipient)) { + int envvars_added = 0; + + entry.recipient = (char *) crm_element_value(recipient, + XML_NOTIFY_ATTR_REC_VALUE); + recipients++; + + entry.envvars = + get_envvars_from_cib(recipient, + entry.envvars, + &envvars_added); + + { + notify_entry_t recipient_entry = entry; + GHashTable *config_hash = + get_meta_attrs_from_cib(recipient, + &recipient_entry); + + add_dup_notify_list_entry(&recipient_entry); + + crm_debug("Notification has recipient: id=%s, value=%s, " + "%d additional environment variables", + crm_element_value(recipient, XML_ATTR_ID), + recipient_entry.recipient, envvars_added); + + g_hash_table_destroy(config_hash); + } + + entry.envvars = + drop_envvars(entry.envvars, envvars_added); + } + + if (recipients == 0) { + add_dup_notify_list_entry(&entry); + } + + drop_envvars(entry.envvars, -1); + g_hash_table_destroy(config_hash); + } +} + +/* + * end of synchronization of local data with cib + */ + +void +crmd_enable_notifications(const char *script, const char *target) +{ + free(notify_script); + notify_script = ((script) && + (strcmp(script,"/dev/null")))?strdup(script):NULL; + + free(notify_target); + notify_target = (target != NULL)?strdup(target):NULL; } static void -set_notify_key(const char *name, const char *cvalue, char *value) +set_notify_key(enum notify_keys_e name, const char *cvalue, char *value) { - int lpc; - bool found = 0; + const char **key; - if(cvalue == NULL) { + if(!cvalue) { cvalue = value; } - for(lpc = 0; lpc < DIMOF(notify_keys); lpc++) { - if(safe_str_eq(name, notify_keys[lpc])) { - found = 1; - crm_trace("Setting notify key %s = '%s'", name, cvalue); - setenv(name, cvalue, 1); - break; + for(key = notify_keys[name]; *key; key++) { + crm_trace("Setting notify key %s = '%s'", *key, cvalue); + if (cvalue) { + setenv(*key, cvalue, 1); + } else { + unsetenv(*key); } } - CRM_ASSERT(found != 0); free(value); } -static void crmd_notify_complete(svc_action_t *op) +static void +unset_notify_keys() +{ + const char **key; + enum notify_keys_e name; + + for(name = 0; name < DIMOF(notify_keys); name++) { + for(key = notify_keys[name]; *key; key++) { + crm_trace("Unsetting notify key %s", *key); + unsetenv(*key); + } + } +} + +static void +set_envvar_list(GListPtr envvars) +{ + GListPtr l; + + for (l = g_list_first(envvars); l; l = g_list_next(l)) { + envvar_t *entry = (envvar_t *)(l->data); + + crm_trace("Setting environment variable %s = '%s'", entry->name, + entry->value?entry->value:""); + if (entry->value) { + setenv(entry->name, entry->value, 1); + } else { + unsetenv(entry->name); + } + } +} + +static void +unset_envvar_list(GListPtr envvars) +{ + GListPtr l; + + for (l = g_list_first(envvars); l; l = g_list_next(l)) { + envvar_t *entry = (envvar_t *)(l->data); + + crm_trace("Unsetting environment variable %s", entry->name); + unsetenv(entry->name); + } +} + +static void +crmd_notify_complete(svc_action_t *op) { if(op->rc == 0) { crm_info("Notification %d (%s) complete", op->sequence, op->agent); } else { - crm_warn("Notification %d (%s) failed: %d", op->sequence, op->agent, op->rc); + crm_warn("Notification %d (%s) failed: %d", op->sequence, op->agent, + op->rc); } } static void -send_notification(const char *kind) +send_notifications(const char *kind) { - int lpc; svc_action_t *notify = NULL; static int operations = 0; + GListPtr l; + crm_time_hr_t *now = crm_time_hr_new(NULL); + + set_notify_key(CRM_notify_kind, kind, NULL); + set_notify_key(CRM_notify_version, VERSION, NULL); + + for (l = g_list_first(notify_list); l; l = g_list_next(l)) { + notify_entry_t *entry = (notify_entry_t *)(l->data); + char *timestamp = crm_time_format_hr(entry->tstamp_format, now); + + operations++; + crm_debug("Sending '%s' notification to '%s' via '%s'", kind, + entry->recipient, entry->path); + set_notify_key(CRM_notify_recipient, entry->recipient, NULL); + set_notify_key(CRM_notify_node_sequence, crm_itoa(operations), NULL); + set_notify_key(CRM_notify_timestamp, timestamp, NULL); - crm_debug("Sending '%s' notification to '%s' via '%s'", kind, notify_target, notify_script); + notify = services_action_create_generic(entry->path, NULL); - set_notify_key("CRM_notify_recipient", notify_target, NULL); - set_notify_key("CRM_notify_kind", kind, NULL); - set_notify_key("CRM_notify_version", VERSION, NULL); + notify->timeout = entry->timeout; + notify->standard = strdup("event"); + notify->id = strdup(entry->id); + notify->agent = strdup(entry->path); + notify->sequence = operations; - notify = services_action_create_generic(notify_script, NULL); + set_envvar_list(entry->envvars); - notify->timeout = CRMD_NOTIFY_TIMEOUT_MS; - notify->standard = strdup("event"); - notify->id = strdup(notify_script); - notify->agent = strdup(notify_script); - notify->sequence = ++operations; + if(services_action_async(notify, &crmd_notify_complete) == FALSE) { + services_action_free(notify); + } + + unset_envvar_list(entry->envvars); - if(services_action_async(notify, &crmd_notify_complete) == FALSE) { - services_action_free(notify); + free(timestamp); } - for(lpc = 0; lpc < DIMOF(notify_keys); lpc++) { - unsetenv(notify_keys[lpc]); + unset_notify_keys(); + if (now) { + free(now); } } -void crmd_notify_node_event(crm_node_t *node) +void +crmd_notify_node_event(crm_node_t *node) { - if(notify_script == NULL) { + if(!notify_list) { return; } - set_notify_key("CRM_notify_node", node->uname, NULL); - set_notify_key("CRM_notify_nodeid", NULL, crm_itoa(node->id)); - set_notify_key("CRM_notify_desc", node->state, NULL); + set_notify_key(CRM_notify_node, node->uname, NULL); + set_notify_key(CRM_notify_nodeid, NULL, crm_itoa(node->id)); + set_notify_key(CRM_notify_desc, node->state, NULL); - send_notification("node"); + send_notifications("node"); } void @@ -141,20 +729,21 @@ crmd_notify_fencing_op(stonith_event_t * e) { char *desc = NULL; - if (notify_script == NULL) { + if (!notify_list) { return; } - desc = crm_strdup_printf("Operation %s requested by %s for peer %s: %s (ref=%s)", - e->operation, e->origin, e->target, pcmk_strerror(e->result), - e->id); + desc = crm_strdup_printf( + "Operation %s requested by %s for peer %s: %s (ref=%s)", + e->operation, e->origin, e->target, pcmk_strerror(e->result), + e->id); - set_notify_key("CRM_notify_node", e->target, NULL); - set_notify_key("CRM_notify_task", e->operation, NULL); - set_notify_key("CRM_notify_desc", NULL, desc); - set_notify_key("CRM_notify_rc", NULL, crm_itoa(e->result)); + set_notify_key(CRM_notify_node, e->target, NULL); + set_notify_key(CRM_notify_task, e->operation, NULL); + set_notify_key(CRM_notify_desc, NULL, desc); + set_notify_key(CRM_notify_rc, NULL, crm_itoa(e->result)); - send_notification("fencing"); + send_notifications("fencing"); } void @@ -162,12 +751,13 @@ crmd_notify_resource_op(const char *node, lrmd_event_data_t * op) { int target_rc = 0; - if(notify_script == NULL) { + if(!notify_list) { return; } target_rc = rsc_op_expected_rc(op); - if(op->interval == 0 && target_rc == op->rc && safe_str_eq(op->op_type, RSC_STATUS)) { + if(op->interval == 0 && target_rc == op->rc && + safe_str_eq(op->op_type, RSC_STATUS)) { /* Leave it up to the script if they want to notify for * 'failed' probes, only swallow ones for which the result was * unexpected. @@ -178,22 +768,23 @@ crmd_notify_resource_op(const char *node, lrmd_event_data_t * op) return; } - set_notify_key("CRM_notify_node", node, NULL); + set_notify_key(CRM_notify_node, node, NULL); - set_notify_key("CRM_notify_rsc", op->rsc_id, NULL); - set_notify_key("CRM_notify_task", op->op_type, NULL); - set_notify_key("CRM_notify_interval", NULL, crm_itoa(op->interval)); + set_notify_key(CRM_notify_rsc, op->rsc_id, NULL); + set_notify_key(CRM_notify_task, op->op_type, NULL); + set_notify_key(CRM_notify_interval, NULL, crm_itoa(op->interval)); - set_notify_key("CRM_notify_target_rc", NULL, crm_itoa(target_rc)); - set_notify_key("CRM_notify_status", NULL, crm_itoa(op->op_status)); - set_notify_key("CRM_notify_rc", NULL, crm_itoa(op->rc)); + set_notify_key(CRM_notify_target_rc, NULL, crm_itoa(target_rc)); + set_notify_key(CRM_notify_status, NULL, crm_itoa(op->op_status)); + set_notify_key(CRM_notify_rc, NULL, crm_itoa(op->rc)); if(op->op_status == PCMK_LRM_OP_DONE) { - set_notify_key("CRM_notify_desc", services_ocf_exitcode_str(op->rc), NULL); + set_notify_key(CRM_notify_desc, + services_ocf_exitcode_str(op->rc), NULL); } else { - set_notify_key("CRM_notify_desc", services_lrm_status_str(op->op_status), NULL); + set_notify_key(CRM_notify_desc, + services_lrm_status_str(op->op_status), NULL); } - send_notification("resource"); -} - + send_notifications("resource"); +} \ No newline at end of file diff --git a/crmd/notify.h b/crmd/notify.h index d54163f7933..406a108c61a 100644 --- a/crmd/notify.h +++ b/crmd/notify.h @@ -2,7 +2,7 @@ * Copyright (C) 2015 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -22,12 +22,13 @@ # include # include -/* Timeout to use before killing a notification script (in milliseconds) */ -# define CRMD_NOTIFY_TIMEOUT_MS (300000) +/* Default-Timeout to use before killing a notification script (in milliseconds) */ +# define CRMD_NOTIFY_DEFAULT_TIMEOUT_MS (300000) void crmd_enable_notifications(const char *script, const char *target); void crmd_notify_node_event(crm_node_t *node); void crmd_notify_fencing_op(stonith_event_t * e); void crmd_notify_resource_op(const char *node, lrmd_event_data_t * op); +void notifications_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data); #endif diff --git a/crmd/pengine.c b/crmd/pengine.c index 46df648b934..4a8d617ba6e 100644 --- a/crmd/pengine.c +++ b/crmd/pengine.c @@ -299,7 +299,7 @@ do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void { int sent; xmlNode *cmd = NULL; - const char *watchdog = NULL; + pid_t watchdog = pcmk_locate_sbd(); if (rc != pcmk_ok) { crm_err("Cant retrieve the CIB: %s (call %d)", pcmk_strerror(rc), call_id); @@ -339,10 +339,7 @@ do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void crm_xml_add(output, XML_ATTR_DC_UUID, fsa_our_uuid); crm_xml_add_int(output, XML_ATTR_HAVE_QUORUM, fsa_has_quorum); - watchdog = daemon_option("watchdog"); - if (watchdog) { - force_local_option(output, XML_ATTR_HAVE_WATCHDOG, watchdog); - } + force_local_option(output, XML_ATTR_HAVE_WATCHDOG, watchdog?"true":"false"); if (ever_had_quorum && crm_have_quorum == FALSE) { crm_xml_add_int(output, XML_ATTR_QUORUM_PANIC, 1); diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index ca4923f39d3..27c951a1c16 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -162,11 +162,167 @@ start_delay_helper(gpointer data) return FALSE; } +/*! + * \internal + * \brief Handle cluster communication related to pacemaker_remote node joining + * + * \param[in] node_name Name of newly integrated pacemaker_remote node + */ +static void +remote_node_up(const char *node_name) +{ + int call_opt, call_id = 0; + xmlNode *update, *state; + crm_node_t *node; + + CRM_CHECK(node_name != NULL, return); + crm_info("Announcing pacemaker_remote node %s", node_name); + + /* Clear node's operation history and transient attributes */ + call_opt = crmd_cib_smart_opt(); + erase_status_tag(node_name, XML_CIB_TAG_LRM, call_opt); + erase_status_tag(node_name, XML_TAG_TRANSIENT_NODEATTRS, call_opt); + + /* Clear node's probed attribute */ + update_attrd(node_name, CRM_OP_PROBED, NULL, NULL, TRUE); + + /* Ensure node is in the remote peer cache with member status */ + node = crm_remote_peer_get(node_name); + CRM_CHECK(node != NULL, return); + crm_update_peer_state(__FUNCTION__, node, CRM_NODE_MEMBER, 0); + + /* pacemaker_remote nodes don't participate in the membership layer, + * so cluster nodes don't automatically get notified when they come and go. + * We send a cluster message to the DC, and update the CIB node state entry, + * so the DC will get it sooner (via message) or later (via CIB refresh), + * and any other interested parties can query the CIB. + */ + send_remote_state_message(node_name, TRUE); + + update = create_xml_node(NULL, XML_CIB_TAG_STATUS); + state = do_update_node_cib(node, node_update_cluster, update, __FUNCTION__); + + /* Clear the XML_NODE_IS_FENCED flag in the node state. If the node ever + * needs to be fenced, this flag will allow various actions to determine + * whether the fencing has happened yet. + */ + crm_xml_add(state, XML_NODE_IS_FENCED, "0"); + + /* TODO: If the remote connection drops, and this (async) CIB update either + * failed or has not yet completed, later actions could mistakenly think the + * node has already been fenced (if the XML_NODE_IS_FENCED attribute was + * previously set, because it won't have been cleared). This could prevent + * actual fencing or allow recurring monitor failures to be cleared too + * soon. Ideally, we wouldn't rely on the CIB for the fenced status. + */ + fsa_cib_update(XML_CIB_TAG_STATUS, update, call_opt, call_id, NULL); + if (call_id < 0) { + crm_perror(LOG_WARNING, "%s CIB node state setup", node_name); + } + free_xml(update); +} + +/*! + * \internal + * \brief Handle cluster communication related to pacemaker_remote node leaving + * + * \param[in] node_name Name of lost node + */ +static void +remote_node_down(const char *node_name) +{ + xmlNode *update; + int call_id = 0; + int call_opt = crmd_cib_smart_opt(); + crm_node_t *node; + + /* Clear all node attributes */ + update_attrd_remote_node_removed(node_name, NULL); + + /* Ensure node is in the remote peer cache with lost state */ + node = crm_remote_peer_get(node_name); + CRM_CHECK(node != NULL, return); + crm_update_peer_state(__FUNCTION__, node, CRM_NODE_LOST, 0); + + /* Notify DC */ + send_remote_state_message(node_name, FALSE); + + /* Update CIB node state */ + update = create_xml_node(NULL, XML_CIB_TAG_STATUS); + do_update_node_cib(node, node_update_cluster, update, __FUNCTION__); + fsa_cib_update(XML_CIB_TAG_STATUS, update, call_opt, call_id, NULL); + if (call_id < 0) { + crm_perror(LOG_ERR, "%s CIB node state update", node_name); + } + free_xml(update); +} + +/*! + * \internal + * \brief Handle effects of a remote RA command on node state + * + * \param[in] cmd Completed remote RA command + */ +static void +check_remote_node_state(remote_ra_cmd_t *cmd) +{ + /* Only successful actions can change node state */ + if (cmd->rc != PCMK_OCF_OK) { + return; + } + + if (safe_str_eq(cmd->action, "start")) { + remote_node_up(cmd->rsc_id); + + } else if (safe_str_eq(cmd->action, "migrate_from")) { + /* After a successful migration, we don't need to do remote_node_up() + * because the DC already knows the node is up, and we don't want to + * clear LRM history etc. We do need to add the remote node to this + * host's remote peer cache, because (unless it happens to be DC) + * it hasn't been tracking the remote node, and other code relies on + * the cache to distinguish remote nodes from unseen cluster nodes. + */ + crm_node_t *node = crm_remote_peer_get(cmd->rsc_id); + + CRM_CHECK(node != NULL, return); + crm_update_peer_state(__FUNCTION__, node, CRM_NODE_MEMBER, 0); + + } else if (safe_str_eq(cmd->action, "stop")) { + lrm_state_t *lrm_state = lrm_state_find(cmd->rsc_id); + remote_ra_data_t *ra_data = lrm_state? lrm_state->remote_ra_data : NULL; + + if (ra_data) { + if (ra_data->migrate_status != takeover_complete) { + /* Stop means down if we didn't successfully migrate elsewhere */ + remote_node_down(cmd->rsc_id); + } else if (AM_I_DC == FALSE) { + /* Only the connection host and DC track node state, + * so if the connection migrated elsewhere and we aren't DC, + * un-cache the node, so we don't have stale info + */ + crm_remote_peer_cache_remove(cmd->rsc_id); + } + } + } + + /* We don't do anything for successful monitors, which is correct for + * routine recurring monitors, and for monitors on nodes where the + * connection isn't supposed to be (the cluster will stop the connection in + * that case). However, if the initial probe finds the connection already + * active on the node where we want it, we probably should do + * remote_node_up(). Unfortunately, we can't distinguish that case here. + * Given that connections have to be initiated by the cluster, the chance of + * that should be close to zero. + */ +} + static void report_remote_ra_result(remote_ra_cmd_t * cmd) { lrmd_event_data_t op = { 0, }; + check_remote_node_state(cmd); + op.type = lrmd_event_exec_complete; op.rsc_id = cmd->rsc_id; op.op_type = cmd->action; @@ -308,19 +464,6 @@ monitor_timeout_cb(gpointer data) return FALSE; } -xmlNode * -simple_remote_node_status(const char *node_name, xmlNode * parent, const char *source) -{ - xmlNode *state = create_xml_node(parent, XML_CIB_TAG_STATE); - - crm_xml_add(state, XML_NODE_IS_REMOTE, "true"); - crm_xml_add(state, XML_ATTR_UUID, node_name); - crm_xml_add(state, XML_ATTR_UNAME, node_name); - crm_xml_add(state, XML_ATTR_ORIGIN, source); - - return state; -} - void remote_lrm_op_callback(lrmd_event_data_t * op) { @@ -349,8 +492,11 @@ remote_lrm_op_callback(lrmd_event_data_t * op) if (ra_data->migrate_status == expect_takeover) { ra_data->migrate_status = takeover_complete; } else { - crm_err("Unexpected pacemaker_remote client takeover. Disconnecting"); - lrm_state_disconnect(lrm_state); + crm_err("Unexpected pacemaker_remote client takeover for %s. Disconnecting", op->remote_nodename); + /* In this case, lrmd_tls_connection_destroy() will be called under the control of mainloop. */ + /* Do not free lrm_state->conn yet. */ + /* It'll be freed in the following stop action. */ + lrm_state_disconnect_only(lrm_state); } return; } @@ -402,11 +548,6 @@ remote_lrm_op_callback(lrmd_event_data_t * op) cmd->rc = PCMK_OCF_UNKNOWN_ERROR; } else { - - if (safe_str_eq(cmd->action, "start")) { - /* clear PROBED value if it happens to be set after start completes. */ - update_attrd(lrm_state->node_name, CRM_OP_PROBED, NULL, NULL, TRUE); - } lrm_state_reset_tables(lrm_state); cmd->rc = PCMK_OCF_OK; cmd->op_status = PCMK_LRM_OP_DONE; @@ -480,8 +621,6 @@ handle_remote_ra_stop(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd) ra_data = lrm_state->remote_ra_data; if (ra_data->migrate_status != takeover_complete) { - /* only clear the status if this stop is not apart of a successful migration */ - update_attrd_remote_node_removed(lrm_state->node_name, NULL); /* delete pending ops when ever the remote connection is intentionally stopped */ g_hash_table_remove_all(lrm_state->pending_ops); } else { @@ -905,3 +1044,24 @@ remote_ra_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *action, lrmd_key_value_freeall(params); return rc; } + +/*! + * \internal + * \brief Immediately fail all monitors of a remote node, if proxied here + * + * \param[in] node_name Name of pacemaker_remote node + */ +void +remote_ra_fail(const char *node_name) +{ + lrm_state_t *lrm_state = lrm_state_find(node_name); + + if (lrm_state && lrm_state_is_connected(lrm_state)) { + remote_ra_data_t *ra_data = lrm_state->remote_ra_data; + + crm_info("Failing monitors on pacemaker_remote node %s", node_name); + ra_data->recurring_cmds = fail_all_monitor_cmds(ra_data->recurring_cmds); + ra_data->cmds = fail_all_monitor_cmds(ra_data->cmds); + } +} + diff --git a/crmd/te_actions.c b/crmd/te_actions.c index 039083d6aab..bf25ccc840a 100644 --- a/crmd/te_actions.c +++ b/crmd/te_actions.c @@ -65,6 +65,12 @@ send_stonith_update(crm_action_t * action, const char *target, const char *uuid) int rc = pcmk_ok; crm_node_t *peer = NULL; + /* We (usually) rely on the membership layer to do node_update_cluster, + * and the peer status callback to do node_update_peer, because the node + * might have already rejoined before we get the stonith result here. + */ + int flags = node_update_join | node_update_expected; + /* zero out the node-status & remove all LRM status info */ xmlNode *node_state = NULL; @@ -76,6 +82,14 @@ send_stonith_update(crm_action_t * action, const char *target, const char *uuid) CRM_CHECK(peer != NULL, return); + if (peer->state == NULL) { + /* Usually, we rely on the membership layer to update the cluster state + * in the CIB. However, if the node has never been seen, do it here, so + * the node is not considered unclean. + */ + flags |= node_update_cluster; + } + if (peer->uuid == NULL) { crm_info("Recording uuid '%s' for node '%s'", uuid, target); peer->uuid = strdup(uuid); @@ -83,13 +97,8 @@ send_stonith_update(crm_action_t * action, const char *target, const char *uuid) crmd_peer_down(peer, TRUE); - /* Generate a node state update for the CIB. - * We rely on the membership layer to do node_update_cluster, - * and the peer status callback to do node_update_peer, - * because the node might rejoin before we get the stonith result. - */ - node_state = do_update_node_cib(peer, node_update_join|node_update_expected, - NULL, __FUNCTION__); + /* Generate a node state update for the CIB */ + node_state = do_update_node_cib(peer, flags, NULL, __FUNCTION__); /* we have to mark whether or not remote nodes have already been fenced */ if (peer->flags & crm_remote_node) { diff --git a/crmd/te_callbacks.c b/crmd/te_callbacks.c index 08612bd38a9..2bbcfc2e9aa 100644 --- a/crmd/te_callbacks.c +++ b/crmd/te_callbacks.c @@ -337,7 +337,7 @@ static void abort_unless_down(const char *xpath, const char *op, xmlNode *change return; } - down = match_down_event(0, node_uuid, NULL, FALSE); + down = match_down_event(node_uuid, FALSE); if(down == NULL || down->executed == false) { crm_trace("Not expecting %s to be down (%s)", node_uuid, xpath); abort_transition(INFINITY, tg_restart, reason, change); @@ -455,11 +455,12 @@ te_update_diff(const char *event, xmlNode * msg) *key = '\0'; key = strrchr(mutable_key, '\''); } - if (key++ == NULL) { + if (key == NULL) { crm_warn("Ignoring malformed CIB update (resource deletion)"); free(mutable_key); continue; } + ++key; node_uuid = extract_node_uuid(xpath); cancel = get_cancel_action(key, node_uuid); diff --git a/crmd/te_callbacks.h b/crmd/te_callbacks.h index 28e29929a9a..a87d72ca6d6 100644 --- a/crmd/te_callbacks.h +++ b/crmd/te_callbacks.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/te_events.c b/crmd/te_events.c index 09abb131cfe..e42e63d2888 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -247,77 +247,6 @@ status_from_rc(crm_action_t * action, int orig_status, int rc, int target_rc) return PCMK_LRM_OP_ERROR; } -static void -process_remote_node_action(crm_action_t *action, xmlNode *event) -{ - xmlNode *child = NULL; - - /* The whole point of this function is to detect when a remote-node - * is integrated into the cluster or has failed, and properly abort - * the transition so resources can be placed on the new node or fail - * all pending actions on a lost node. - */ - - if (crm_remote_peer_cache_size() == 0) { - return; - } else if (action->type != action_type_rsc) { - return; - } else if (action->confirmed == FALSE) { - return; - } else if (!action->failed || safe_str_neq(crm_element_value(action->xml, XML_LRM_ATTR_TASK), "start")) { - /* we only care about failed remote nodes, or remote nodes that have just come online. */ - return; - } - - for (child = __xml_first_child(action->xml); child != NULL; child = __xml_next(child)) { - const char *provider; - const char *type; - const char *rsc; - const char *action_type; - crm_node_t *remote_peer; - - if (safe_str_neq(crm_element_name(child), XML_CIB_TAG_RESOURCE)) { - continue; - } - - provider = crm_element_value(child, XML_AGENT_ATTR_PROVIDER); - type = crm_element_value(child, XML_ATTR_TYPE); - rsc = ID(child); - action_type = crm_element_value(action->xml, XML_LRM_ATTR_TASK); - - if (safe_str_neq(provider, "pacemaker") || safe_str_neq(type, "remote") || rsc == NULL) { - break; - } - - remote_peer = crm_get_peer_full(0, rsc, CRM_GET_PEER_REMOTE); - if (remote_peer == NULL) { - break; - } - - /* if a remote node connection failed, and this failure is not related to a probe - * action, make sure to cancel any in-flight operations occurring on that remote node - * since those actions will timeout. we don't want to wait around for the timeouts */ - if (action->failed && - !(safe_str_eq(action_type, "monitor") && action->interval == 0)) { - - /* the rsc id is actually the remote node id. we want to mark all - * in-flight actions on a failed remote node as incompletable */ - fail_incompletable_actions(transition_graph, rsc); - - } else if (!action->failed && - safe_str_eq(remote_peer->state, CRM_NODE_LOST) && - safe_str_eq(action_type, "start")) { - /* A remote node will be placed in the "lost" state after - * it has been successfully fenced. After successfully connecting - * to a remote-node after being fenced, we need to abort the transition - * so resources can be placed on the newly integrated remote-node */ - abort_transition(INFINITY, tg_restart, "Remote-node re-discovered.", event); - } - - return; - } -} - /*! * \internal * \brief Confirm action and update transition graph, aborting transition on failures @@ -385,9 +314,6 @@ match_graph_event(crm_action_t *action, xmlNode *event, int op_status, target = crm_element_value(action->xml, XML_LRM_ATTR_TARGET); crm_info("Action %s (%d) confirmed on %s (rc=%d%s)", crm_str(this_event), action->id, crm_str(target), op_rc, ignore_s); - - /* determine if this action affects a remote-node's online/offline status */ - process_remote_node_action(action, event); } crm_action_t * @@ -458,86 +384,53 @@ get_cancel_action(const char *id, const char *node) return NULL; } +/* downed nodes are listed like: ... */ +#define XPATH_DOWNED "//" XML_GRAPH_TAG_DOWNED \ + "/" XML_CIB_TAG_NODE "[@" XML_ATTR_UUID "='%s']" + /*! * \brief Find a transition event that would have made a specified node down * - * \param[in] id If nonzero, also consider this action ID a match * \param[in] target UUID of node to match - * \param[in] filter If not NULL, only match CRM actions of this type * \param[in] quiet If FALSE, log a warning if no match found * * \return Matching event if found, NULL otherwise - * - * \note "Down" events are CRM_OP_FENCE and CRM_OP_SHUTDOWN. */ crm_action_t * -match_down_event(int id, const char *target, const char *filter, bool quiet) +match_down_event(const char *target, bool quiet) { - const char *this_action = NULL; - const char *this_node = NULL; crm_action_t *match = NULL; + xmlXPathObjectPtr xpath_ret = NULL; + GListPtr gIter, gIter2; - GListPtr gIter = NULL; - GListPtr gIter2 = NULL; + char *xpath = crm_strdup_printf(XPATH_DOWNED, target); - gIter = transition_graph->synapses; - for (; gIter != NULL; gIter = gIter->next) { - synapse_t *synapse = (synapse_t *) gIter->data; - - /* lookup event */ - gIter2 = synapse->actions; - for (; gIter2 != NULL; gIter2 = gIter2->next) { - crm_action_t *action = (crm_action_t *) gIter2->data; + for (gIter = transition_graph->synapses; + gIter != NULL && match == NULL; + gIter = gIter->next) { - if (id > 0 && action->id == id) { - match = action; - break; - } - - this_action = crm_element_value(action->xml, XML_LRM_ATTR_TASK); - - if (action->type != action_type_crm) { - continue; + for (gIter2 = ((synapse_t*)gIter->data)->actions; + gIter2 != NULL && match == NULL; + gIter2 = gIter2->next) { - } else if (filter != NULL && safe_str_neq(this_action, filter)) { - continue; - - } else if (safe_str_neq(this_action, CRM_OP_FENCE) - && safe_str_neq(this_action, CRM_OP_SHUTDOWN)) { - continue; + match = (crm_action_t*)gIter2->data; + xpath_ret = xpath_search(match->xml, xpath); + if (numXpathResults(xpath_ret) < 1) { + match = NULL; } - - this_node = crm_element_value(action->xml, XML_LRM_ATTR_TARGET_UUID); - - if (this_node == NULL) { - crm_log_xml_err(action->xml, "No node uuid"); - } - - if (safe_str_neq(this_node, target)) { - crm_trace("Action %d node %s is not a match for %s", - action->id, this_node, target); - continue; - } - - match = action; - id = action->id; - break; - } - - if (match != NULL) { - break; + freeXpathObject(xpath_ret); } } - if (match != NULL) { - crm_debug("Match found for action %d: %s on %s", id, - crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY), target); + free(xpath); - } else if (id > 0) { - crm_err("No match for action %d", id); + if (match != NULL) { + crm_debug("Shutdown action found for node %s: action %d (%s)", + target, match->id, + crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY)); } else if(quiet == FALSE) { - crm_warn("No match for shutdown action on %s", target); + crm_warn("No reason to expect node %s to be down", target); } return match; @@ -628,7 +521,7 @@ process_graph_event(xmlNode * event, const char *event_node) } else { if (update_failcount(event, event_node, rc, target_rc, (transition_num == -1), ignore_failures)) { - /* Turns out this wasn't an lrm status refresh update aferall */ + /* Turns out this wasn't an lrm status refresh update afterall */ stop_early = FALSE; desc = "failed"; } diff --git a/crmd/te_utils.c b/crmd/te_utils.c index 3a9f491e4f1..c2e16f5e5f0 100644 --- a/crmd/te_utils.c +++ b/crmd/te_utils.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -357,6 +358,15 @@ tengine_stonith_notify(stonith_t * st, stonith_event_t * st_event) add_stonith_cleanup(st_event->target); } + /* If the target is a remote node, and we host its connection, + * immediately fail all monitors so it can be recovered quickly. + * The connection won't necessarily drop when a remote node is fenced, + * so the failure might not otherwise be detected until the next poke. + */ + if (is_set(peer->flags, crm_remote_node)) { + remote_ra_fail(st_event->target); + } + crmd_peer_down(peer, TRUE); } } diff --git a/crmd/tengine.h b/crmd/tengine.h index 94a869314a2..7205c16cc44 100644 --- a/crmd/tengine.h +++ b/crmd/tengine.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -33,7 +33,7 @@ void purge_stonith_cleanup(void); void execute_stonith_cleanup(void); /* tengine */ -extern crm_action_t *match_down_event(int rc, const char *target, const char *filter, bool quiet); +extern crm_action_t *match_down_event(const char *target, bool quiet); extern crm_action_t *get_cancel_action(const char *id, const char *node); extern gboolean cib_action_update(crm_action_t * action, int status, int op_rc); diff --git a/crmd/throttle.c b/crmd/throttle.c index 6327170e90d..36ed554b3e7 100644 --- a/crmd/throttle.c +++ b/crmd/throttle.c @@ -215,10 +215,10 @@ static bool throttle_cib_load(float *load) *load = (delta_utime + delta_stime); /* Cast to a float before division */ *load /= ticks_per_s; *load /= elapsed; - crm_debug("cib load: %f (%lu ticks in %ds)", *load, delta_utime + delta_stime, elapsed); + crm_debug("cib load: %f (%lu ticks in %lds)", *load, delta_utime + delta_stime, (long)elapsed); } else { - crm_debug("Init %lu + %lu ticks at %d (%lu tps)", utime, stime, now, ticks_per_s); + crm_debug("Init %lu + %lu ticks at %ld (%lu tps)", utime, stime, (long)now, ticks_per_s); } last_call = now; diff --git a/crmd/throttle.h b/crmd/throttle.h index d4699bd1dfb..bdb33e75bb5 100644 --- a/crmd/throttle.h +++ b/crmd/throttle.h @@ -2,7 +2,7 @@ * Copyright (C) 2013 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/crmd/utils.c b/crmd/utils.c index 4fe3a49951d..8e4794a019e 100644 --- a/crmd/utils.c +++ b/crmd/utils.c @@ -1018,12 +1018,54 @@ erase_status_tag(const char *uname, const char *tag, int options) crm_ipc_t *attrd_ipc = NULL; +#if !HAVE_ATOMIC_ATTRD +static int +update_without_attrd(const char * host_uuid, const char * name, const char * value, + const char * user_name, gboolean is_remote_node, char command) +{ + int call_opt = cib_none; + + if (fsa_cib_conn == NULL) { + return -1; + } + + call_opt = crmd_cib_smart_opt(); + + if (command == 'C') { + erase_status_tag(host_uuid, XML_TAG_TRANSIENT_NODEATTRS, call_opt); + return pcmk_ok; + } + + crm_trace("updating status for host_uuid %s, %s=%s", host_uuid, name ? name : "", value ? value : ""); + if (value) { + return update_attr_delegate(fsa_cib_conn, call_opt, XML_CIB_TAG_STATUS, host_uuid, NULL, NULL, + NULL, name, value, FALSE, user_name, is_remote_node ? "remote" : NULL); + } else { + return delete_attr_delegate(fsa_cib_conn, call_opt, XML_CIB_TAG_STATUS, host_uuid, NULL, NULL, + NULL, name, NULL, FALSE, user_name); + } +} +#endif + static void update_attrd_helper(const char *host, const char *name, const char *value, const char *user_name, gboolean is_remote_node, char command) { gboolean rc; int max = 5; +#if !HAVE_ATOMIC_ATTRD + /* Talk directly to cib for remote nodes if it's legacy attrd */ + if (is_remote_node) { + /* host is required for updating a remote node */ + CRM_CHECK(host != NULL, return;); + /* remote node uname and uuid are equal */ + if (update_without_attrd(host, name, value, user_name, is_remote_node, command) < pcmk_ok) { + crm_err("Could not update attribute %s for remote-node %s", name, host); + } + return; + } +#endif + if (attrd_ipc == NULL) { attrd_ipc = crm_ipc_new(T_ATTRD, 0); } diff --git a/cts/CIB.py b/cts/CIB.py index e9386b5f544..b723cf0b2c6 100644 --- a/cts/CIB.py +++ b/cts/CIB.py @@ -312,10 +312,6 @@ def contents(self, target=None): o["no-quorum-policy"] = no_quorum o["expected-quorum-votes"] = self.num_nodes - if self.Factory.rsh.exists_on_all(self.CM.Env["notification-agent"], self.CM.Env["nodes"]): - o["notification-agent"] = self.CM.Env["notification-agent"] - o["notification-recipient"] = self.CM.Env["notification-recipient"] - if self.CM.Env["DoBSC"] == 1: o["ident-string"] = "Linux-HA TEST configuration file - REMOVEME!!" @@ -325,6 +321,13 @@ def contents(self, target=None): if stn is not None: stn.commit() + # Add an alerts section if possible + if self.Factory.rsh.exists_on_all(self.CM.Env["notification-agent"], self.CM.Env["nodes"]): + alerts = Alerts(self.Factory) + alerts.add_alert(self.CM.Env["notification-agent"], + self.CM.Env["notification-recipient"]) + alerts.commit() + # Add resources? if self.CM.Env["CIBResource"] == 1: self.add_resources() @@ -451,7 +454,7 @@ class CIB12(CIB11): class CIB20(CIB11): feature_set = "3.0" - version = "pacemaker-2.4" + version = "pacemaker-2.5" #class HASI(CIB10): # def add_resources(self): diff --git a/cts/CTStests.py b/cts/CTStests.py index cc2decea4f9..97db18c0f62 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -2550,7 +2550,7 @@ def __init__(self, cm): def start_lxc_simple(self, node): # restore any artifacts laying around from a previous test. - self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -R &>/dev/null") + self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -s -R &>/dev/null") # generate the containers, put them in the config, add some resources to them pats = [ ] @@ -2576,13 +2576,7 @@ def cleanup_lxc_simple(self, node): # as best as possible if self.failed == 1: # restore libvirt and cib - self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -R &>/dev/null") - self.rsh(node, "crm_resource -C -r container1 &>/dev/null") - self.rsh(node, "crm_resource -C -r container2 &>/dev/null") - self.rsh(node, "crm_resource -C -r lxc1 &>/dev/null") - self.rsh(node, "crm_resource -C -r lxc2 &>/dev/null") - self.rsh(node, "crm_resource -C -r lxc-ms &>/dev/null") - time.sleep(20) + self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -s -R &>/dev/null") return watch = self.create_watch(pats, 120) @@ -2601,7 +2595,7 @@ def cleanup_lxc_simple(self, node): self.failed = 1 # cleanup libvirt - self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -R &>/dev/null") + self.rsh(node, "/usr/share/pacemaker/tests/cts/lxc_autogen.sh -s -R &>/dev/null") def __call__(self, node): '''Perform the 'RemoteLXC' test. ''' @@ -2641,6 +2635,7 @@ def errorstoignore(self): r"Resource lxc-ms .* is active on 2 nodes attempting recovery", r"Unknown operation: fail", r"(ERROR|error): sending stonithRA op to stonithd failed.", + r"VirtualDomain.*ERROR: Unable to determine emulator", ] AllTestClasses.append(RemoteLXC) @@ -2764,6 +2759,14 @@ def start_pcmk_remote(self, node): self.pcmk_started = 1 break + def kill_pcmk_remote(self, node): + """ Simulate a Pacemaker Remote daemon failure. """ + + # We kill the process to prevent a graceful stop, + # then stop it to prevent the OS from restarting it. + self.rsh(node, "killall -9 pacemaker_remoted") + self.stop_pcmk_remote(node) + def start_metal(self, node): pcmk_started = 0 @@ -2855,7 +2858,7 @@ def fail_connection(self, node): # force stop the pcmk remote daemon. this will result in fencing self.debug("Force stopped active remote node") - self.stop_pcmk_remote(node) + self.kill_pcmk_remote(node) self.debug("Waiting for remote node to be fenced.") self.set_timer("remoteMetalFence") diff --git a/cts/README.md b/cts/README.md index 0486e9eac11..15ecdd0805a 100644 --- a/cts/README.md +++ b/cts/README.md @@ -209,6 +209,30 @@ valgrind. For example: ExecStart=/usr/bin/valgrind /usr/sbin/pacemaker_remoted EOF +### Container testing + +If the --container-tests option is given to CTS, it will enable +testing of LXC resources (currently only the RemoteLXC test, +which starts a remote node using an LXC container). + +The container tests have additional package dependencies (see the toplevel +README). Also, SELinux must be enabled (in either permissive or enforcing mode), +libvirtd must be enabled and running, and root must be able to ssh without a +password between all cluster nodes (not just from the test machine). Before +running the tests, you can verify your environment with: + + /usr/share/pacemaker/tests/cts/lxc_autogen.sh -v + +LXC tests will create two containers with hardcoded parameters: a NAT'ed bridge +named virbr0 using the IP network 192.168.123.0/24 will be created on the +cluster node hosting the containers; the host will be assigned +52:54:00:A8:12:35 as the MAC address and 192.168.123.1 as the IP address. +Each container will be assigned a random MAC address starting with 52:54:, +the IP address 192.168.123.11 or 192.168.123.12, the hostname lxc1 or lxc2 +(which will be added to the host's /etc/hosts file), and 196MB RAM. + +The test will revert all of the configuration when it is done. + ## Mini-HOWTOs @@ -221,29 +245,24 @@ without requiring a password to be entered each time: * On your test exerciser, create an SSH key if you do not already have one. Most commonly, SSH keys will be in your ~/.ssh directory, with the private key file not having an extension, and the public key file - named the same with the extension ".pub" (for example, ~/.ssh/id_dsa.pub). + named the same with the extension ".pub" (for example, ~/.ssh/id_rsa.pub). If you don't already have a key, you can create one with: - ssh-keygen -t dsa + ssh-keygen -t rsa * From your test exerciser, authorize your SSH public key for root on all test machines (both the exerciser and the cluster test machines): - ssh-copy-id -i ~/.ssh/id_dsa.pub root@$MACHINE + ssh-copy-id -i ~/.ssh/id_rsa.pub root@$MACHINE You will probably have to provide your password, and possibly say "yes" to some questions about accepting the identity of the test machines. - The above assumes you have a DSA SSH key in the specified location; - if you have some other type of key (RSA, ECDSA, etc.), use its file name + The above assumes you have a RSA SSH key in the specified location; + if you have some other type of key (DSA, ECDSA, etc.), use its file name in the -i option above. - If you have an old version of SSH that doesn't have ssh-copy-id, - you can take the single line out of your public key file - (e.g. ~/.ssh/identity.pub or ~/.ssh/id_dsa.pub) and manually add it to - root's ~/.ssh/authorized_keys file on each test machine. - * To test, try this command from the exerciser machine for each of your cluster machines, and for the exerciser machine itself. diff --git a/cts/cib_xml.py b/cts/cib_xml.py index 1f924f35f98..c7c56fe51a0 100644 --- a/cts/cib_xml.py +++ b/cts/cib_xml.py @@ -117,6 +117,25 @@ def commit(self): self._run("modify", self.show(), "crm_config", "--allow-create") +class Alerts(XmlBase): + def __init__(self, Factory): + XmlBase.__init__(self, Factory, "alerts", None) + self.alert_count = 0 + + def add_alert(self, path, recipient): + self.alert_count = self.alert_count + 1 + alert = XmlBase(self.Factory, "alert", "alert-%d" % self.alert_count, + path=path) + recipient1 = XmlBase(self.Factory, "recipient", + "alert-%d-recipient-1" % self.alert_count, + value=recipient) + alert.add_child(recipient1) + self.add_child(alert) + + def commit(self): + self._run("modify", self.show(), "configuration", "--allow-create") + + class Expression(XmlBase): def __init__(self, Factory, name, attr, op, value=None): XmlBase.__init__(self, Factory, "expression", name, attribute=attr, operation=op) diff --git a/cts/environment.py b/cts/environment.py index c9db4bf3714..19e4180ea86 100644 --- a/cts/environment.py +++ b/cts/environment.py @@ -670,8 +670,8 @@ def usage(self, arg, status=1): print("\t [--stonith-type type]") print("\t [--stonith-args name=value]") print("\t [--bsc]") - print("\t [--notification-agent path] script to configure for Pacemaker notifications") - print("\t [--notification-recipient r] recipient to pass to notification agent") + print("\t [--notification-agent path] script to configure for Pacemaker alerts") + print("\t [--notification-recipient r] recipient to pass to alert script") print("\t [--no-loop-tests] dont run looping/time-based tests") print("\t [--no-unsafe-tests] dont run tests that are unsafe for use with ocfs2/drbd") print("\t [--valgrind-tests] include tests using valgrind") diff --git a/cts/lxc_autogen.sh.in b/cts/lxc_autogen.sh.in index e11532b33cc..da4b92e98b8 100755 --- a/cts/lxc_autogen.sh.in +++ b/cts/lxc_autogen.sh.in @@ -15,7 +15,17 @@ anywhere=0 add_master=0 verify=0 working_dir="@CRM_CONFIG_CTS@/lxc" -curdir=$(pwd) +run_dirs="/run /var/run /usr/var/run" + +SSH_CMD_OPTS=" + -o StrictHostKeyChecking=no + -o ConnectTimeout=30 + -o BatchMode=yes + -l root + -T +" +# must be on one line b/c used inside quotes +SSH_RSYNC_OPTS="-o UserKnownHostsFile=/dev/null -o BatchMode=yes -o StrictHostKeyChecking=no" function helptext() { echo "lxc_autogen.sh - A tool for generating libvirt lxc containers for testing purposes." @@ -24,7 +34,7 @@ function helptext() { echo "" echo "Options:" echo "-g, --generate Generate libvirt lxc environment in the directory this script is run from." - echo "-k, --key-gen Generate local pacemaker remote key only." + echo "-k, --key-gen Generate pacemaker remote key only." echo "-r, --restore-libvirt Restore the default network, and libvirt config to before this script ran." echo "-p, --restore-cib Remove cib entries this script generated." echo "-R, --restore-all Restore both libvirt and cib plus clean working directory. This will leave libvirt xml files though so rsc can be stopped properly." @@ -33,7 +43,7 @@ function helptext() { echo "-a, --add-cib Add remote-node entries for each lxc instance into the cib" echo "-m, --add-master Add master resource shared between remote-nodes" echo "-d, --download-agent Download and install the latest VirtualDomain agent." - echo "-s, --share-configs Copy container configs to all other known cluster nodes, (crm_node -l)" + echo "-s, --share-configs Synchronize on all known cluster nodes" echo "-c, --containers Specify the number of containers to generate, defaults to $containers. Used with -g" echo "-n, --network What network to override default libvirt network to. Example: -n 192.168.123.1. Used with -g" echo "-v, --verify Verify environment is capable of running lxc" @@ -55,7 +65,7 @@ while true ; do restore=1 restore_pcmk=1 shift;; - -g|--generate) generate=1; shift;; + -g|--generate) generate=1; key_gen=1; shift;; -k|--key-gen) key_gen=1; shift;; -a|--add-cib) cib=1; shift;; -A|--allow-anywhere) anywhere=1; shift;; @@ -106,6 +116,48 @@ fi #strip last digits off addr addr=$(echo $addr | awk -F. '{print $1"."$2"."$3}') +this_node() +{ + crm_node -n +} + +other_nodes() +{ + crm_node -l | awk "\$2 != \"$(this_node)\" {print \$2}" +} + +make_directory() +{ + # argument must be full path + DIR="$1" + + mkdir -p "$DIR" + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + ssh $SSH_CMD_OPTS $node mkdir -p "$DIR" + done + fi +} + +sync_file() +{ + TARGET="$1" + + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + rsync -ave "ssh $SSH_RSYNC_OPTS" "$TARGET" "${node}:${TARGET}" + done + fi +} + +download_agent() +{ + wget https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/VirtualDomain + chmod 755 VirtualDomain + mv -f VirtualDomain /usr/lib/ocf/resource.d/heartbeat/VirtualDomain + sync_file /usr/lib/ocf/resource.d/heartbeat/VirtualDomain +} + set_network() { rm -f cur_network.xml @@ -123,25 +175,66 @@ set_network() END + sync_file ${working_dir}/cur_network.xml +} - ls restore_default.xml > /dev/null 2>&1 - if [ $? -ne 0 ]; then - virsh net-dumpxml default > restore_default.xml +distribute_configs() +{ + for node in $(other_nodes); do + rsync -ave "ssh $SSH_RSYNC_OPTS" ${working_dir}/lxc*.xml ${node}:${working_dir} + rsync -ave "ssh $SSH_RSYNC_OPTS" ${working_dir}/lxc*-filesystem ${node}:${working_dir} + done +} + +start_network() +{ + NODE="$1" + + ssh $SSH_CMD_OPTS $NODE <<-EOF + cd $working_dir + virsh net-info default >/dev/null 2>&1 + if [ \$? -eq 0 ]; then + if [ ! -f restore_default.xml ]; then + virsh net-dumpxml default > restore_default.xml + fi + virsh net-destroy default + virsh net-undefine default fi - virsh net-destroy default - virsh net-undefine default virsh net-define cur_network.xml virsh net-start default virsh net-autostart default +EOF +} + +start_network_all() +{ + start_network $(this_node) + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + start_network $node + done + fi +} + +add_hosts_entry() +{ + IP="$1" + HNAME="$2" + + echo $IP $HNAME >>/etc/hosts + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + ssh $SSH_CMD_OPTS $node "echo $IP $HNAME >>/etc/hosts" + done + fi } generate_key() { - #generate pacemaker remote key - ls /etc/pacemaker/authkey > /dev/null 2>&1 - if [ $? != 0 ]; then - mkdir -p /etc/pacemaker - dd if=/dev/urandom of=/etc/pacemaker/authkey bs=4096 count=1 + if [ ! -e /etc/pacemaker/authkey ]; then + make_directory /etc/pacemaker + dd if=/dev/urandom of=/etc/pacemaker/authkey bs=4096 count=1 + sync_file /etc/pacemaker/authkey fi } @@ -152,11 +245,15 @@ generate() # Generate libvirt domains in xml for (( c=1; c <= $containers; c++ )) do - rm -rf lxc$c-filesystem - mkdir -p lxc$c-filesystem/var/run/ - mkdir -p lxc$c-filesystem/usr/var/run - rm -f lxc$c.xml + # Clean any previous definition + rm -rf lxc$c.xml lxc$c-filesystem + + # Create a basic filesystem with run directories + for dir in $run_dirs; do + mkdir -p lxc$c-filesystem/$dir + done + # Create libvirt definition suffix=$((10 + $c)) prefix=$(echo $addr | awk -F. '{print $1"."$2}') subnet=$(echo $addr | awk -F. '{print $3}') @@ -164,6 +261,7 @@ generate() subnet=$(($subnet + 1)) suffix=$(($subnet - 255)) done + cip=$prefix.$subnet.$suffix cat << END >> lxc$c.xml @@ -179,14 +277,16 @@ generate() +END + for dir in $run_dirs; do + cat << END >> lxc$c.xml - - - - - - + + +END + done + cat << END >> lxc$c.xml @@ -194,6 +294,8 @@ generate() END + + # Create CIB definition rm -f container$c.cib cat << END >> container$c.cib @@ -212,11 +314,13 @@ END END + # Create container init rm -f lxc$c-filesystem/launch-helper cat << END >> lxc$c-filesystem/launch-helper #!/bin/bash -ip -f inet addr add $prefix.$subnet.$suffix/24 dev eth0 -route add 0.0.0.0 gw $addr.1 eth0 +ip -f inet addr add $cip/24 dev eth0 +ip link set eth0 up +ip route add default via $addr.1 hostname lxc$c df > $working_dir/lxc$c-filesystem/disk_usage.txt export PCMK_debugfile=/var/log/pacemaker_remote_lxc$c.log @@ -224,11 +328,10 @@ export PCMK_debugfile=/var/log/pacemaker_remote_lxc$c.log END chmod 711 lxc$c-filesystem/launch-helper - cat << END >> /etc/hosts -$prefix.$subnet.$suffix lxc$c -END + add_hosts_entry $cip lxc$c done + # Create CIB fragment for a master-slave resource rm -f lxc-ms.cib cat << END >> lxc-ms.cib @@ -253,8 +356,7 @@ apply_cib_master() export CIB_file=cur.cib cibadmin -o resources -Mc -x lxc-ms.cib - for tmp in $(ls lxc*.xml); do - tmp=$(echo $tmp | sed -e 's/\.xml//g') + for tmp in $(ls lxc*.xml | sed -e 's/\.xml//g'); do echo "" > tmp_constraint cibadmin -o constraints -Mc -x tmp_constraint done @@ -262,14 +364,12 @@ apply_cib_master() cibadmin -B unset CIB_file - cibadmin --replace --xml-file cur.cib + cibadmin --replace -o configuration --xml-file cur.cib rm -f cur.cib } apply_cib_entries() { - node=$(crm_node -n) - cibadmin -Q > cur.cib export CIB_file=cur.cib for tmp in $(ls container*.cib); do @@ -278,7 +378,7 @@ apply_cib_entries() remote_node=$(cat ${tmp} | grep remote-node | sed -n -e 's/^.*value=\"\(.*\)\".*/\1/p') if [ $anywhere -eq 0 ]; then tmp=$(echo $tmp | sed -e 's/\.cib//g') - crm_resource -M -r $tmp -H $node + crm_resource -M -r $tmp -H $(this_node) fi echo "" > tmp_constraint # it's fine if applying this constraint fails. it's just to help with cts @@ -298,18 +398,16 @@ apply_cib_entries() unset CIB_file - cibadmin --replace --xml-file cur.cib + cibadmin --replace -o configuration --xml-file cur.cib rm -f cur.cib } restore_cib() { - node=$(crm_node -n) cibadmin -Q > cur.cib export CIB_file=cur.cib - for tmp in $(ls lxc*.xml); do - tmp=$(echo $tmp | sed -e 's/\.xml//g') + for tmp in $(ls lxc*.xml | sed -e 's/\.xml//g'); do echo "" > tmp_constraint cibadmin -o constraints -D -x tmp_constraint echo "" > tmp_constraint @@ -325,85 +423,104 @@ restore_cib() for tmp in $(ls container*.cib); do tmp=$(echo $tmp | sed -e 's/\.cib//g') - crm_resource -U -r $tmp -H $node + crm_resource -U -r $tmp -H $(this_node) crm_resource -D -r $tmp -t primitive done # Make sure the version changes even if the content doesn't cibadmin -B unset CIB_file - cibadmin --replace --xml-file cur.cib + cibadmin --replace -o configuration --xml-file cur.cib rm -f cur.cib -} -restore_libvirt() -{ - for tmp in $(ls lxc*.xml); do - tmp=$(echo $tmp | sed -e 's/\.xml//g') - virsh -c lxc:/// destroy $tmp > /dev/null 2>&1 - virsh -c lxc:/// undefine $tmp > /dev/null 2>&1 + # Allow the cluster to stabilize before continuing + crm_resource --wait - sed -i.bak "/...\....\....\..* ${tmp}/d" /etc/hosts - echo "$tmp destroyed" + # Purge nodes from caches and CIB status section + for tmp in $(ls lxc*.xml | sed -e 's/\.xml//g'); do + crm_node --force --remove $tmp done +} - ls restore_default.xml > /dev/null 2>&1 - if [ $? -eq 0 ]; then - virsh net-destroy default > /dev/null 2>&1 - virsh net-undefine default > /dev/null 2>&1 +restore_network() +{ + NODE="$1" + + ssh $SSH_CMD_OPTS $NODE <<-EOF + cd $working_dir + for tmp in \$(ls lxc*.xml | sed -e 's/\.xml//g'); do + virsh -c lxc:/// destroy \$tmp >/dev/null 2>&1 + virsh -c lxc:/// undefine \$tmp >/dev/null 2>&1 + sed -i.bak "/...\....\....\..* \${tmp}/d" /etc/hosts + done + virsh net-destroy default >/dev/null 2>&1 + virsh net-undefine default >/dev/null 2>&1 + if [ -f restore_default.xml ]; then virsh net-define restore_default.xml virsh net-start default - if [ $? -eq 0 ]; then - echo "default network restored" - fi + rm restore_default.xml fi - rm -f restore_default.xml > /dev/null 2>&1 +EOF + echo "Containers destroyed and default network restored on $NODE" } -distribute_configs() +restore_libvirt() +{ + restore_network $(this_node) + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + restore_network $node + done + fi +} + +restore_files() { - nodes=`crm_node -l | awk '{print $2}'` - for node in $nodes; do - ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o BatchMode=yes -l root $node mkdir -p /$working_dir - rsync -ave 'ssh -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o StrictHostKeyChecking=no' $working_dir/lxc*.xml $node:/$working_dir - rsync -ave 'ssh -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o StrictHostKeyChecking=no' $working_dir/lxc*-filesystem $node:/$working_dir - done + ls | grep -v "lxc.\.xml" | xargs rm -rf + if [ $share_configs -eq 1 ]; then + for node in $(other_nodes); do + ssh $SSH_CMD_OPTS $node rm -rf \ + $working_dir/lxc*-filesystem \ + $working_dir/cur_network.xml + done + fi } -mkdir -p $working_dir +make_directory $working_dir cd $working_dir +# Generate files as requested if [ $download -eq 1 ]; then - wget https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/VirtualDomain - chmod 755 VirtualDomain - mv -f VirtualDomain /usr/lib/ocf/resource.d/heartbeat/VirtualDomain -fi -if [ $restore_pcmk -eq 1 ]; then - restore_cib -fi -if [ $restore -eq 1 ]; then - restore_libvirt + download_agent fi if [ $key_gen -eq 1 ]; then generate_key fi if [ $generate -eq 1 ]; then - if [ $key_gen -eq 0 ]; then - generate_key - fi generate fi +if [ $share_configs -eq 1 ]; then + distribute_configs +fi +if [ $generate -eq 1 ]; then + start_network_all +fi + +# Update cluster as requested if [ $cib -eq 1 ]; then apply_cib_entries fi if [ $add_master -eq 1 ]; then apply_cib_master fi -if [ $share_configs -eq 1 ]; then - distribute_configs + +# Restore original state as requested +if [ $restore_pcmk -eq 1 ]; then + restore_cib +fi +if [ $restore -eq 1 ]; then + restore_libvirt fi if [ $restore_all -eq 1 ]; then - ls | grep -v "lxc.\.xml" | xargs rm -rf + restore_files fi - -cd $curdir diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt b/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt index 744e734ef72..2f85501b143 100644 --- a/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt +++ b/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt @@ -48,6 +48,8 @@ SSH-based "devices" sometimes used during testing) is inappropriate. . Create the fencing resource: +pcs -f stonith_cfg stonith create pass:[stonith_id stonith_device_type [stonith_device_options]]+ ++ +Any flags that do not take arguments, such as +--ssl+, should be passed as +ssl=1+. . Enable STONITH in the cluster: `pcs -f stonith_cfg property set stonith-enabled=true` diff --git a/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg b/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg index d8505f58d57..fcbe137cfb4 100644 --- a/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg +++ b/doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg @@ -673,7 +673,7 @@ y="663.41534" x="72.965027" id="tspan4086" - sodipodi:role="line">Build Dependancy + sodipodi:role="line">Build Dependency $@-t \ + && echo '' \ + && echo '' \ + && echo '' + $(AM_V_GEN)mv $@-t $@ +publican-catalog: publican-catalog-fallback + @exec >$@-t \ + && echo '' \ + && echo '' \ + && echo '' \ + && echo '' + $(AM_V_GEN)mv $@-t $@ SHARED_TXT=$(wildcard shared/en-US/*.txt) SHARED_XML=$(SHARED_TXT:%.txt=%.xml) @@ -90,12 +108,27 @@ CFS_XML=$(CFS_TXT:%.txt=%.xml) $(CFS_XML): $(CFS_SHARED_XML) +PUBLICAN_INTREE_DEPS = +if PUBLICAN_INTREE_BRAND +PUBLICAN_INTREE_DEPS += publican-catalog +endif + # We have to hardcode the book name # With '%' the test for 'newness' fails -Clusters_from_Scratch.build: $(PNGS) $(wildcard Clusters_from_Scratch/en-US/*.xml) $(CFS_XML) $(CFS_SHARED_XML) ../xsl +Clusters_from_Scratch.build: $(PNGS) $(wildcard Clusters_from_Scratch/en-US/*.xml) $(CFS_XML) $(CFS_SHARED_XML) $(PUBLICAN_INTREE_DEPS) $(PCMK_V) @echo Building $(@:%.build=%) because of $? rm -rf $(@:%.build=%)/publish/* - $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) $(PCMK_quiet) --brand_dir=../publican-clusterlabs +if PUBLICAN_INTREE_BRAND + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \ + $(PCMK_quiet) +else + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \ + $(PCMK_quiet) +endif rm -rf $(@:%.build=%)/tmp touch $@ @@ -109,10 +142,20 @@ $(PE_XML): $(PE_SHARED_XML) # We have to hardcode the book name # With '%' the test for 'newness' fails -Pacemaker_Explained.build: $(PNGS) $(wildcard Pacemaker_Explained/en-US/*.xml) $(PE_XML) $(PE_SHARED_XML) ../xsl +Pacemaker_Explained.build: $(PNGS) $(wildcard Pacemaker_Explained/en-US/*.xml) $(PE_XML) $(PE_SHARED_XML) $(PUBLICAN_INTREE_DEPS) $(PCMK_V) @echo Building $(@:%.build=%) because of $? rm -rf $(@:%.build=%)/publish/* - $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) $(PCMK_quiet) --brand_dir=../publican-clusterlabs +if PUBLICAN_INTREE_BRAND + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \ + $(PCMK_quiet) +else + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \ + $(PCMK_quiet) +endif rm -rf $(@:%.build=%)/tmp touch $@ @@ -122,10 +165,20 @@ PR_XML=$(PR_TXT:%.txt=%.xml) # We have to hardcode the book name # With '%' the test for 'newness' fails -Pacemaker_Remote.build: $(PNGS) $(wildcard Pacemaker_Remote/en-US/*.xml) $(PR_XML) ../xsl +Pacemaker_Remote.build: $(PNGS) $(wildcard Pacemaker_Remote/en-US/*.xml) $(PR_XML) $(PUBLICAN_INTREE_DEPS) $(PCMK_V) @echo Building $(@:%.build=%) because of $? rm -rf $(@:%.build=%)/publish/* - $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) $(PCMK_quiet) --brand_dir=../publican-clusterlabs +if PUBLICAN_INTREE_BRAND + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \ + $(PCMK_quiet) +else + $(AM_V_PUB)cd $(@:%.build=%) \ + && RPM_BUILD_DIR="" \ + $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \ + $(PCMK_quiet) +endif rm -rf $(@:%.build=%)/tmp touch $@ @@ -201,6 +254,7 @@ if BUILD_DOCBOOK endif clean-local: - -rm -rf $(generated_docs) $(generated_mans) $(docbook_build) ../xsl $(generated_PNGS) + -rm -rf $(generated_docs) $(generated_mans) $(docbook_build) $(generated_PNGS) -rm -rf $(SHARED_XML) $(CFS_XML) $(PE_XML) $(PR_XML) + -rm -rf publican-catalog-fallback publican-catalog for book in $(docbook); do rm -rf $$book/tmp $$book/publish; done diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt index 1aaf53b6ae3..890bc134905 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt @@ -92,7 +92,7 @@ to set the +remote-tls-port+ (encrypted) or +remote-clear-port+ By default, recurring actions are scheduled relative to when the resource started. So if your resource was last started at 14:32 and you have a backup set to be performed every 24 hours, then the backup -will always run at in the middle of the business day -- hardly +will always run in the middle of the business day -- hardly desirable. To specify a date and time that the operation should be relative to, set diff --git a/doc/Pacemaker_Explained/en-US/Ch-Basics.txt b/doc/Pacemaker_Explained/en-US/Ch-Basics.txt index 5134e69a2c8..8d802159765 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Basics.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Basics.txt @@ -177,9 +177,9 @@ query and replace just that section to avoid modifying any others. .Safely using an editor to modify only the resources section ====== -------- -# cibadmin --query --obj_type resources > tmp.xml +# cibadmin --query --scope resources > tmp.xml # vi tmp.xml -# cibadmin --replace --obj_type resources --xml-file tmp.xml +# cibadmin --replace --scope resources --xml-file tmp.xml -------- ====== diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 43c28f01b45..ff5db377e95 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -9,10 +9,9 @@ Practically everything from moving a resource to deciding which resource to stop in a degraded cluster is achieved by manipulating scores in some way. -Scores are calculated on a per-resource basis, and any node with a -negative score for a resource can't run that resource. After -calculating the scores for a resource, the cluster then chooses the -node with the highest one. +Scores are calculated per resource and node. Any node with a +negative score for a resource can't run that resource. The cluster +places a resource on the node with the highest score for it. === Infinity Math === @@ -43,11 +42,13 @@ the score (possibly as part of a custom resource agent). indexterm:[Location Constraints] indexterm:[Resource,Constraints,Location] -There are two alternative strategies for specifying which nodes a -resources can run on. One way is to say that by default they can run -anywhere and then create location constraints for nodes that are not -allowed. The other option is to have nodes "opt-in" -- to start with -nothing able to run anywhere and selectively enable allowed nodes. +'Location constraints' tell the cluster which nodes a resource can run on. + +There are two alternative strategies. One way is to say that, by default, +resources can run anywhere, and then the location constraints specify nodes +that are not allowed (an 'opt-out' cluster). The other way is to start with +nothing able to run anywhere, and use location constraints to selectively +enable allowed nodes (an 'opt-in' cluster). Whether you should choose opt-in or opt-out depends on your personal preference and the make-up of your cluster. If most of your @@ -58,7 +59,7 @@ configuration might be simpler. === Location Properties === -.Properties for Simple Location Constraints +.Properties of a rsc_location Constraint [width="95%",cols="2m,1,5>). +'and' in a specific order, you need both an ordering constraint 'and' +a colocation constraint (see <>), or +alternatively, a group (see <>). ==== === Ordering Properties === -.Properties of an Ordering Constraint +.Properties of a rsc_order Constraint [width="95%",cols="1m,1,4>.] -Think about it: You can't place A relative to B unless you know where B is. +resources are assigned to a node. Think about it: You can't place A relative to +B unless you know where B is. footnote:[ While the human brain is sophisticated enough to read the constraint in any order and choose the correct one depending on the situation, @@ -345,9 +357,18 @@ deciding which node to choose for B. For a detailed look at exactly how this occurs, see http://clusterlabs.org/doc/Colocation_Explained.pdf[Colocation Explained]. +[IMPORTANT] +==== +Colocation constraints affect 'only' the placement of resources; they do 'not' +require that the resources be started in a particular order. If you want +resources to be started on the same node 'and' in a specific order, you need +both an ordering constraint (see <>) 'and' a colocation +constraint, or alternatively, a group (see <>). +==== + === Colocation Properties === -.Properties of a Colocation Constraint +.Properties of a rsc_colocation Constraint [width="95%",cols="2m,5<",options="header",align="center"] |========================================================= @@ -437,6 +458,81 @@ mandatory. ==== +[[s-resource-sets]] +== Resource Sets == + +'Resource sets' allow multiple resources to be affected by a single constraint. + +.A set of 3 resources +==== +[source,XML] +---- + + + + + +---- +==== + +Resource sets are valid inside +rsc_location+, ++rsc_order+ (see <>), ++rsc_colocation+ (see <>), +and +rsc_ticket+ (see <>) constraints. + +A resource set has a number of properties that can be set, +though not all have an effect in all contexts. + +.Properties of a resource_set +[width="95%",cols="2m,1,5 - - - + + + ------- ====== -To make things easier, we allow an alternate form of colocation -constraints using +resource_set+. As with the chained version, a +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 +C+ is not -able to run, then both +B+ and by inference +A+ must also remain +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+: .Equivalent colocation chain expressed using +resource_set+ @@ -638,10 +746,11 @@ stopped. Here is an example +resource_set+: ------- ====== -[WARNING] +[IMPORTANT] ========= -Always pay attention to how your tools expose this functionality. -In some tools +create set A B+ is 'not' equivalent to +create A with B+. +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 @@ -650,7 +759,7 @@ have no dependencies on each other. In this scenario, unlike the previous, +B+ 'would' be allowed to remain active even if +A+ or +C+ (or both) were inactive. -.Using colocation sets to specify a common peer +.Using colocated sets to specify a common peer ====== [source,XML] ------- @@ -669,6 +778,12 @@ both) were inactive. ------- ====== +[IMPORTANT] +==== +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. The only thing that matters is that in order for any member of one set in the constraint to be active, all members of sets listed after it must also @@ -703,3 +818,8 @@ must be in using the set's +role+ attribute. .Visual representation of a colocation chain where the members of the middle set have no inter-dependencies image::images/three-sets-complex.png["Colocation chain",width="16cm",height="9cm",align="center"] + +[NOTE] +==== +Unlike ordered sets, colocated sets do not use the +require-all+ option. +==== diff --git a/doc/Pacemaker_Explained/en-US/Ch-Multi-site-Clusters.txt b/doc/Pacemaker_Explained/en-US/Ch-Multi-site-Clusters.txt index 5ca6cd0c403..786e9854d45 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Multi-site-Clusters.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Multi-site-Clusters.txt @@ -160,7 +160,8 @@ demoted to slave mode if +ticketA+ is revoked: ==== You can create multiple `rsc_ticket` constraints to let multiple resources -depend on the same ticket. However, `rsc_ticket` also supports resource sets, +depend on the same ticket. However, `rsc_ticket` also supports resource sets +(see <>), so one can easily list all the resources in one `rsc_ticket` constraint instead. .Ticket constraint for multiple resources diff --git a/doc/Pacemaker_Explained/en-US/Ch-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Options.txt index d7afb61e479..0c1a2e7620a 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Options.txt @@ -208,6 +208,11 @@ shot? If you value your data, set up a STONITH device and enable this. If true, or unset, the cluster will refuse to start resources unless one or more STONITH resources have been configured. +If false, unresponsive nodes are immediately assumed to be running no +resources, and resource takeover to online nodes starts without any +further protection (which means _data loss_ if the unresponsive node +still accesses shared storage, for example). See also the +requires+ +meta-attribute in <>. | stonith-action | reboot | indexterm:[stonith-action,Cluster Option] diff --git a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt index 80439e6a1e6..9453954d8e1 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt @@ -519,7 +519,7 @@ but moderate. The minimum timeouts should never be below 10 seconds. Location to store the resource state in. State file - + @@ -611,6 +611,8 @@ you need to add a +monitor+ operation to the resource's definition. |interval |0 |How frequently (in seconds) to perform the operation. A value of 0 means never. + A positive value defines a 'recurring action', which is typically used with + <>. indexterm:[interval,Action Property] indexterm:[Action,Property,interval] @@ -637,8 +639,12 @@ indexterm:[Action,Property,on-fail] |enabled |TRUE -|If +false+, the operation is treated as if it does not exist. Allowed - values: +true+, +false+ +|If +false+, ignore this operation definition. This is typically used to pause + a particular recurring monitor operation; for instance, it can complement + the respective resource being unmanaged (+is-managed=false+), as this alone + will <>. + Disabling the operation does not suppress all actions of the given type. + Allowed values: +true+, +false+. indexterm:[enabled,Action Property] indexterm:[Action,Property,enabled] @@ -662,6 +668,7 @@ indexterm:[Action,Property,on-fail] |========================================================= +[[s-resource-monitoring]] === Monitoring Resources for Failure === When Pacemaker first starts a resource, it runs one-time monitor operations @@ -684,6 +691,7 @@ it thinks 'should' be running the resource, and the second monitor on any nodes that it thinks 'should not' be running the resource (for the truly paranoid, who want to know when an administrator manually starts a service by mistake). +[[s-monitoring-unmanaged]] === Monitoring Resources When Administration is Disabled === Recurring monitor operations behave differently under various administrative diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg index ac5455799e3..eeb8dead732 100644 --- a/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg +++ b/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg @@ -739,7 +739,7 @@ y="601.2132" x="31.496872" id="tspan4086" - sodipodi:role="line">Build Dependancy + sodipodi:role="line">Build Dependency - + diff --git a/doc/publican-clusterlabs/xsl/html.xsl b/doc/publican-clusterlabs/xsl/html.xsl index 62f87282078..c4c44218a10 100644 --- a/doc/publican-clusterlabs/xsl/html.xsl +++ b/doc/publican-clusterlabs/xsl/html.xsl @@ -19,7 +19,7 @@ - + diff --git a/doc/publican-clusterlabs/xsl/pdf.xsl b/doc/publican-clusterlabs/xsl/pdf.xsl index 5d2f25c3392..9690ecca877 100644 --- a/doc/publican-clusterlabs/xsl/pdf.xsl +++ b/doc/publican-clusterlabs/xsl/pdf.xsl @@ -19,7 +19,7 @@ - + diff --git a/extra/pcmk_notify_sample.sh b/extra/alerts/pcmk_alert_sample.sh similarity index 71% rename from extra/pcmk_notify_sample.sh rename to extra/alerts/pcmk_alert_sample.sh index 83cf8e93557..f6ca070a18f 100755 --- a/extra/pcmk_notify_sample.sh +++ b/extra/alerts/pcmk_alert_sample.sh @@ -21,9 +21,14 @@ if [ -z $CRM_notify_version ]; then exit 0 fi +tstamp=`printf "%04d. " "$CRM_notify_node_sequence"` +if [ ! -z $CRM_notify_timestamp ]; then + tstamp="${tstamp} $CRM_notify_timestamp (`date "+%H:%M:%S.%06N"`): " +fi + case $CRM_notify_kind in node) - echo "Node '${CRM_notify_node}' is now '${CRM_notify_desc}'" >> ${CRM_notify_recipient} + echo "${tstamp}Node '${CRM_notify_node}' is now '${CRM_notify_desc}'" >> ${CRM_notify_recipient} ;; fencing) # Other keys: @@ -32,7 +37,7 @@ case $CRM_notify_kind in # CRM_notify_task # CRM_notify_rc # - echo "Fencing ${CRM_notify_desc}" >> ${CRM_notify_recipient} + echo "${tstamp}Fencing ${CRM_notify_desc}" >> ${CRM_notify_recipient} ;; resource) # Other keys: @@ -56,12 +61,12 @@ case $CRM_notify_kind in case ${CRM_notify_desc} in Cancelled) ;; *) - echo "Resource operation '${CRM_notify_task}${CRM_notify_interval}' for '${CRM_notify_rsc}' on '${CRM_notify_node}': ${CRM_notify_desc}${CRM_notify_target_rc}" >> ${CRM_notify_recipient} + echo "${tstamp}Resource operation '${CRM_notify_task}${CRM_notify_interval}' for '${CRM_notify_rsc}' on '${CRM_notify_node}': ${CRM_notify_desc}${CRM_notify_target_rc}" >> ${CRM_notify_recipient} ;; esac ;; *) - echo "Unhandled $CRM_notify_kind notification" >> ${CRM_notify_recipient} + echo "${tstamp}Unhandled $CRM_notify_kind notification" >> ${CRM_notify_recipient} env | grep CRM_notify >> ${CRM_notify_recipient} ;; diff --git a/extra/pcmk_snmp_helper.sh b/extra/alerts/pcmk_snmp_helper.sh old mode 100644 new mode 100755 similarity index 100% rename from extra/pcmk_snmp_helper.sh rename to extra/alerts/pcmk_snmp_helper.sh diff --git a/extra/cluster-init b/extra/cluster-init index 9cc1e731b0c..685c59cc032 100755 --- a/extra/cluster-init +++ b/extra/cluster-init @@ -151,7 +151,7 @@ done if [ ! -z $cluster ]; then host_input="-g $cluster" # use the last digit present in the variable (if any) - dsh_group=`echo $cluster | sed 's/[^0-9]\+//g;s/.*\([0-9]\)$/\1/'` + dsh_group=`echo $cluster | sed 's/[^0-9][^0-9]*//g;s/.*\([0-9]\)$/\1/'` fi if [ -z $dsh_group ]; then diff --git a/extra/resources/ClusterMon b/extra/resources/ClusterMon index 884910fac57..8efdf1beae8 100644 --- a/extra/resources/ClusterMon +++ b/extra/resources/ClusterMon @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # # ClusterMon OCF RA. diff --git a/extra/resources/Dummy b/extra/resources/Dummy index 8a38ef57504..5a34ff031d6 100644 --- a/extra/resources/Dummy +++ b/extra/resources/Dummy @@ -63,7 +63,7 @@ but moderate. The minimum timeouts should never be below 10 seconds. Location to store the resource state in. State file - + @@ -126,18 +126,18 @@ END dummy_start() { dummy_monitor - if [ $? = $OCF_SUCCESS ]; then + if [ $? -eq $OCF_SUCCESS ]; then return $OCF_SUCCESS fi - touch ${OCF_RESKEY_state} + touch "${OCF_RESKEY_state}" } dummy_stop() { dummy_monitor - if [ $? = $OCF_SUCCESS ]; then + if [ $? -eq $OCF_SUCCESS ]; then rm ${OCF_RESKEY_state} fi - rm -f ${VERIFY_SERIALIZED_FILE} + rm -f "${VERIFY_SERIALIZED_FILE}" return $OCF_SUCCESS } @@ -146,25 +146,22 @@ dummy_monitor() { # (SUCCESS), failed (ERROR) or _cleanly_ stopped (NOT RUNNING). # That is THREE states, not just yes/no. - if [ "$OCF_RESKEY_op_sleep" -ne "0" ]; then - if [ -f ${VERIFY_SERIALIZED_FILE} ]; then + if [ $OCF_RESKEY_op_sleep -ne 0 ]; then + if [ -f "${VERIFY_SERIALIZED_FILE}" ]; then # two monitor ops have occurred at the same time. # this is to verify a condition in the lrmd regression tests. ocf_log err "$VERIFY_SERIALIZED_FILE exists already" return $OCF_ERR_GENERIC fi - touch ${VERIFY_SERIALIZED_FILE} + touch "${VERIFY_SERIALIZED_FILE}" sleep ${OCF_RESKEY_op_sleep} - rm ${VERIFY_SERIALIZED_FILE} + rm "${VERIFY_SERIALIZED_FILE}" fi - if [ -f ${OCF_RESKEY_state} ]; then + if [ -f "${OCF_RESKEY_state}" ]; then return $OCF_SUCCESS fi - if false ; then - return $OCF_ERR_GENERIC - fi return $OCF_NOT_RUNNING } @@ -173,7 +170,7 @@ dummy_validate() { # Is the state directory writable? state_dir=`dirname "$OCF_RESKEY_state"` touch "$state_dir/$$" - if [ $? != 0 ]; then + if [ $? -ne 0 ]; then return $OCF_ERR_ARGS fi rm "$state_dir/$$" @@ -184,16 +181,14 @@ dummy_validate() { : ${OCF_RESKEY_fake=dummy} : ${OCF_RESKEY_op_sleep=0} : ${OCF_RESKEY_CRM_meta_interval=0} -: ${OCF_RESKEY_CRM_meta_globally_unique:="true"} +: ${OCF_RESKEY_CRM_meta_globally_unique:="false"} + +if [ -z "$OCF_RESKEY_state" ]; then + OCF_RESKEY_state="${HA_VARRUN%%/}/Dummy-${OCF_RESOURCE_INSTANCE}.state" -if [ "x$OCF_RESKEY_state" = "x" ]; then if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then - state="${HA_VARRUN}/Dummy-${OCF_RESOURCE_INSTANCE}.state" - - # Strip off the trailing clone marker - OCF_RESKEY_state=`echo $state | sed s/:[0-9][0-9]*\.state/.state/` - else - OCF_RESKEY_state="${HA_VARRUN}/Dummy-${OCF_RESOURCE_INSTANCE}.state" + # Strip off the trailing clone marker (note + is not portable in sed) + OCF_RESKEY_state=`echo $OCF_RESKEY_state | sed s/:[0-9][0-9]*\.state/.state/` fi fi VERIFY_SERIALIZED_FILE="${OCF_RESKEY_state}.serialized" @@ -208,7 +203,7 @@ monitor) dummy_monitor;; migrate_to) ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrate_target}." dummy_stop ;; -migrate_from) ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrate_source}." +migrate_from) ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} from ${OCF_RESKEY_CRM_meta_migrate_source}." dummy_start ;; reload) ocf_log err "Reloading..." @@ -225,4 +220,3 @@ esac rc=$? ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" exit $rc - diff --git a/extra/resources/HealthCPU b/extra/resources/HealthCPU index 1ceaa01bbca..32a10ad3e70 100644 --- a/extra/resources/HealthCPU +++ b/extra/resources/HealthCPU @@ -62,7 +62,7 @@ Systhem health agent that measures the CPU idling and updates the #health-cpu at Location to store the resource state in. State file - + @@ -180,16 +180,16 @@ dummy_validate() { } : ${OCF_RESKEY_CRM_meta_interval=0} -: ${OCF_RESKEY_CRM_meta_globally_unique:="true"} +: ${OCF_RESKEY_CRM_meta_globally_unique:="false"} if [ "x$OCF_RESKEY_state" = "x" ]; then if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then - state="${HA_VARRUN}/Dummy-${OCF_RESOURCE_INSTANCE}.state" + state="${HA_VARRUN%%/}/Dummy-${OCF_RESOURCE_INSTANCE}.state" # Strip off the trailing clone marker OCF_RESKEY_state=`echo $state | sed s/:[0-9][0-9]*\.state/.state/` else - OCF_RESKEY_state="${HA_VARRUN}/Dummy-${OCF_RESOURCE_INSTANCE}.state" + OCF_RESKEY_state="${HA_VARRUN%%/}/Dummy-${OCF_RESOURCE_INSTANCE}.state" fi fi diff --git a/extra/resources/HealthSMART b/extra/resources/HealthSMART index 3747bfa25ed..9eee059fa1f 100644 --- a/extra/resources/HealthSMART +++ b/extra/resources/HealthSMART @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # # HealthSMART OCF RA. Checks the S.M.A.R.T. status of all given @@ -60,7 +60,7 @@ updates the #health-smart attribute. Location to store the resource state in. State file - + @@ -297,12 +297,12 @@ HealthSMART_validate() { if [ "x$OCF_RESKEY_state" = "x" ]; then if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then - state="${HA_VARRUN}/HealthSMART-${OCF_RESOURCE_INSTANCE}.state" + state="${HA_VARRUN%%/}/HealthSMART-${OCF_RESOURCE_INSTANCE}.state" # Strip off the trailing clone marker OCF_RESKEY_state=`echo $state | sed s/:[0-9][0-9]*\.state/.state/` else - OCF_RESKEY_state="${HA_VARRUN}/HealthSMART-${OCF_RESOURCE_INSTANCE}.state" + OCF_RESKEY_state="${HA_VARRUN%%/}/HealthSMART-${OCF_RESOURCE_INSTANCE}.state" fi fi diff --git a/extra/resources/Stateful b/extra/resources/Stateful index 2ae65add686..23526c93fb8 100644 --- a/extra/resources/Stateful +++ b/extra/resources/Stateful @@ -54,7 +54,7 @@ This is an example resource agent that impliments two states Location to store the resource state in State file - + @@ -184,16 +184,16 @@ stateful_validate() { : ${master_score=10} : ${OCF_RESKEY_CRM_meta_interval=0} -: ${OCF_RESKEY_CRM_meta_globally_unique:="true"} +: ${OCF_RESKEY_CRM_meta_globally_unique:="false"} if [ "x$OCF_RESKEY_state" = "x" ]; then if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then - state="${HA_VARRUN}/Stateful-${OCF_RESOURCE_INSTANCE}.state" + state="${HA_VARRUN%%/}/Stateful-${OCF_RESOURCE_INSTANCE}.state" # Strip off the trailing clone marker OCF_RESKEY_state=`echo $state | sed s/:[0-9][0-9]*\.state/.state/` else - OCF_RESKEY_state="${HA_VARRUN}/Stateful-${OCF_RESOURCE_INSTANCE}.state" + OCF_RESKEY_state="${HA_VARRUN%%/}/Stateful-${OCF_RESOURCE_INSTANCE}.state" fi fi diff --git a/extra/resources/SysInfo b/extra/resources/SysInfo index 3b35ce66dff..81af0bba722 100644 --- a/extra/resources/SysInfo +++ b/extra/resources/SysInfo @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # # SysInfo OCF Resource Agent @@ -146,7 +146,11 @@ UpdateStat() { name=$1; shift value="$*" printf "%s:\t%s\n" "$name" "$value" - ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n $name -v "$value" + if [ "$__OCF_ACTION" = "start" ] ; then + ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n $name -B "$value" + else + ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n $name -v "$value" + fi } SysInfoStats() { @@ -323,11 +327,13 @@ if [ $# -ne 1 ]; then exit $OCF_ERR_ARGS fi -: ${OCF_RESKEY_pidfile:="$HA_VARRUN/SysInfo-${OCF_RESOURCE_INSTANCE}"} +: ${OCF_RESKEY_pidfile:="${HA_VARRUN%%/}/SysInfo-${OCF_RESOURCE_INSTANCE}"} : ${OCF_RESKEY_disk_unit:="G"} : ${OCF_RESKEY_clone:="0"} if [ x != x${OCF_RESKEY_delay} ]; then OCF_RESKEY_delay="-d ${OCF_RESKEY_delay}" +else + OCF_RESKEY_delay="-d 0" fi MIN_FREE="" if [ -n "$OCF_RESKEY_min_disk_free" ]; then diff --git a/extra/resources/ifspeed b/extra/resources/ifspeed index 00edbc375dd..a9390dc312f 100644 --- a/extra/resources/ifspeed +++ b/extra/resources/ifspeed @@ -123,7 +123,6 @@ Log what have been done more verbosely. - @@ -134,7 +133,7 @@ END usage() { cat < PID file PID file - + @@ -142,7 +142,6 @@ Enables to use default attrd_updater verbose logging on every call. - @@ -219,6 +218,15 @@ ping_validate() { exit $OCF_ERR_CONFIGURED fi + # For fping allow only same IP versions or hostnames + if use_fping; then + hosts_family + if [ $? -eq 99 ]; then + ocf_log err "host_list can contain only host with same IP versions for fping" + exit $OCF_ERR_CONFIGURED + fi + fi + check_binary ping return $OCF_SUCCESS @@ -226,6 +234,13 @@ ping_validate() { fping_check() { + p_exe=fping + hosts_family + case $? in + 6) p_exe=fping6 ;; + 99) ocf_log err "Ambiguous IP versions in host_list: '$OCF_RESKEY_host_list'"; exit $OCF_ERR_CONFIGURED;; + esac + active=0 f_out=`mktemp` f_err=`mktemp` @@ -233,7 +248,7 @@ fping_check() { n=$OCF_RESKEY_attempts timeout=`expr $OCF_RESKEY_timeout \* 1000 / $OCF_RESKEY_attempts` - cmd="fping -r $OCF_RESKEY_attempts -t $timeout -B 1.0 $OCF_RESKEY_options $OCF_RESKEY_host_list" + cmd="$p_exe -r $OCF_RESKEY_attempts -t $timeout -B 1.0 $OCF_RESKEY_options $OCF_RESKEY_host_list" $cmd>$f_out 2>$f_err; rc=$? active=`grep alive $f_out|wc -l` @@ -282,7 +297,7 @@ ping_check() { ping_update() { - if ocf_is_true "$OCF_RESKEY_use_fping" && have_binary fping; then + if use_fping; then fping_check active=$? else @@ -291,7 +306,11 @@ ping_update() { fi score=`expr $active \* $OCF_RESKEY_multiplier` - attrd_updater -n $OCF_RESKEY_name -v $score -d $OCF_RESKEY_dampen $attrd_options + if [ "$__OCF_ACTION" = "start" ] ; then + attrd_updater -n $OCF_RESKEY_name -B $score -d $OCF_RESKEY_dampen $attrd_options + else + attrd_updater -n $OCF_RESKEY_name -v $score -d $OCF_RESKEY_dampen $attrd_options + fi rc=$? case $rc in 0) ping_conditional_log debug "Updated $OCF_RESKEY_name = $score" ;; @@ -308,6 +327,39 @@ ping_update() { return 0 } +use_fping() { + ocf_is_true "$OCF_RESKEY_use_fping" && have_binary fping; +} + +# return values: +# 4 IPv4 +# 6 IPv6 +# 0 indefinite (i.e. hostname) +host_family() { + case $1 in + *[0-9].*[0-9].*[0-9].*[0-9]) return 4 ;; + *:*) return 6 ;; + *) return 0 ;; + esac +} + +# return values same as host_family plus +# 99 ambiguous families +hosts_family() { + # For fping allow only same IP versions or hostnames + family=0 + for host in $OCF_RESKEY_host_list; do + host_family $host + f=$? + if [ $family -ne 0 -a $f -ne 0 -a $f -ne $family ] ; then + family=99 + break + fi + [ $f -ne 0 ] && family=$f + done + return $family +} + : ${OCF_RESKEY_name:="pingd"} : ${OCF_RESKEY_dampen:="5s"} : ${OCF_RESKEY_attempts:="3"} @@ -317,7 +369,7 @@ ping_update() { : ${OCF_RESKEY_use_fping:="1"} : ${OCF_RESKEY_CRM_meta_timeout:="20000"} -: ${OCF_RESKEY_CRM_meta_globally_unique:="true"} +: ${OCF_RESKEY_CRM_meta_globally_unique:="false"} integer=`echo ${OCF_RESKEY_timeout} | egrep -o '[0-9]*'` case ${OCF_RESKEY_timeout} in @@ -345,26 +397,26 @@ elif [ ${OCF_RESKEY_timeout} -gt 1000 ]; then fi if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then - : ${OCF_RESKEY_pidfile:="$HA_VARRUN/ping-${OCF_RESKEY_name}"} + : ${OCF_RESKEY_pidfile:="${HA_VARRUN%%/}/ping-${OCF_RESKEY_name}"} else - : ${OCF_RESKEY_pidfile:="$HA_VARRUN/ping-${OCF_RESOURCE_INSTANCE}"} + : ${OCF_RESKEY_pidfile:="${HA_VARRUN%%/}/ping-${OCF_RESOURCE_INSTANCE}"} fi +# Check the debug option +case "${OCF_RESKEY_debug}" in + true|True|TRUE|1) OCF_RESKEY_debug=true;; + false|False|FALSE|0) OCF_RESKEY_debug=false;; + *) + ocf_log warn "Value for 'debug' is incorrect. Please specify 'true' or 'false' not: ${OCF_RESKEY_debug}" + OCF_RESKEY_debug=false + ;; +esac + attrd_options='-q' -if ocf_is_true ${OCF_RESKEY_debug} ; then +if [ ${OCF_RESKEY_debug} = "true" ]; then attrd_options='' fi -# Check the debug option - case "${OCF_RESKEY_debug}" in - true|True|TRUE|1) OCF_RESKEY_debug=true;; - false|False|FALSE|0) OCF_RESKEY_debug=false;; - *) - ocf_log warn "Value for 'debug' is incorrect. Please specify 'true' or 'false' not: ${OCF_RESKEY_debug}" - OCF_RESKEY_debug=false - ;; - esac - case $__OCF_ACTION in meta-data) meta_data exit $OCF_SUCCESS @@ -372,7 +424,6 @@ meta-data) meta_data start) ping_start;; stop) ping_stop;; monitor) ping_monitor;; -reload) ping_start;; validate-all) ping_validate;; usage|help) ping_usage exit $OCF_SUCCESS diff --git a/extra/resources/pingd b/extra/resources/pingd index 8b20415299f..add152642ed 100644 --- a/extra/resources/pingd +++ b/extra/resources/pingd @@ -89,7 +89,7 @@ It records (in the CIB) the current number of ping nodes (specified in the 'host PID file PID file - + diff --git a/fencing/commands.c b/fencing/commands.c index 5eb6eff3933..bc6f9c00ed7 100644 --- a/fencing/commands.c +++ b/fencing/commands.c @@ -116,6 +116,8 @@ typedef struct async_command_s { /*! If the operation timed out, this is the last signal * we sent to the process to get it to terminate */ int last_timeout_signo; + + stonith_device_t *active_on; } async_command_t; static xmlNode *stonith_construct_async_reply(async_command_t * cmd, const char *output, @@ -252,6 +254,46 @@ create_async_command(xmlNode * msg) return cmd; } +static int +get_action_limit(stonith_device_t * device) +{ + const char *value = NULL; + int action_limit = 1; + + value = g_hash_table_lookup(device->params, STONITH_ATTR_ACTION_LIMIT); + if (value) { + action_limit = crm_parse_int(value, "1"); + if (action_limit == 0) { + /* pcmk_action_limit should not be 0. Enforce it to be 1. */ + action_limit = 1; + } + } + + return action_limit; +} + +static int +get_active_cmds(stonith_device_t * device) +{ + int counter = 0; + GListPtr gIter = NULL; + GListPtr gIterNext = NULL; + + CRM_CHECK(device != NULL, return 0); + + for (gIter = cmd_list; gIter != NULL; gIter = gIterNext) { + async_command_t *cmd = gIter->data; + + gIterNext = gIter->next; + + if (cmd->active_on == device) { + counter++; + } + } + + return counter; +} + static gboolean stonith_device_execute(stonith_device_t * device) { @@ -259,11 +301,16 @@ stonith_device_execute(stonith_device_t * device) const char *action_str = NULL; async_command_t *cmd = NULL; stonith_action_t *action = NULL; + int active_cmds = 0; + int action_limit = 0; CRM_CHECK(device != NULL, return FALSE); - if (device->active_pid) { - crm_trace("%s is still active with pid %u", device->id, device->active_pid); + active_cmds = get_active_cmds(device); + action_limit = get_action_limit(device); + if (action_limit > -1 && active_cmds >= action_limit) { + crm_trace("%s is over its action limit of %d (%u active action%s)", + device->id, action_limit, active_cmds, active_cmds > 1 ? "s" : ""); return TRUE; } @@ -340,7 +387,7 @@ stonith_device_execute(stonith_device_t * device) crm_debug("Operation %s%s%s on %s now running with pid=%d, timeout=%ds", cmd->action, cmd->victim ? " for node " : "", cmd->victim ? cmd->victim : "", device->id, exec_rc, cmd->timeout); - device->active_pid = exec_rc; + cmd->active_on = device; } else { crm_warn("Operation %s%s%s on %s failed: %s (%d)", @@ -873,7 +920,6 @@ status_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pid = 0; mainloop_set_trigger(dev->work); if (rc == 1 /* unknown */ ) { @@ -910,7 +956,6 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pid = 0; mainloop_set_trigger(dev->work); /* If we successfully got the targets earlier, don't disable. */ @@ -1885,8 +1930,9 @@ unfence_cb(GPid pid, int rc, const char *output, gpointer user_data) log_operation(cmd, rc, pid, NULL, output); + cmd->active_on = NULL; + if(dev) { - dev->active_pid = 0; mainloop_set_trigger(dev->work); } else { crm_trace("Device %s does not exist", cmd->device); @@ -1928,10 +1974,11 @@ st_child_done(GPid pid, int rc, const char *output, gpointer user_data) CRM_CHECK(cmd != NULL, return); + cmd->active_on = NULL; + /* The device is ready to do something else now */ device = g_hash_table_lookup(device_list, cmd->device); if (device) { - device->active_pid = 0; if (rc == pcmk_ok && (safe_str_eq(cmd->action, "list") || safe_str_eq(cmd->action, "monitor") || safe_str_eq(cmd->action, "status"))) { @@ -2104,19 +2151,22 @@ stonith_fence(xmlNode * msg) } else { const char *host = crm_element_value(dev, F_STONITH_TARGET); + char *nodename = NULL; if (cmd->options & st_opt_cs_nodeid) { int nodeid = crm_atoi(host, NULL); - crm_node_t *node = crm_get_peer(nodeid, NULL); - if (node) { - host = node->uname; + nodename = stonith_get_peer_name(nodeid); + if (nodename) { + host = nodename; } } /* If we get to here, then self-fencing is implicitly allowed */ get_capable_devices(host, cmd->action, cmd->default_timeout, TRUE, cmd, stonith_fence_get_devices_cb); + + free(nodename); } return -EINPROGRESS; diff --git a/fencing/internal.h b/fencing/internal.h index 6d41e117112..c6d006062fc 100644 --- a/fencing/internal.h +++ b/fencing/internal.h @@ -34,7 +34,6 @@ typedef struct stonith_device_s { /* whether the cluster should automatically unfence nodes with the device */ gboolean automatic_unfencing; guint priority; - guint active_pid; enum st_device_flags flags; @@ -236,8 +235,12 @@ schedule_internal_command(const char *origin, void (*done_cb) (GPid pid, int rc, const char *output, gpointer user_data)); +char *stonith_get_peer_name(unsigned int nodeid); + extern char *stonith_our_uname; extern gboolean stand_alone; extern GHashTable *device_list; extern GHashTable *topology; extern long stonith_watchdog_timeout_ms; + +extern GHashTable *known_peer_names; diff --git a/fencing/main.c b/fencing/main.c index c3edae9cf71..1d50355e9cf 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -62,6 +62,8 @@ gboolean stonith_shutdown_flag = FALSE; qb_ipcs_service_t *ipcs = NULL; xmlNode *local_cib = NULL; +GHashTable *known_peer_names = NULL; + static cib_t *cib_api = NULL; static void *cib_library = NULL; @@ -1083,15 +1085,13 @@ update_cib_cache_cb(const char *event, xmlNode * msg) stonith_enabled_s = crm_element_value(stonith_enabled_xml, XML_NVPAIR_ATTR_VALUE); } - if(daemon_option_enabled(crm_system_name, "watchdog")) { - const char *value = NULL; + if (stonith_enabled_s == NULL || crm_is_true(stonith_enabled_s)) { long timeout_ms = 0; + const char *value = NULL; - if(value == NULL) { - stonith_watchdog_xml = get_xpath_object("//nvpair[@name='stonith-watchdog-timeout']", local_cib, LOG_TRACE); - if (stonith_watchdog_xml) { - value = crm_element_value(stonith_watchdog_xml, XML_NVPAIR_ATTR_VALUE); - } + stonith_watchdog_xml = get_xpath_object("//nvpair[@name='stonith-watchdog-timeout']", local_cib, LOG_TRACE); + if (stonith_watchdog_xml) { + value = crm_element_value(stonith_watchdog_xml, XML_NVPAIR_ATTR_VALUE); } if(value) { @@ -1102,6 +1102,9 @@ update_cib_cache_cb(const char *event, xmlNode * msg) crm_notice("New watchdog timeout %lds (was %lds)", timeout_ms/1000, stonith_watchdog_timeout_ms/1000); stonith_watchdog_timeout_ms = timeout_ms; } + + } else { + stonith_watchdog_timeout_ms = 0; } if (stonith_enabled_s && crm_is_true(stonith_enabled_s) == FALSE) { @@ -1170,6 +1173,10 @@ stonith_cleanup(void) if (ipcs) { qb_ipcs_destroy(ipcs); } + + g_hash_table_destroy(known_peer_names); + known_peer_names = NULL; + crm_peer_destroy(); crm_client_cleanup(); free(stonith_our_uname); @@ -1249,11 +1256,17 @@ static void st_peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *data) { if ((type != crm_status_processes) && !is_set(node->flags, crm_remote_node)) { + xmlNode *query = NULL; + + if (node->id && node->uname) { + g_hash_table_insert(known_peer_names, GUINT_TO_POINTER(node->id), strdup(node->uname)); + } + /* * This is a hack until we can send to a nodeid and/or we fix node name lookups * These messages are ignored in stonith_peer_callback() */ - xmlNode *query = create_xml_node(NULL, "stonith_command"); + query = create_xml_node(NULL, "stonith_command"); crm_xml_add(query, F_XML_TAGNAME, "stonith_command"); crm_xml_add(query, F_TYPE, T_STONITH_NG); @@ -1371,6 +1384,16 @@ main(int argc, char **argv) printf(" \n"); printf(" \n"); + printf(" \n", STONITH_ATTR_ACTION_LIMIT); + printf + (" The maximum number of actions can be performed in parallel on this device\n"); + printf + (" Pengine property concurrent-fencing=true needs to be configured first.\n" + "Then use this to specify the maximum number of actions can be performed in parallel on this device. -1 is unlimited.\n"); + printf(" \n"); + printf(" \n"); + + for (lpc = 0; lpc < DIMOF(actions); lpc++) { printf(" \n", actions[lpc]); printf @@ -1423,6 +1446,7 @@ main(int argc, char **argv) mainloop_add_signal(SIGTERM, stonith_shutdown); crm_peer_init(); + known_peer_names = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free); if (stand_alone == FALSE) { #if SUPPORT_HEARTBEAT @@ -1439,6 +1463,8 @@ main(int argc, char **argv) #endif } + crm_set_status_callback(&st_peer_update_callback); + if (crm_cluster_connect(&cluster) == FALSE) { crm_crit("Cannot sign in to the cluster... terminating"); crm_exit(DAEMON_RESPAWN_STOP); @@ -1475,13 +1501,12 @@ main(int argc, char **argv) stonith_our_uname = strdup("localhost"); } - crm_set_status_callback(&st_peer_update_callback); device_list = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, free_device); topology = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, free_topology_entry); - if(daemon_option_enabled(crm_system_name, "watchdog")) { + if(stonith_watchdog_timeout_ms > 0) { xmlNode *xml; stonith_key_value_t *params = NULL; diff --git a/fencing/remote.c b/fencing/remote.c index 8fa639fc1d1..2394590838e 100644 --- a/fencing/remote.c +++ b/fencing/remote.c @@ -918,6 +918,30 @@ stonith_manual_ack(xmlNode * msg, remote_fencing_op_t * op) return -EINPROGRESS; } +char * +stonith_get_peer_name(unsigned int nodeid) +{ + crm_node_t *node = crm_find_peer(nodeid, NULL); + char *nodename = NULL; + + if (node && node->uname) { + return strdup(node->uname); + + } else if ((nodename = get_node_name(nodeid))) { + return nodename; + + } else { + const char *last_known_name = g_hash_table_lookup(known_peer_names, GUINT_TO_POINTER(nodeid)); + + if (last_known_name) { + crm_debug("Use the last known name %s for nodeid %u", last_known_name, nodeid); + return strdup(last_known_name); + } + } + + return NULL; +} + /*! * \internal * \brief Create a new remote stonith op @@ -999,16 +1023,17 @@ create_remote_stonith_op(const char *client, xmlNode * request, gboolean peer) if (op->call_options & st_opt_cs_nodeid) { int nodeid = crm_atoi(op->target, NULL); - crm_node_t *node = crm_get_peer(nodeid, NULL); + char *nodename = stonith_get_peer_name(nodeid); /* Ensure the conversion only happens once */ op->call_options &= ~st_opt_cs_nodeid; - if (node && node->uname) { + if (nodename) { free(op->target); - op->target = strdup(node->uname); + op->target = nodename; + } else { - crm_warn("Could not expand nodeid '%s' into a host name (%p)", op->target, node); + crm_warn("Could not expand nodeid '%s' into a host name", op->target); } } @@ -1309,7 +1334,7 @@ report_timeout_period(remote_fencing_op_t * op, int op_timeout) const char *call_id = NULL; if (op->call_options & st_opt_sync_call) { - /* There is no reason to report the timeout for a syncronous call. It + /* There is no reason to report the timeout for a synchronous call. It * is impossible to use the reported timeout to do anything when the client * is blocking for the response. This update is only important for * async calls that require a callback to report the results in. */ @@ -1996,6 +2021,7 @@ stonith_fence_history(xmlNode * msg, xmlNode ** output) int rc = 0; const char *target = NULL; xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, msg, LOG_TRACE); + char *nodename = NULL; if (dev) { int options = 0; @@ -2004,10 +2030,10 @@ stonith_fence_history(xmlNode * msg, xmlNode ** output) crm_element_value_int(msg, F_STONITH_CALLOPTS, &options); if (target && (options & st_opt_cs_nodeid)) { int nodeid = crm_atoi(target, NULL); - crm_node_t *node = crm_get_peer(nodeid, NULL); - if (node) { - target = node->uname; + nodename = stonith_get_peer_name(nodeid); + if (nodename) { + target = nodename; } } } @@ -2040,6 +2066,7 @@ stonith_fence_history(xmlNode * msg, xmlNode ** output) } } + free(nodename); return rc; } diff --git a/fencing/standalone_config.h b/fencing/standalone_config.h index 9af97bd9e71..53ff585e8fb 100644 --- a/fencing/standalone_config.h +++ b/fencing/standalone_config.h @@ -3,16 +3,16 @@ * David Vossel * * 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 + * it under the terms of the GNU Lesser 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. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/attrd.h b/include/crm/attrd.h index 5ca2dda6196..cc4c92d300e 100644 --- a/include/crm/attrd.h +++ b/include/crm/attrd.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cib.h b/include/crm/cib.h index 306706e498c..a1246d1b729 100644 --- a/include/crm/cib.h +++ b/include/crm/cib.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cib/internal.h b/include/crm/cib/internal.h index e235831655a..319440eb0e1 100644 --- a/include/crm/cib/internal.h +++ b/include/crm/cib/internal.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cib/util.h b/include/crm/cib/util.h index 9a97bf9cdeb..3b1f61a4c5c 100644 --- a/include/crm/cib/util.h +++ b/include/crm/cib/util.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cluster.h b/include/crm/cluster.h index f9ff5d9ca72..9b623073b82 100644 --- a/include/crm/cluster.h +++ b/include/crm/cluster.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -63,6 +63,9 @@ enum crm_node_flags /* deprecated (not used by cluster) */ crm_remote_container = 0x0002, crm_remote_baremetal = 0x0004, + + /* node's cache entry is dirty */ + crm_node_dirty = 0x0010, }; /* *INDENT-ON* */ @@ -152,6 +155,7 @@ int crm_remote_peer_cache_size(void); /* Initialize and refresh the remote peer cache from a cib config */ void crm_remote_peer_cache_refresh(xmlNode *cib); void crm_remote_peer_cache_add(const char *node_name); +crm_node_t *crm_remote_peer_get(const char *node_name); void crm_remote_peer_cache_remove(const char *node_name); /* allows filtering of remote and cluster nodes using crm_get_peer_flags */ diff --git a/include/crm/cluster/election.h b/include/crm/cluster/election.h index b90b110666e..fb82e44aed0 100644 --- a/include/crm/cluster/election.h +++ b/include/crm/cluster/election.h @@ -2,7 +2,7 @@ * Copyright (C) 2009 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cluster/internal.h b/include/crm/cluster/internal.h index 9da9ccf8d21..7ebe89cc2a5 100644 --- a/include/crm/cluster/internal.h +++ b/include/crm/cluster/internal.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/cluster/plugin.h b/include/crm/cluster/plugin.h index 0d0a9179ea1..4b776b205a4 100644 --- a/include/crm/cluster/plugin.h +++ b/include/crm/cluster/plugin.h @@ -2,7 +2,7 @@ * Copyright (C) 2012 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/io.h b/include/crm/common/io.h index 745a6db6c11..6c34ae4b647 100644 --- a/include/crm/common/io.h +++ b/include/crm/common/io.h @@ -3,16 +3,16 @@ * 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 + * it under the terms of the GNU Lesser 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. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/ipc.h b/include/crm/common/ipc.h index d6ceda23eb5..872225259d9 100644 --- a/include/crm/common/ipc.h +++ b/include/crm/common/ipc.h @@ -2,7 +2,7 @@ * Copyright (C) 2013 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/ipcs.h b/include/crm/common/ipcs.h index d8259124727..2fec93178ae 100644 --- a/include/crm/common/ipcs.h +++ b/include/crm/common/ipcs.h @@ -2,7 +2,7 @@ * Copyright (C) 2013 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/iso8601.h b/include/crm/common/iso8601.h index 6aedc0b83c1..8319f372ef1 100644 --- a/include/crm/common/iso8601.h +++ b/include/crm/common/iso8601.h @@ -2,7 +2,7 @@ * Copyright (C) 2005 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/logging.h b/include/crm/common/logging.h index 2a62b6ee164..b0d3078cbda 100644 --- a/include/crm/common/logging.h +++ b/include/crm/common/logging.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/mainloop.h b/include/crm/common/mainloop.h index 52e7e4844dd..5c4ce2ce55d 100644 --- a/include/crm/common/mainloop.h +++ b/include/crm/common/mainloop.h @@ -2,7 +2,7 @@ * Copyright (C) 2009 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/procfs.h b/include/crm/common/procfs.h index dee0835b75e..626bb655e83 100644 --- a/include/crm/common/procfs.h +++ b/include/crm/common/procfs.h @@ -3,16 +3,16 @@ * 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 + * it under the terms of the GNU Lesser 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. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/util.h b/include/crm/common/util.h index 71821b58084..4affabfd7e6 100644 --- a/include/crm/common/util.h +++ b/include/crm/common/util.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/common/xml.h b/include/crm/common/xml.h index a1adf3d7caf..9e8bbb0428b 100644 --- a/include/crm/common/xml.h +++ b/include/crm/common/xml.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/compatibility.h b/include/crm/compatibility.h index 2016e134795..6b1e8b6430a 100644 --- a/include/crm/compatibility.h +++ b/include/crm/compatibility.h @@ -2,7 +2,7 @@ * Copyright (C) 2012 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/crm.h b/include/crm/crm.h index 537aedf855e..3e3fac3c418 100644 --- a/include/crm/crm.h +++ b/include/crm/crm.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -132,6 +132,7 @@ extern char *crm_system_name; # define CRM_OP_NODES_PROBED "probe_nodes_complete" # define CRM_OP_REPROBE "probe_again" # define CRM_OP_CLEAR_FAILCOUNT "clear_failcount" +# define CRM_OP_REMOTE_STATE "remote_state" # define CRM_OP_RELAXED_SET "one-or-more" # define CRM_OP_RELAXED_CLONE "clone-one-or-more" # define CRM_OP_RM_NODE_CACHE "rm_node_cache" @@ -144,6 +145,7 @@ extern char *crm_system_name; # define CRMD_ACTION_DELETE "delete" # define CRMD_ACTION_CANCEL "cancel" +# define CRMD_ACTION_RELOAD "reload" # define CRMD_ACTION_MIGRATE "migrate_to" # define CRMD_ACTION_MIGRATED "migrate_from" diff --git a/include/crm/error.h b/include/crm/error.h index caf7864c6ae..cfa0cc57d19 100644 --- a/include/crm/error.h +++ b/include/crm/error.h @@ -2,7 +2,7 @@ * Copyright (C) 2012 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/fencing/internal.h b/include/crm/fencing/internal.h index fdd82eea7bb..db4458a345b 100644 --- a/include/crm/fencing/internal.h +++ b/include/crm/fencing/internal.h @@ -2,7 +2,7 @@ * Copyright (C) 2011 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -111,6 +111,7 @@ xmlNode *create_device_registration_xml(const char *id, const char *namespace, c # define STONITH_ATTR_HOSTLIST "pcmk_host_list" # define STONITH_ATTR_HOSTCHECK "pcmk_host_check" # define STONITH_ATTR_DELAY_MAX "pcmk_delay_max" +# define STONITH_ATTR_ACTION_LIMIT "pcmk_action_limit" # define STONITH_ATTR_ACTION_OP "action" diff --git a/include/crm/lrmd.h b/include/crm/lrmd.h index 3296d6b6d64..c21015debd2 100644 --- a/include/crm/lrmd.h +++ b/include/crm/lrmd.h @@ -35,7 +35,7 @@ typedef struct lrmd_key_value_s { struct lrmd_key_value_s *next; } lrmd_key_value_t; -#define LRMD_PROTOCOL_VERSION "1.0" +#define LRMD_PROTOCOL_VERSION "1.1" /* *INDENT-OFF* */ #define DEFAULT_REMOTE_KEY_LOCATION "/etc/pacemaker/authkey" @@ -59,6 +59,7 @@ typedef struct lrmd_key_value_s { #define F_LRMD_EXEC_RC "lrmd_exec_rc" #define F_LRMD_OP_STATUS "lrmd_exec_op_status" #define F_LRMD_TIMEOUT "lrmd_timeout" +#define F_LRMD_WATCHDOG "lrmd_watchdog" #define F_LRMD_CLASS "lrmd_class" #define F_LRMD_PROVIDER "lrmd_provider" #define F_LRMD_TYPE "lrmd_type" @@ -89,6 +90,15 @@ typedef struct lrmd_key_value_s { #define LRMD_OP_RSC_METADATA "lrmd_rsc_metadata" #define LRMD_OP_POKE "lrmd_rsc_poke" #define LRMD_OP_NEW_CLIENT "lrmd_rsc_new_client" +#define LRMD_OP_CHECK "lrmd_check" + +#define LRMD_IPC_OP_NEW "new" +#define LRMD_IPC_OP_DESTROY "destroy" +#define LRMD_IPC_OP_EVENT "event" +#define LRMD_IPC_OP_REQUEST "request" +#define LRMD_IPC_OP_RESPONSE "response" +#define LRMD_IPC_OP_SHUTDOWN_REQ "shutdown_req" +#define LRMD_IPC_OP_SHUTDOWN_ACK "shutdown_ack" #define F_LRMD_IPC_OP "lrmd_ipc_op" #define F_LRMD_IPC_IPC_SERVER "lrmd_ipc_server" diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index a5939916a21..a18776e73d8 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -162,6 +162,9 @@ # define XML_CIB_TAG_OPCONFIG "op_defaults" # define XML_CIB_TAG_RSCCONFIG "rsc_defaults" # define XML_CIB_TAG_ACLS "acls" +# define XML_CIB_TAG_NOTIFICATIONS "alerts" +# define XML_CIB_TAG_NOTIFY "alert" +# define XML_CIB_TAG_NOTIFY_RECIPIENT "recipient" # define XML_CIB_TAG_STATE "node_state" # define XML_CIB_TAG_NODE "node" @@ -253,17 +256,19 @@ # define XML_CIB_ATTR_SHUTDOWN "shutdown" # define XML_CIB_ATTR_STONITH "stonith" +/* LRM is a bit of a misnomer here; the crmd and pengine use these to track + * actions, which usually but not always are LRM operations + */ # define XML_LRM_ATTR_INTERVAL "interval" # define XML_LRM_ATTR_TASK "operation" # define XML_LRM_ATTR_TASK_KEY "operation_key" # define XML_LRM_ATTR_TARGET "on_node" -/*! used for remote nodes. - * For remote nodes the action is routed to the 'on_node' - * node location, and then from there if 'exec_on' is set - * the host will execute the action on the remote node - * it controls. */ -# define XML_LRM_ATTR_ROUTER_NODE "router_node" # define XML_LRM_ATTR_TARGET_UUID "on_node_uuid" +/*! Actions to be executed on Pacemaker Remote nodes are routed through + * crmd on the cluster node hosting the remote connection. That cluster node + * is considered the router node for the action. + */ +# define XML_LRM_ATTR_ROUTER_NODE "router_node" # define XML_LRM_ATTR_RSCID "rsc-id" # define XML_LRM_ATTR_OPSTATUS "op-status" # define XML_LRM_ATTR_RC "rc-code" @@ -287,6 +292,7 @@ # define XML_GRAPH_TAG_RSC_OP "rsc_op" # define XML_GRAPH_TAG_PSEUDO_EVENT "pseudo_event" # define XML_GRAPH_TAG_CRM_EVENT "crm_event" +# define XML_GRAPH_TAG_DOWNED "downed" # define XML_TAG_RULE "rule" # define XML_RULE_ATTR_SCORE "score" @@ -341,6 +347,11 @@ # define XML_CONFIG_ATTR_FORCE_QUIT "shutdown-escalation" # define XML_CONFIG_ATTR_RECHECK "cluster-recheck-interval" +# define XML_NOTIFY_ATTR_PATH "path" +# define XML_NOTIFY_ATTR_TIMEOUT "timeout" +# define XML_NOTIFY_ATTR_TSTAMP_FORMAT "tstamp_format" +# define XML_NOTIFY_ATTR_REC_VALUE "value" + # define XML_CIB_TAG_GENERATION_TUPPLE "generation_tuple" # define XML_ATTR_TRANSITION_MAGIC "transition-magic" diff --git a/include/crm/pengine/Makefile.am b/include/crm/pengine/Makefile.am index 2fdf00c11e6..fa072f7e5c1 100644 --- a/include/crm/pengine/Makefile.am +++ b/include/crm/pengine/Makefile.am @@ -20,4 +20,4 @@ MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/pengine noinst_HEADERS = internal.h -header_HEADERS = common.h complex.h rules.h status.h +header_HEADERS = common.h complex.h remote.h rules.h status.h diff --git a/include/crm/pengine/common.h b/include/crm/pengine/common.h index cc9347a7aa1..334d2e150b9 100644 --- a/include/crm/pengine/common.h +++ b/include/crm/pengine/common.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/pengine/complex.h b/include/crm/pengine/complex.h index c19d52614c2..24d7de220e4 100644 --- a/include/crm/pengine/complex.h +++ b/include/crm/pengine/complex.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/pengine/internal.h b/include/crm/pengine/internal.h index 1d828a20d44..8adae7ca106 100644 --- a/include/crm/pengine/internal.h +++ b/include/crm/pengine/internal.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,13 +11,14 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef PE_INTERNAL__H # define PE_INTERNAL__H # include +# include # define pe_rsc_info(rsc, fmt, args...) crm_log_tag(LOG_INFO, rsc ? rsc->id : "", fmt, ##args) # define pe_rsc_debug(rsc, fmt, args...) crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "", fmt, ##args) @@ -103,7 +104,7 @@ void common_free(resource_t * rsc); extern pe_working_set_t *pe_dataset; -extern node_t *node_copy(node_t * this_node); +extern node_t *node_copy(const node_t *this_node); extern time_t get_effective_time(pe_working_set_t * data_set); extern int get_failcount(node_t * node, resource_t * rsc, time_t *last_failure, pe_working_set_t * data_set); @@ -179,6 +180,7 @@ extern action_t *custom_action(resource_t * rsc, char *key, const char *task, no rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \ optional, TRUE, data_set); +# define reload_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0) # define start_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_START, 0) # define start_action(rsc, node, optional) custom_action( \ rsc, start_key(rsc), CRMD_ACTION_START, node, \ @@ -214,7 +216,7 @@ extern action_t *find_first_action(GListPtr input, const char *uuid, const char extern enum action_tasks get_complex_task(resource_t * rsc, const char *name, gboolean allow_non_atomic); -extern GListPtr find_actions(GListPtr input, const char *key, node_t * on_node); +extern GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node); extern GListPtr find_actions_exact(GListPtr input, const char *key, node_t * on_node); extern GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node); @@ -271,11 +273,6 @@ void trigger_unfencing( void set_bit_recursive(resource_t * rsc, unsigned long long flag); void clear_bit_recursive(resource_t * rsc, unsigned long long flag); -gboolean xml_contains_remote_node(xmlNode *xml); -gboolean is_baremetal_remote_node(node_t *node); -gboolean is_container_remote_node(node_t *node); -gboolean is_remote_node(node_t *node); -resource_t * rsc_contains_remote_node(pe_working_set_t * data_set, resource_t *rsc); gboolean add_tag_ref(GHashTable * tags, const char * tag_name, const char * obj_ref); diff --git a/include/crm/pengine/remote.h b/include/crm/pengine/remote.h new file mode 100644 index 00000000000..cf78184b3fd --- /dev/null +++ b/include/crm/pengine/remote.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2013 Andrew Beekhof + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This software 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 Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef PE_REMOTE__H +# define PE_REMOTE__H + +gboolean xml_contains_remote_node(xmlNode *xml); +gboolean is_baremetal_remote_node(node_t *node); +gboolean is_container_remote_node(node_t *node); +gboolean is_remote_node(node_t *node); +gboolean is_rsc_baremetal_remote_node(resource_t *rsc, pe_working_set_t * data_set); +resource_t * rsc_contains_remote_node(pe_working_set_t * data_set, resource_t *rsc); +void pe_foreach_guest_node(const pe_working_set_t *data_set, const node_t *host, + void (*helper)(const node_t*, void*), void *user_data); + +#endif diff --git a/include/crm/pengine/rules.h b/include/crm/pengine/rules.h index f624570194c..4be6453c385 100644 --- a/include/crm/pengine/rules.h +++ b/include/crm/pengine/rules.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index b95b1e5a56b..d9f2ca50880 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -62,6 +62,7 @@ enum pe_find { # define pe_flag_stonith_enabled 0x00000010ULL # define pe_flag_have_stonith_resource 0x00000020ULL # define pe_flag_enable_unfencing 0x00000040ULL +# define pe_flag_concurrent_fencing 0x00000080ULL # define pe_flag_stop_rsc_orphans 0x00000100ULL # define pe_flag_stop_action_orphans 0x00000200ULL @@ -122,6 +123,9 @@ typedef struct pe_working_set_s { const char *localhost; GHashTable *tags; + int blocked_resources; + int disabled_resources; + } pe_working_set_t; struct node_shared_s { @@ -295,6 +299,8 @@ struct resource_s { const char *isolation_wrapper; gboolean exclusive_discover; int remote_reconnect_interval; + + pe_working_set_t *cluster; }; struct pe_action_s { @@ -392,8 +398,8 @@ enum pe_ordering { pe_order_stonith_stop = 0x2000, /* only applies if the action is non-pseudo */ pe_order_serialize_only = 0x4000, /* serialize */ - pe_order_implies_first_printed = 0x10000, /* Like ..implies_first but only ensures 'first' is printed, not manditory */ - pe_order_implies_then_printed = 0x20000, /* Like ..implies_then but only ensures 'then' is printed, not manditory */ + pe_order_implies_first_printed = 0x10000, /* Like ..implies_first but only ensures 'first' is printed, not mandatory */ + pe_order_implies_then_printed = 0x20000, /* Like ..implies_then but only ensures 'then' is printed, not mandatory */ pe_order_asymmetrical = 0x100000, /* Indicates asymmetrical one way ordering constraint. */ pe_order_load = 0x200000, /* Only relevant if... */ diff --git a/include/crm/services.h b/include/crm/services.h index b8ccae7245b..f0aec289fc7 100644 --- a/include/crm/services.h +++ b/include/crm/services.h @@ -2,7 +2,7 @@ * Copyright (C) 2010 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/include/crm/stonith-ng.h b/include/crm/stonith-ng.h index 3feb016a6a8..d20719075d4 100644 --- a/include/crm/stonith-ng.h +++ b/include/crm/stonith-ng.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm/transition.h b/include/crm/transition.h index ef420207c9f..4572491e582 100644 --- a/include/crm/transition.h +++ b/include/crm/transition.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/include/crm_internal.h b/include/crm_internal.h index e0bbb06639f..69b45896f7b 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -5,16 +5,16 @@ * 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 + * it under the terms of the GNU Lesser 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. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -130,6 +130,7 @@ gboolean check_number(const char *value); gboolean check_quorum(const char *value); gboolean check_script(const char *value); gboolean check_utilization(const char *value); +gboolean check_sbd_timeout(const char *value); /* Shared PE/crmd functionality */ void filter_action_parameters(xmlNode * param_set, const char *version); @@ -263,8 +264,8 @@ void strip_text_nodes(xmlNode * xml); void pcmk_panic(const char *origin); void sysrq_init(void); pid_t pcmk_locate_sbd(void); -int crm_pidfile_inuse(const char *filename, long mypid, const char *daemon); -int crm_read_pidfile(const char *filename); +long crm_pidfile_inuse(const char *filename, long mypid, const char *daemon); +long crm_read_pidfile(const char *filename); # define crm_config_err(fmt...) { crm_config_error = TRUE; crm_err(fmt); } # define crm_config_warn(fmt...) { crm_config_warning = TRUE; crm_warn(fmt); } @@ -290,6 +291,8 @@ int crm_read_pidfile(const char *filename); /* attrd operations */ # define ATTRD_OP_PEER_REMOVE "peer-remove" # define ATTRD_OP_UPDATE "update" +# define ATTRD_OP_UPDATE_BOTH "update-both" +# define ATTRD_OP_UPDATE_DELAY "update-delay" # define ATTRD_OP_QUERY "query" # define ATTRD_OP_REFRESH "refresh" # define ATTRD_OP_FLUSH "flush" @@ -351,7 +354,8 @@ static inline void *realloc_safe(void *ptr, size_t size) { void *ret = realloc(ptr, size); - if(ret == NULL) { + if (ret == NULL) { + free(ptr); /* make coverity happy */ abort(); } @@ -380,9 +384,11 @@ typedef struct remote_proxy_s { } remote_proxy_t; void remote_proxy_notify_destroy(lrmd_t *lrmd, const char *session_id); +void remote_proxy_ack_shutdown(lrmd_t *lrmd); void remote_proxy_relay_event(lrmd_t *lrmd, const char *session_id, xmlNode *msg); void remote_proxy_relay_response(lrmd_t *lrmd, const char *session_id, xmlNode *msg, int msg_id); void remote_proxy_end_session(const char *session); void remote_proxy_free(gpointer data); +int remote_proxy_check(lrmd_t * lrmd, GHashTable *hash); #endif /* CRM_INTERNAL__H */ diff --git a/include/doxygen.h b/include/doxygen.h index a2230632a29..58785d33e3b 100644 --- a/include/doxygen.h +++ b/include/doxygen.h @@ -5,16 +5,16 @@ * 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 + * it under the terms of the GNU Lesser 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. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License + * You should have received a copy of the GNU Lesser 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. */ diff --git a/include/portability.h b/include/portability.h index 7936ddd8789..ba8a532cab2 100644 --- a/include/portability.h +++ b/include/portability.h @@ -16,7 +16,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/lib/cib/cib_attrs.c b/lib/cib/cib_attrs.c index e1646327ffd..d929fa20b64 100644 --- a/lib/cib/cib_attrs.c +++ b/lib/cib/cib_attrs.c @@ -484,6 +484,12 @@ get_cluster_node_uuid(cib_t * the_cib, const char *uname, char **uuid) for (a_child = __xml_first_child(xml_obj); a_child != NULL; a_child = __xml_next(a_child)) { if (crm_str_eq((const char *)a_child->name, XML_CIB_TAG_NODE, TRUE)) { + const char *node_type = crm_element_value(a_child, XML_ATTR_TYPE); + /* Only if it's a cluster node */ + if (safe_str_eq(node_type, "remote")) { + continue; + } + child_name = crm_element_value(a_child, XML_ATTR_UNAME); if (safe_str_eq(uname, child_name)) { child_name = ID(a_child); @@ -508,6 +514,10 @@ query_node_uuid(cib_t * the_cib, const char *uname, char **uuid, int *is_remote_ CRM_ASSERT(uname != NULL); CRM_ASSERT(uuid != NULL); + if (is_remote_node) { + *is_remote_node = FALSE; + } + rc = get_cluster_node_uuid(the_cib, uname, uuid); if (rc != pcmk_ok) { crm_debug("%s is not a cluster node, checking to see if remote-node", uname); diff --git a/lib/cib/cib_native.c b/lib/cib/cib_native.c index ed41157e2b4..0fc48a701a7 100644 --- a/lib/cib/cib_native.c +++ b/lib/cib/cib_native.c @@ -406,7 +406,7 @@ cib_native_perform_op_delegate(cib_t * cib, const char *op, const char *host, co if (reply_id == cib->call_id) { xmlNode *tmp = get_message_xml(op_reply, F_CIB_CALLDATA); - crm_trace("Syncronous reply %d received", reply_id); + crm_trace("Synchronous reply %d received", reply_id); if (crm_element_value_int(op_reply, F_CIB_RC, &rc) != 0) { rc = -EPROTO; } diff --git a/lib/cib/cib_ops.c b/lib/cib/cib_ops.c index c2f5736a9ec..bd541bbdf86 100644 --- a/lib/cib/cib_ops.c +++ b/lib/cib/cib_ops.c @@ -723,7 +723,7 @@ cib_process_xpath(const char *op, int options, const char *section, xmlNode * re } path = xmlGetNodePath(match); - crm_debug("Processing %s op for %s (%s)", op, section, path); + crm_debug("Processing %s op for %s with %s", op, section, path); free(path); if (safe_str_eq(op, CIB_OP_DELETE)) { diff --git a/lib/cib/cib_remote.c b/lib/cib/cib_remote.c index b1c20ba5427..1f49a299d68 100644 --- a/lib/cib/cib_remote.c +++ b/lib/cib/cib_remote.c @@ -540,7 +540,7 @@ cib_remote_perform_op(cib_t * cib, const char *op, const char *host, const char return cib->call_id; } - crm_trace("Waiting for a syncronous reply"); + crm_trace("Waiting for a synchronous reply"); start_time = time(NULL); remaining_time = cib->call_timeout ? cib->call_timeout : 60; @@ -594,7 +594,7 @@ cib_remote_perform_op(cib_t * cib, const char *op, const char *host, const char return -ENOMSG; } - crm_trace("Syncronous reply received"); + crm_trace("Synchronous reply received"); /* Start processing the reply... */ if (crm_element_value_int(op_reply, F_CIB_RC, &rc) != 0) { diff --git a/lib/cib/cib_utils.c b/lib/cib/cib_utils.c index 2817e5a56aa..633c50ded29 100644 --- a/lib/cib/cib_utils.c +++ b/lib/cib/cib_utils.c @@ -304,7 +304,7 @@ cib_perform_op(const char *op, int call_options, cib_op_t * fn, gboolean is_quer const char *user = crm_element_value(req, F_CIB_USER); bool with_digest = FALSE; - crm_trace("Begin %s%s op", is_query ? "read-only " : "", op); + crm_trace("Begin %s%s%s op", is_set(call_options, cib_dryrun)?"dry-run of ":"", is_query ? "read-only " : "", op); CRM_CHECK(output != NULL, return -ENOMSG); CRM_CHECK(result_cib != NULL, return -ENOMSG); diff --git a/lib/cluster/cluster.c b/lib/cluster/cluster.c index f443c99fa40..a91cad30840 100644 --- a/lib/cluster/cluster.c +++ b/lib/cluster/cluster.c @@ -361,6 +361,16 @@ get_node_name(uint32_t nodeid) return name; } +/*! + * \brief Get the node name corresponding to a node UUID + * + * \param[in] uuid UUID of desired node + * + * \return name of desired node + * + * \note This relies on the remote peer cache being populated with all + * remote nodes in the cluster, so callers should maintain that cache. + */ const char * crm_peer_uname(const char *uuid) { @@ -384,6 +394,7 @@ crm_peer_uname(const char *uuid) break; } } + node = NULL; #if SUPPORT_COROSYNC if (is_openais_cluster()) { diff --git a/lib/cluster/cpg.c b/lib/cluster/cpg.c index 46edb7e9666..74d06bd75bc 100644 --- a/lib/cluster/cpg.c +++ b/lib/cluster/cpg.c @@ -166,7 +166,7 @@ crm_cs_flush(gpointer data) sent++; last_sent++; - crm_trace("CPG message sent, size=%d", iov->iov_len); + crm_trace("CPG message sent, size=%zd", iov->iov_len); cs_message_queue = g_list_remove(cs_message_queue, iov); free(iov->iov_base); @@ -178,7 +178,7 @@ crm_cs_flush(gpointer data) crm_info("Sent %d CPG messages (%d remaining, last=%u): %s (%d)", sent, queue_len, last_sent, ais_error2text(rc), rc); } else { - crm_trace("Sent %d CPG messages (%d remaining, last=%u): %s (%d)", + crm_trace("Sent %d CPG messages (%d remaining, last=%u): %s (%zd)", sent, queue_len, last_sent, ais_error2text(rc), rc); } @@ -200,7 +200,7 @@ send_cpg_iov(struct iovec * iov) static unsigned int queued = 0; queued++; - crm_trace("Queueing CPG message %u (%d bytes)", queued, iov->iov_len); + crm_trace("Queueing CPG message %u (%zd bytes)", queued, iov->iov_len); cs_message_queue = g_list_append(cs_message_queue, iov); crm_cs_flush(&pcmk_cpg_handle); return TRUE; @@ -456,9 +456,9 @@ cluster_connect_cpg(crm_cluster_t *cluster) cluster->group.value[0] = 0; /* group.value is char[128] */ - strncpy(cluster->group.value, crm_system_name, 127); + strncpy(cluster->group.value, crm_system_name?crm_system_name:"unknown", 127); cluster->group.value[127] = 0; - cluster->group.length = 1 + QB_MIN(127, strlen(crm_system_name)); + cluster->group.length = 1 + QB_MIN(127, strlen(cluster->group.value)); cs_repeat(retries, 30, rc = cpg_initialize(&handle, &cpg_callbacks)); if (rc != CS_OK) { @@ -623,10 +623,10 @@ send_cluster_text(int class, const char *data, iov->iov_len = msg->header.size; if (msg->compressed_size) { - crm_trace("Queueing CPG message %u to %s (%d bytes, %d bytes compressed payload): %.200s", + crm_trace("Queueing CPG message %u to %s (%zd bytes, %d bytes compressed payload): %.200s", msg->id, target, iov->iov_len, msg->compressed_size, data); } else { - crm_trace("Queueing CPG message %u to %s (%d bytes, %d bytes payload): %.200s", + crm_trace("Queueing CPG message %u to %s (%zd bytes, %d bytes payload): %.200s", msg->id, target, iov->iov_len, msg->size, data); } free(target); diff --git a/lib/cluster/membership.c b/lib/cluster/membership.c index 3ec2c251f56..9d17bfb2592 100644 --- a/lib/cluster/membership.c +++ b/lib/cluster/membership.c @@ -32,8 +32,33 @@ #include #include +/* The peer cache remembers cluster nodes that have been seen. + * This is managed mostly automatically by libcluster, based on + * cluster membership events. + * + * Because cluster nodes can have conflicting names or UUIDs, + * the hash table key is a uniquely generated ID. + */ GHashTable *crm_peer_cache = NULL; + +/* + * The remote peer cache tracks pacemaker_remote nodes. While the + * value has the same type as the peer cache's, it is tracked separately for + * three reasons: pacemaker_remote nodes can't have conflicting names or UUIDs, + * so the name (which is also the UUID) is used as the hash table key; there + * is no equivalent of membership events, so management is not automatic; and + * most users of the peer cache need to exclude pacemaker_remote nodes. + * + * That said, using a single cache would be more logical and less error-prone, + * so it would be a good idea to merge them one day. + * + * libcluster provides two avenues for populating the cache: + * crm_remote_peer_get(), crm_remote_peer_cache_add() and + * crm_remote_peer_cache_remove() directly manage it, + * while crm_remote_peer_cache_refresh() populates it via the CIB. + */ GHashTable *crm_remote_peer_cache = NULL; + unsigned long long crm_peer_seq = 0; gboolean crm_have_quorum = FALSE; static gboolean crm_autoreap = TRUE; @@ -47,60 +72,162 @@ crm_remote_peer_cache_size(void) return g_hash_table_size(crm_remote_peer_cache); } -void -crm_remote_peer_cache_add(const char *node_name) +/*! + * \brief Get a remote node peer cache entry, creating it if necessary + * + * \param[in] node_name Name of remote node + * + * \return Cache entry for node on success, NULL (and set errno) otherwise + * + * \note When creating a new entry, this will leave the node state undetermined, + * so the caller should also call crm_update_peer_state() if the state is + * known. + */ +crm_node_t * +crm_remote_peer_get(const char *node_name) { - crm_node_t *node = g_hash_table_lookup(crm_remote_peer_cache, node_name); + crm_node_t *node; + + if (node_name == NULL) { + errno = -EINVAL; + return NULL; + } + /* Return existing cache entry if one exists */ + node = g_hash_table_lookup(crm_remote_peer_cache, node_name); + if (node) { + return node; + } + + /* Allocate a new entry */ + node = calloc(1, sizeof(crm_node_t)); if (node == NULL) { - crm_trace("added %s to remote cache", node_name); - node = calloc(1, sizeof(crm_node_t)); - node->flags = crm_remote_node; - CRM_ASSERT(node); - node->uname = strdup(node_name); - node->uuid = strdup(node_name); - node->state = strdup(CRM_NODE_MEMBER); - g_hash_table_replace(crm_remote_peer_cache, node->uname, node); + return NULL; + } + + /* Populate the essential information */ + node->flags = crm_remote_node; + node->uuid = strdup(node_name); + if (node->uuid == NULL) { + free(node); + errno = -ENOMEM; + return NULL; } + + /* Add the new entry to the cache */ + g_hash_table_replace(crm_remote_peer_cache, node->uuid, node); + crm_trace("added %s to remote cache", node_name); + + /* Update the entry's uname, ensuring peer status callbacks are called */ + crm_update_peer_uname(node, node_name); + return node; +} + +/*! + * \brief Add a node to the remote peer cache + * + * \param[in] node_name Name of remote node + * + * \note This is a legacy convenience wrapper for crm_remote_peer_get() + * for callers that don't need the cache entry returned. + */ +void +crm_remote_peer_cache_add(const char *node_name) +{ + CRM_ASSERT(crm_remote_peer_get(node_name) != NULL); } void crm_remote_peer_cache_remove(const char *node_name) { - g_hash_table_remove(crm_remote_peer_cache, node_name); + if (g_hash_table_remove(crm_remote_peer_cache, node_name)) { + crm_trace("removed %s from remote peer cache", node_name); + } } +/*! + * \internal + * \brief Return node status based on a CIB status entry + * + * \param[in] node_state XML of node state + * + * \return CRM_NODE_LOST if XML_NODE_IN_CLUSTER is false in node_state, + * CRM_NODE_MEMBER otherwise + * \note Unlike most boolean XML attributes, this one defaults to true, for + * backward compatibility with older crmd versions that don't set it. + */ +static const char * +remote_state_from_cib(xmlNode *node_state) +{ + const char *status; + + status = crm_element_value(node_state, XML_NODE_IN_CLUSTER); + if (status && !crm_is_true(status)) { + status = CRM_NODE_LOST; + } else { + status = CRM_NODE_MEMBER; + } + return status; +} + +/* user data for looping through remote node xpath searches */ +struct refresh_data { + const char *field; /* XML attribute to check for node name */ + gboolean has_state; /* whether to update node state based on XML */ +}; + +/*! + * \internal + * \brief Process one pacemaker_remote node xpath search result + * + * \param[in] result XML search result + * \param[in] user_data what to look for in the XML + */ static void -remote_cache_refresh_helper(xmlNode *cib, const char *xpath, const char *field) +remote_cache_refresh_helper(xmlNode *result, void *user_data) { - const char *remote = NULL; - crm_node_t *node = NULL; - xmlXPathObjectPtr xpathObj = NULL; - int max = 0; - int lpc = 0; - - xpathObj = xpath_search(cib, xpath); - max = numXpathResults(xpathObj); - for (lpc = 0; lpc < max; lpc++) { - xmlNode *xml = getXpathResult(xpathObj, lpc); - - CRM_LOG_ASSERT(xml != NULL); - if(xml != NULL) { - remote = crm_element_value(xml, field); + struct refresh_data *data = user_data; + const char *remote = crm_element_value(result, data->field); + const char *state = NULL; + crm_node_t *node; + + CRM_CHECK(remote != NULL, return); + + /* Determine node's state, if the result has it */ + if (data->has_state) { + state = remote_state_from_cib(result); + } + + /* Check whether cache already has entry for node */ + node = g_hash_table_lookup(crm_remote_peer_cache, remote); + + if (node == NULL) { + /* Node is not in cache, so add a new entry for it */ + node = crm_remote_peer_get(remote); + CRM_ASSERT(node); + if (state) { + crm_update_peer_state(__FUNCTION__, node, state, 0); } - if (remote) { - crm_trace("added %s to remote cache", remote); - node = calloc(1, sizeof(crm_node_t)); - node->flags = crm_remote_node; - CRM_ASSERT(node); - node->uname = strdup(remote); - node->uuid = strdup(remote); - node->state = strdup(CRM_NODE_MEMBER); - g_hash_table_replace(crm_remote_peer_cache, node->uname, node); + } else if (is_set(node->flags, crm_node_dirty)) { + /* Node is in cache and hasn't been updated already, so mark it clean */ + clear_bit(node->flags, crm_node_dirty); + if (state) { + crm_update_peer_state(__FUNCTION__, node, state, 0); } } - freeXpathObject(xpathObj); +} + +static void +mark_dirty(gpointer key, gpointer value, gpointer user_data) +{ + set_bit(((crm_node_t*)value)->flags, crm_node_dirty); +} + +static gboolean +is_dirty(gpointer key, gpointer value, gpointer user_data) +{ + return is_set(((crm_node_t*)value)->flags, crm_node_dirty); } /* search string to find CIB resources entries for guest nodes */ @@ -124,19 +251,40 @@ remote_cache_refresh_helper(xmlNode *cib, const char *xpath, const char *field) * * \param[in] xmlNode CIB XML to parse */ -void crm_remote_peer_cache_refresh(xmlNode *cib) +void +crm_remote_peer_cache_refresh(xmlNode *cib) { - g_hash_table_remove_all(crm_remote_peer_cache); - - /* remote nodes associated with a cluster resource */ - remote_cache_refresh_helper(cib, XPATH_GUEST_NODE_CONFIG, "value"); - - /* baremetal nodes defined by connection resources*/ - remote_cache_refresh_helper(cib, XPATH_REMOTE_NODE_CONFIG, "id"); - - /* baremetal nodes we have seen in the config that may or may not have connection - * resources associated with them anymore */ - remote_cache_refresh_helper(cib, XPATH_REMOTE_NODE_STATUS, "id"); + struct refresh_data data; + + /* First, we mark all existing cache entries as dirty, + * so that later we can remove any that weren't in the CIB. + * We don't empty the cache, because we need to detect changes in state. + */ + g_hash_table_foreach(crm_remote_peer_cache, mark_dirty, NULL); + + /* Look for guest nodes and remote nodes in the status section */ + data.field = "id"; + data.has_state = TRUE; + crm_foreach_xpath_result(cib, XPATH_REMOTE_NODE_STATUS, + remote_cache_refresh_helper, &data); + + /* Look for guest nodes and remote nodes in the configuration section, + * because they may have just been added and not have a status entry yet. + * In that case, the cached node state will be left NULL, so that the + * peer status callback isn't called until we're sure the node started + * successfully. + */ + data.field = "value"; + data.has_state = FALSE; + crm_foreach_xpath_result(cib, XPATH_GUEST_NODE_CONFIG, + remote_cache_refresh_helper, &data); + data.field = "id"; + data.has_state = FALSE; + crm_foreach_xpath_result(cib, XPATH_REMOTE_NODE_CONFIG, + remote_cache_refresh_helper, &data); + + /* Remove all old cache entries that weren't seen in the CIB */ + g_hash_table_foreach_remove(crm_remote_peer_cache, is_dirty, NULL); } gboolean diff --git a/lib/common/ipc.c b/lib/common/ipc.c index 1ae2283376e..a1c395bba41 100644 --- a/lib/common/ipc.c +++ b/lib/common/ipc.c @@ -494,11 +494,11 @@ crm_ipcs_flush_events(crm_client_t * c) sent++; header = event[0].iov_base; if (header->size_compressed) { - crm_trace("Event %d to %p[%d] (%d compressed bytes) sent", + crm_trace("Event %d to %p[%d] (%zu compressed bytes) sent", header->qb.id, c->ipcs, c->pid, rc); } else { - crm_trace("Event %d to %p[%d] (%d bytes) sent: %.120s", - header->qb.id, c->ipcs, c->pid, rc, event[1].iov_base); + crm_trace("Event %d to %p[%d] (%zu bytes) sent: %.120s", + header->qb.id, c->ipcs, c->pid, rc, (char *)(event[1].iov_base)); } c->event_queue = g_list_remove(c->event_queue, event); @@ -509,7 +509,7 @@ crm_ipcs_flush_events(crm_client_t * c) queue_len -= sent; if (sent > 0 || c->event_queue) { - crm_trace("Sent %d events (%d remaining) for %p[%d]: %s (%d)", + crm_trace("Sent %d events (%d remaining) for %p[%d]: %s (%zd)", sent, queue_len, c->ipcs, c->pid, pcmk_strerror(rc < 0 ? rc : 0), rc); } @@ -658,7 +658,7 @@ crm_ipcs_sendv(crm_client_t * c, struct iovec * iov, enum crm_ipc_flags flags) header->qb.id, c->ipcs, c->pid, header->qb.size, pcmk_strerror(rc), rc); } else { - crm_trace("Response %d sent, %d bytes to %p[%d]", header->qb.id, rc, c->ipcs, c->pid); + crm_trace("Response %d sent, %zd bytes to %p[%d]", header->qb.id, rc, c->ipcs, c->pid); } if (flags & crm_ipc_server_free) { @@ -749,13 +749,13 @@ pick_ipc_buffer(unsigned int max) { static unsigned int global_max = 0; - if(global_max == 0) { + if (global_max == 0) { const char *env = getenv("PCMK_ipc_buffer"); if (env) { int env_max = crm_parse_int(env, "0"); - global_max = (env_max > 0)? env_max : MAX_MSG_SIZE; + global_max = (env_max > 0)? QB_MAX(MIN_MSG_SIZE, env_max) : MAX_MSG_SIZE; } else { global_max = MAX_MSG_SIZE; @@ -828,7 +828,7 @@ void crm_ipc_close(crm_ipc_t * client) { if (client) { - crm_trace("Disconnecting %s IPC connection %p (%p.%p)", client->name, client, client->ipc); + crm_trace("Disconnecting %s IPC connection %p (%p)", client->name, client, client->ipc); if (client->ipc) { qb_ipcc_connection_t *ipc = client->ipc; diff --git a/lib/common/iso8601.c b/lib/common/iso8601.c index 5f4a73df00d..06b0a7406e5 100644 --- a/lib/common/iso8601.c +++ b/lib/common/iso8601.c @@ -979,7 +979,7 @@ crm_time_parse_period(const char *period_str) void crm_time_set(crm_time_t * target, crm_time_t * source) { - crm_trace("target=%p, source=%p, offset=%d", target, source); + crm_trace("target=%p, source=%p", target, source); CRM_CHECK(target != NULL && source != NULL, return); diff --git a/lib/common/mainloop.c b/lib/common/mainloop.c index 51d129d50a5..fceebbac86e 100644 --- a/lib/common/mainloop.c +++ b/lib/common/mainloop.c @@ -656,7 +656,7 @@ mainloop_gio_callback(GIOChannel * gio, GIOCondition condition, gpointer data) } else if (client->dispatch_fn_ipc) { const char *buffer = crm_ipc_buffer(client->ipc); - crm_trace("New message from %s[%p] = %d", client->name, client, rc, condition); + crm_trace("New message from %s[%p] = %ld (I/O condition=%d)", client->name, client, rc, condition); if (client->dispatch_fn_ipc(buffer, rc, client->userdata) < 0) { crm_trace("Connection to %s no longer required", client->name); keep = FALSE; diff --git a/lib/common/remote.c b/lib/common/remote.c index 137a53cbee8..85e12ea07a6 100644 --- a/lib/common/remote.c +++ b/lib/common/remote.c @@ -234,7 +234,7 @@ crm_send_tls(gnutls_session_t * session, const char *buf, size_t len) } total_send = len; - crm_trace("Message size: %d", len); + crm_trace("Message size: %zd", len); while (TRUE) { rc = gnutls_record_send(*session, unsent, len); @@ -247,7 +247,7 @@ crm_send_tls(gnutls_session_t * session, const char *buf, size_t len) break; } else if (rc < len) { - crm_debug("Sent %d of %d bytes", rc, len); + crm_debug("Sent %d of %zd bytes", rc, len); len -= rc; unsent += rc; } else { @@ -273,7 +273,7 @@ crm_send_plaintext(int sock, const char *buf, size_t len) } total_send = len; - crm_trace("Message on socket %d: size=%d", sock, len); + crm_trace("Message on socket %d: size=%zd", sock, len); retry: rc = write(sock, unsent, len); if (rc < 0) { @@ -288,7 +288,7 @@ crm_send_plaintext(int sock, const char *buf, size_t len) } } else if (rc < len) { - crm_trace("Only sent %d of %d remaining bytes", rc, len); + crm_trace("Only sent %d of %zd remaining bytes", rc, len); len -= rc; unsent += rc; goto retry; @@ -383,9 +383,6 @@ crm_remote_parse_buffer(crm_remote_t * remote) return NULL; } - /* take ownership of the buffer */ - remote->buffer_offset = 0; - /* Support compression on the receiving end now, in case we ever want to add it later */ if (header->payload_compressed) { int rc = 0; @@ -421,6 +418,9 @@ crm_remote_parse_buffer(crm_remote_t * remote) header = crm_remote_header(remote); } + /* take ownership of the buffer */ + remote->buffer_offset = 0; + CRM_LOG_ASSERT(remote->buffer[sizeof(struct crm_remote_header_v0) + header->payload_uncompressed - 1] == 0); xml = string2xml(remote->buffer + header->payload_offset); @@ -518,7 +518,7 @@ crm_remote_recv_once(crm_remote_t * remote) /* automatically grow the buffer when needed */ if(remote->buffer_size < read_len) { remote->buffer_size = 2 * read_len; - crm_trace("Expanding buffer to %u bytes", remote->buffer_size); + crm_trace("Expanding buffer to %zu bytes", remote->buffer_size); remote->buffer = realloc_safe(remote->buffer, remote->buffer_size + 1); CRM_ASSERT(remote->buffer != NULL); @@ -559,17 +559,17 @@ crm_remote_recv_once(crm_remote_t * remote) remote->buffer_offset += rc; /* always null terminate buffer, the +1 to alloc always allows for this. */ remote->buffer[remote->buffer_offset] = '\0'; - crm_trace("Received %u more bytes, %u total", rc, remote->buffer_offset); + crm_trace("Received %u more bytes, %zu total", rc, remote->buffer_offset); } else if (rc == -EINTR || rc == -EAGAIN) { crm_trace("non-blocking, exiting read: %s (%d)", pcmk_strerror(rc), rc); } else if (rc == 0) { - crm_debug("EOF encoutered after %u bytes", remote->buffer_offset); + crm_debug("EOF encoutered after %zu bytes", remote->buffer_offset); return -ENOTCONN; } else { - crm_debug("Error receiving message after %u bytes: %s (%d)", + crm_debug("Error receiving message after %zu bytes: %s (%d)", remote->buffer_offset, pcmk_strerror(rc), rc); return -ENOTCONN; } @@ -577,10 +577,10 @@ crm_remote_recv_once(crm_remote_t * remote) header = crm_remote_header(remote); if(header) { if(remote->buffer_offset < header->size_total) { - crm_trace("Read less than the advertised length: %u < %u bytes", + crm_trace("Read less than the advertised length: %zu < %u bytes", remote->buffer_offset, header->size_total); } else { - crm_trace("Read full message of %u bytes", remote->buffer_offset); + crm_trace("Read full message of %zu bytes", remote->buffer_offset); return remote->buffer_offset; } } @@ -690,7 +690,7 @@ check_connect_finished(gpointer userdata) rc = -ETIMEDOUT; } } - crm_trace("fd %d: select failed %d connect dispatch ", rc); + crm_trace("fd %d: select failed %d connect dispatch ", sock, rc); goto dispatch_done; } else if (rc == 0) { if ((time(NULL) - cb_data->start) < (cb_data->timeout / 1000)) { diff --git a/lib/common/utils.c b/lib/common/utils.c index 24933f65262..cdad3f201e7 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -129,6 +129,34 @@ check_timer(const char *value) return TRUE; } +gboolean +check_sbd_timeout(const char *value) +{ + const char *env_value = getenv("SBD_WATCHDOG_TIMEOUT"); + + long sbd_timeout = crm_get_msec(env_value); + long st_timeout = crm_get_msec(value); + + if(value == NULL || st_timeout <= 0) { + crm_notice("Watchdog may be enabled but stonith-watchdog-timeout is disabled: %s", value); + + } else if(pcmk_locate_sbd() == 0) { + do_crm_log_always(LOG_EMERG, "Shutting down: stonith-watchdog-timeout is configured (%ldms) but SBD is not active", st_timeout); + crm_exit(DAEMON_RESPAWN_STOP); + return FALSE; + + } else if(st_timeout < sbd_timeout) { + do_crm_log_always(LOG_EMERG, "Shutting down: stonith-watchdog-timeout (%ldms) is too short (must be greater than %ldms)", + st_timeout, sbd_timeout); + crm_exit(DAEMON_RESPAWN_STOP); + return FALSE; + } + + crm_info("Watchdog functionality is consistent: %s delay exceeds timeout of %s", value, env_value); + return TRUE; +} + + gboolean check_boolean(const char *value) { @@ -1218,10 +1246,14 @@ crm_pid_active(long pid, const char *daemon) snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", pid); rc = readlink(proc_path, exe_path, PATH_MAX - 1); - if (rc < 0) { + if (rc < 0 && errno == EACCES) { + crm_perror(LOG_INFO, "Could not read from %s", proc_path); + return 1; + } else if (rc < 0) { crm_perror(LOG_ERR, "Could not read from %s", proc_path); return 0; } + exe_path[rc] = 0; @@ -1243,17 +1275,24 @@ crm_pid_active(long pid, const char *daemon) #define LOCKSTRLEN 11 -int +long crm_read_pidfile(const char *filename) { int fd; - long pid = -1; + struct stat sbuf; + long pid = -ENOENT; char buf[LOCKSTRLEN + 1]; if ((fd = open(filename, O_RDONLY)) < 0) { goto bail; } + if (fstat(fd, &sbuf) >= 0 && sbuf.st_size < LOCKSTRLEN) { + sleep(2); /* if someone was about to create one, + * give'm a sec to do so + */ + } + if (read(fd, buf, sizeof(buf)) < 1) { goto bail; } @@ -1261,6 +1300,8 @@ crm_read_pidfile(const char *filename) if (sscanf(buf, "%lu", &pid) > 0) { if (pid <= 0) { pid = -ESRCH; + } else { + crm_trace("Got pid %lu from %s\n", pid, filename); } } @@ -1271,46 +1312,31 @@ crm_read_pidfile(const char *filename) return pid; } -int +long crm_pidfile_inuse(const char *filename, long mypid, const char *daemon) { - long pid = 0; - struct stat sbuf; - char buf[LOCKSTRLEN + 1]; - int rc = -ENOENT, fd = 0; + long pid = crm_read_pidfile(filename); - if ((fd = open(filename, O_RDONLY)) >= 0) { - if (fstat(fd, &sbuf) >= 0 && sbuf.st_size < LOCKSTRLEN) { - sleep(2); /* if someone was about to create one, - * give'm a sec to do so - */ - } - if (read(fd, buf, sizeof(buf)) > 0) { - if (sscanf(buf, "%lu", &pid) > 0) { - crm_trace("Got pid %lu from %s\n", pid, filename); - if (pid <= 1) { - /* Invalid pid */ - rc = -ENOENT; - unlink(filename); - - } else if (mypid && pid == mypid) { - /* In use by us */ - rc = pcmk_ok; - - } else if (crm_pid_active(pid, daemon) == FALSE) { - /* Contains a stale value */ - unlink(filename); - rc = -ENOENT; - - } else if (mypid && pid != mypid) { - /* locked by existing process - give up */ - rc = -EEXIST; - } - } - } - close(fd); + if (pid < 2) { + /* Invalid pid */ + pid = -ENOENT; + unlink(filename); + + } else if (mypid && pid == mypid) { + /* In use by us */ + pid = pcmk_ok; + + } else if (crm_pid_active(pid, daemon) == FALSE) { + /* Contains a stale value */ + unlink(filename); + pid = -ENOENT; + + } else if (mypid && pid != mypid) { + /* locked by existing process - give up */ + pid = -EEXIST; } - return rc; + + return pid; } static int @@ -1772,7 +1798,7 @@ attrd_update_delegate(crm_ipc_t * ipc, char command, const char *host, const cha } crm_xml_add(update, F_TYPE, T_ATTRD); - crm_xml_add(update, F_ORIG, crm_system_name); + crm_xml_add(update, F_ORIG, crm_system_name?crm_system_name:"unknown"); if (name == NULL && command == 'U') { command = 'R'; @@ -1792,6 +1818,14 @@ attrd_update_delegate(crm_ipc_t * ipc, char command, const char *host, const cha case 'R': crm_xml_add(update, F_ATTRD_TASK, ATTRD_OP_REFRESH); break; + case 'B': + crm_xml_add(update, F_ATTRD_TASK, ATTRD_OP_UPDATE_BOTH); + crm_xml_add(update, F_ATTRD_ATTRIBUTE, name); + break; + case 'Y': + crm_xml_add(update, F_ATTRD_TASK, ATTRD_OP_UPDATE_DELAY); + crm_xml_add(update, F_ATTRD_ATTRIBUTE, name); + break; case 'Q': crm_xml_add(update, F_ATTRD_TASK, ATTRD_OP_QUERY); crm_xml_add(update, F_ATTRD_ATTRIBUTE, name); @@ -2046,7 +2080,7 @@ create_operation_update(xmlNode * parent, lrmd_event_data_t * op, const char * c if (compare_version("2.1", caller_version) <= 0) { if (op->t_run || op->t_rcchange || op->exec_time || op->queue_time) { - crm_trace("Timing data (%s_%s_%d): last=%lu change=%lu exec=%lu queue=%lu", + crm_trace("Timing data (%s_%s_%d): last=%u change=%u exec=%u queue=%u", op->rsc_id, op->op_type, op->interval, op->t_run, op->t_rcchange, op->exec_time, op->queue_time); @@ -2270,7 +2304,8 @@ find_library_function(void **handle, const char *lib, const char *fn, gboolean f } a_function = dlsym(*handle, fn); - if ((error = dlerror()) != NULL) { + if (a_function == NULL) { + error = dlerror(); crm_err("%sCould not find %s in %s: %s", fatal ? "Fatal: " : "", fn, lib, error); if (fatal) { crm_exit(DAEMON_RESPAWN_STOP); diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index d6dc29094f8..022884f37ff 100644 --- a/lib/common/watchdog.c +++ b/lib/common/watchdog.c @@ -189,12 +189,13 @@ pcmk_panic(const char *origin) panic_cs = qb_log_callsite_get(__func__, __FILE__, "panic-delay", LOG_TRACE, __LINE__, crm_trace_nonlog); } - pcmk_locate_sbd(); + /* Ensure sbd_pid is set */ + (void)pcmk_locate_sbd(); if (panic_cs && panic_cs->targets) { /* getppid() == 1 means our original parent no longer exists */ do_crm_log_always(LOG_EMERG, - "Shutting down instead of panicing the node: origin=%s, sbd=%d, parent=%d", + "Shutting down instead of panicking the node: origin=%s, sbd=%d, parent=%d", origin, sbd_pid, getppid()); crm_exit(DAEMON_RESPAWN_STOP); return; @@ -205,7 +206,7 @@ pcmk_panic(const char *origin) pcmk_panic_sbd(); } else { - do_crm_log_always(LOG_EMERG, "Panicing the system directly: %s", origin); + do_crm_log_always(LOG_EMERG, "Panicking the system directly: %s", origin); pcmk_panic_local(); } } @@ -225,15 +226,13 @@ pcmk_locate_sbd(void) sbd_path = crm_strdup_printf("%s/sbd", SBINDIR); /* Read the pid file */ - if(pidfile) { - int rc = crm_pidfile_inuse(pidfile, 1, sbd_path); - if(rc < pcmk_ok && rc != -ENOENT) { - sbd_pid = crm_read_pidfile(pidfile); - crm_trace("SBD detected at pid=%d (file)"); - } - } + CRM_ASSERT(pidfile); - if(sbd_pid < 0) { + sbd_pid = crm_pidfile_inuse(pidfile, 0, sbd_path); + if(sbd_pid > 0) { + crm_trace("SBD detected at pid=%d (file)", sbd_pid); + + } else { /* Fall back to /proc for systems that support it */ sbd_pid = crm_procfs_pid_of("sbd"); crm_trace("SBD detected at pid=%d (proc)", sbd_pid); @@ -241,6 +240,7 @@ pcmk_locate_sbd(void) if(sbd_pid < 0) { sbd_pid = 0; + crm_trace("SBD not detected"); } free(pidfile); diff --git a/lib/common/xml.c b/lib/common/xml.c index bebfcef20b3..8447c965b75 100644 --- a/lib/common/xml.c +++ b/lib/common/xml.c @@ -907,7 +907,7 @@ __xml_purge_attributes(xmlNode *xml) xml_private_t *p = xml->_private; if(__xml_acl_mode_test(p->flags, xpf_acl_read)) { - crm_trace("%s is readable", crm_element_name(xml), ID(xml)); + crm_trace("%s[@id=%s] is readable", crm_element_name(xml), ID(xml)); return TRUE; } @@ -1554,8 +1554,8 @@ xml_create_patchset(int format, xmlNode *source, xmlNode *target, bool *config_c crm_xml_add_int(target, XML_ATTR_GENERATION, counter+1); } else if(manage_version) { - crm_trace("Status changed %d", format); crm_element_value_int(target, XML_ATTR_NUMUPDATES, &counter); + crm_trace("Status changed %d - %d %s", format, counter, crm_element_value(source, XML_ATTR_NUMUPDATES)); crm_xml_add_int(target, XML_ATTR_NUMUPDATES, counter+1); } @@ -2062,11 +2062,14 @@ xml_patch_version_check(xmlNode *xml, xmlNode *patchset, int format) for(lpc = 0; lpc < DIMOF(vfields); lpc++) { if(this[lpc] < del[lpc]) { - crm_debug("Current %s is too low (%d < %d)", vfields[lpc], this[lpc], del[lpc]); + crm_debug("Current %s is too low (%d.%d.%d < %d.%d.%d --> %d.%d.%d)", vfields[lpc], + this[0], this[1], this[2], del[0], del[1], del[2], add[0], add[1], add[2]); return -pcmk_err_diff_resync; } else if(this[lpc] > del[lpc]) { - crm_info("Current %s is too high (%d > %d)", vfields[lpc], this[lpc], del[lpc]); + crm_info("Current %s is too high (%d.%d.%d > %d.%d.%d --> %d.%d.%d) %p", vfields[lpc], + this[0], this[1], this[2], del[0], del[1], del[2], add[0], add[1], add[2], patchset); + crm_log_xml_info(patchset, "OldPatch"); return -pcmk_err_old_data; } } @@ -2423,7 +2426,7 @@ xml_apply_patchset(xmlNode *xml, xmlNode *patchset, bool check_version) save_xml_to_file(patchset,"PatchDigest:diff", NULL); } else { - crm_trace("%p %0.6x", digest_cs, digest_cs ? digest_cs->targets : 0); + crm_trace("%p %.6x", digest_cs, digest_cs ? digest_cs->targets : 0); } } else { @@ -4157,7 +4160,7 @@ apply_xml_diff(xmlNode * old, xmlNode * diff, xmlNode ** new) crm_info("Digest mis-match: expected %s, calculated %s", digest, new_digest); result = FALSE; - crm_trace("%p %0.6x", digest_cs, digest_cs ? digest_cs->targets : 0); + crm_trace("%p %.6x", digest_cs, digest_cs ? digest_cs->targets : 0); if (digest_cs && digest_cs->targets) { save_xml_to_file(old, "diff:original", NULL); save_xml_to_file(diff, "diff:input", NULL); diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c index 33c58b74c7c..f0394069da4 100644 --- a/lib/fencing/st_client.c +++ b/lib/fencing/st_client.c @@ -2308,7 +2308,7 @@ stonith_send_command(stonith_t * stonith, const char *op, xmlNode * data, xmlNod crm_element_value_int(op_reply, F_STONITH_CALLID, &reply_id); if (reply_id == stonith->call_id) { - crm_trace("Syncronous reply %d received", reply_id); + crm_trace("Synchronous reply %d received", reply_id); if (crm_element_value_int(op_reply, F_STONITH_RC, &rc) != 0) { rc = -ENOMSG; diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c index 8adf2c339ac..151df40fc78 100644 --- a/lib/lrmd/lrmd_client.c +++ b/lib/lrmd/lrmd_client.c @@ -109,6 +109,7 @@ typedef struct lrmd_private_s { /* Internal IPC proxy msg passing for remote guests */ void (*proxy_callback)(lrmd_t *lrmd, void *userdata, xmlNode *msg); void *proxy_callback_userdata; + char *peer_version; } lrmd_private_t; static lrmd_list_t * @@ -880,6 +881,25 @@ lrmd_api_poke_connection(lrmd_t * lrmd) return rc < 0 ? rc : pcmk_ok; } +int +remote_proxy_check(lrmd_t * lrmd, GHashTable *hash) +{ + int rc; + const char *value; + lrmd_private_t *native = lrmd->private; + xmlNode *data = create_xml_node(NULL, F_LRMD_OPERATION); + + crm_xml_add(data, F_LRMD_ORIGIN, __FUNCTION__); + + value = g_hash_table_lookup(hash, "stonith-watchdog-timeout"); + crm_xml_add(data, F_LRMD_WATCHDOG, value); + + rc = lrmd_send_command(lrmd, LRMD_OP_CHECK, data, NULL, 0, 0, native->type == CRM_CLIENT_IPC ? TRUE : FALSE); + free_xml(data); + + return rc < 0 ? rc : pcmk_ok; +} + static int lrmd_handshake(lrmd_t * lrmd, const char *name) { @@ -907,6 +927,7 @@ lrmd_handshake(lrmd_t * lrmd, const char *name) crm_err("Did not receive registration reply"); rc = -EPROTO; } else { + const char *version = crm_element_value(reply, F_LRMD_PROTOCOL_VERSION); const char *msg_type = crm_element_value(reply, F_LRMD_OPERATION); const char *tmp_ticket = crm_element_value(reply, F_LRMD_CLIENTID); @@ -914,7 +935,7 @@ lrmd_handshake(lrmd_t * lrmd, const char *name) if (rc == -EPROTO) { crm_err("LRMD protocol mismatch client version %s, server version %s", - LRMD_PROTOCOL_VERSION, crm_element_value(reply, F_LRMD_PROTOCOL_VERSION)); + LRMD_PROTOCOL_VERSION, version); crm_log_xml_err(reply, "Protocol Error"); } else if (safe_str_neq(msg_type, CRM_OP_REGISTER)) { @@ -928,6 +949,7 @@ lrmd_handshake(lrmd_t * lrmd, const char *name) } else { crm_trace("Obtained registration token: %s", tmp_ticket); native->token = strdup(tmp_ticket); + native->peer_version = strdup(version?version:"1.0"); /* Included since 1.1 */ rc = pcmk_ok; } } @@ -1359,6 +1381,7 @@ lrmd_tls_disconnect(lrmd_t * lrmd) } else if (native->sock) { close(native->sock); + native->sock = 0; } if (native->pending_notify) { @@ -1745,7 +1768,7 @@ lsb_get_metadata(const char *type, char **output) lsb_meta_helper_free_value(dflt_start); lsb_meta_helper_free_value(dflt_stop); - crm_trace("Created fake metadata: %d", strlen(*output)); + crm_trace("Created fake metadata: %zd", strlen(*output)); return pcmk_ok; } @@ -1887,7 +1910,7 @@ static int heartbeat_get_metadata(const char *type, char **output) { *output = crm_strdup_printf(hb_metadata_template, type, type, type); - crm_trace("Created fake metadata: %d", strlen(*output)); + crm_trace("Created fake metadata: %zd", strlen(*output)); return pcmk_ok; } #endif diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index 50c59c32a68..eb17e4e2679 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -39,18 +39,32 @@ remote_proxy_notify_destroy(lrmd_t *lrmd, const char *session_id) { /* sending to the remote node that an ipc connection has been destroyed */ xmlNode *msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(msg, F_LRMD_IPC_OP, "destroy"); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_DESTROY); crm_xml_add(msg, F_LRMD_IPC_SESSION, session_id); lrmd_internal_proxy_send(lrmd, msg); free_xml(msg); } +/*! + * \brief Send an acknowledgment of a remote proxy shutdown request. + * + * \param[in] lrmd Connection to proxy + */ +void +remote_proxy_ack_shutdown(lrmd_t *lrmd) +{ + xmlNode *msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_SHUTDOWN_ACK); + lrmd_internal_proxy_send(lrmd, msg); + free_xml(msg); +} + void remote_proxy_relay_event(lrmd_t *lrmd, const char *session_id, xmlNode *msg) { /* sending to the remote node an event msg. */ xmlNode *event = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(event, F_LRMD_IPC_OP, "event"); + crm_xml_add(event, F_LRMD_IPC_OP, LRMD_IPC_OP_EVENT); crm_xml_add(event, F_LRMD_IPC_SESSION, session_id); add_message_xml(event, F_LRMD_IPC_MSG, msg); crm_log_xml_explicit(event, "EventForProxy"); @@ -63,7 +77,7 @@ remote_proxy_relay_response(lrmd_t *lrmd, const char *session_id, xmlNode *msg, { /* sending to the remote node a response msg. */ xmlNode *response = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(response, F_LRMD_IPC_OP, "response"); + crm_xml_add(response, F_LRMD_IPC_OP, LRMD_IPC_OP_RESPONSE); crm_xml_add(response, F_LRMD_IPC_SESSION, session_id); crm_xml_add_int(response, F_LRMD_IPC_MSG_ID, msg_id); add_message_xml(response, F_LRMD_IPC_MSG, msg); diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index da08fb99c21..e741eadf696 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -31,7 +31,8 @@ libpe_rules_la_SOURCES = rules.c common.c libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la 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_SOURCES = status.c unpack.c utils.c complex.c native.c \ + group.c clone.c rules.c common.c remote.c libpe_status_la_LIBADD = @CURSESLIBS@ $(top_builddir)/lib/common/libcrmcommon.la clean-generic: diff --git a/lib/pengine/clone.c b/lib/pengine/clone.c index ceda38cfed0..af37a9d110a 100644 --- a/lib/pengine/clone.c +++ b/lib/pengine/clone.c @@ -290,13 +290,17 @@ clone_active(resource_t * rsc, gboolean all) } static void -short_print(char *list, const char *prefix, const char *type, long options, void *print_data) +short_print(char *list, const char *prefix, const char *type, const char *suffix, long options, void *print_data) { + if(suffix == NULL) { + suffix = ""; + } + if (list) { if (options & pe_print_html) { status_print("
  • "); } - status_print("%s%s: [%s ]", prefix, type, list); + status_print("%s%s: [%s ]%s", prefix, type, list, suffix); if (options & pe_print_html) { status_print("
  • \n"); @@ -367,6 +371,21 @@ bool is_set_recursive(resource_t * rsc, long long flag, bool any) return FALSE; } +static enum rsc_role_e +configured_role(resource_t * rsc) +{ + const char *target_role = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET_ROLE); + + if(target_role == NULL) { + target_role = g_hash_table_lookup(((resource_t*)rsc->children->data)->meta, XML_RSC_ATTR_TARGET_ROLE); + } + + if(target_role) { + return text2role(target_role); + } + return RSC_ROLE_UNKNOWN; +} + void clone_print(resource_t * rsc, const char *pre_text, long options, void *print_data) { @@ -492,7 +511,7 @@ clone_print(resource_t * rsc, const char *pre_text, long options, void *print_da active_instances++; } - short_print(list_text, child_text, "Masters", options, print_data); + short_print(list_text, child_text, "Masters", NULL, options, print_data); g_list_free(master_list); free(list_text); list_text = NULL; @@ -506,16 +525,33 @@ clone_print(resource_t * rsc, const char *pre_text, long options, void *print_da active_instances++; } - short_print(list_text, child_text, rsc->variant == pe_master ? "Slaves" : "Started", options, - print_data); + if(rsc->variant == pe_master) { + enum rsc_role_e role = configured_role(rsc); + + if(role > RSC_ROLE_STOPPED && role < RSC_ROLE_MASTER) { + short_print(list_text, child_text, "Slaves (target-role)", NULL, options, print_data); + } else { + short_print(list_text, child_text, "Slaves", NULL, options, print_data); + } + + } else { + short_print(list_text, child_text, "Started", NULL, options, print_data); + } + g_list_free(started_list); free(list_text); list_text = NULL; if (is_not_set(options, pe_print_clone_active)) { - /* Stopped */ + const char *state = "Stopped"; + enum rsc_role_e role = configured_role(rsc); + + if (role == RSC_ROLE_STOPPED) { + state = "Stopped (disabled)"; + } + if (is_not_set(rsc->flags, pe_rsc_unique) - && (clone_data->clone_max > active_instances)) { + && (clone_data->clone_max > active_instances)) { GListPtr nIter; GListPtr list = g_hash_table_get_values(rsc->allowed_nodes); @@ -540,7 +576,8 @@ clone_print(resource_t * rsc, const char *pre_text, long options, void *print_da } g_list_free(list); } - short_print(stopped_list, child_text, "Stopped", options, print_data); + + short_print(stopped_list, child_text, state, NULL, options, print_data); free(stopped_list); } diff --git a/lib/pengine/common.c b/lib/pengine/common.c index e533d11be44..5a4cf7905a5 100644 --- a/lib/pengine/common.c +++ b/lib/pengine/common.c @@ -108,6 +108,8 @@ pe_cluster_option pe_opts[] = { "How long to wait for the STONITH action (reboot,on,off) to complete", NULL }, { XML_ATTR_HAVE_WATCHDOG, NULL, "boolean", NULL, "false", &check_boolean, "Enable watchdog integration", "Set automatically by the cluster if SBD is detected. User configured values are ignored." }, + { "concurrent-fencing", NULL, "boolean", NULL, "false", &check_boolean, + "Allow performing fencing operations in parallel", NULL }, { "startup-fencing", "startup_fencing", "boolean", NULL, "true", &check_boolean, "STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" }, diff --git a/lib/pengine/complex.c b/lib/pengine/complex.c index aa539c2c65b..84ba83959d7 100644 --- a/lib/pengine/complex.c +++ b/lib/pengine/complex.c @@ -408,6 +408,7 @@ common_unpack(xmlNode * xml_obj, resource_t ** rsc, } *rsc = calloc(1, sizeof(resource_t)); + (*rsc)->cluster = data_set; if (expanded_xml) { crm_log_xml_trace(expanded_xml, "Expanded resource..."); diff --git a/lib/pengine/native.c b/lib/pengine/native.c index 6b4c97fa0cf..151b235755d 100644 --- a/lib/pengine/native.c +++ b/lib/pengine/native.c @@ -436,12 +436,15 @@ void native_print(resource_t * rsc, const char *pre_text, long options, void *print_data) { node_t *node = NULL; + const char *desc = NULL; const char *class = crm_element_value(rsc->xml, XML_AGENT_ATTR_CLASS); const char *kind = crm_element_value(rsc->xml, XML_ATTR_TYPE); const char *target_role = NULL; int offset = 0; + int flagOffset = 0; char buffer[LINE_MAX]; + char flagBuffer[LINE_MAX]; CRM_ASSERT(rsc->variant == pe_native); CRM_ASSERT(kind != NULL); @@ -518,21 +521,6 @@ native_print(resource_t * rsc, const char *pre_text, long options, void *print_d if (rsc_state == NULL) { rsc_state = role2text(rsc->role); } - if (target_role) { - enum rsc_role_e target_role_e = text2role(target_role); - - /* Ignore target role Started, as it is the default anyways - * (and would also allow a Master to be Master). - * Show if current role differs from target role, - * or if target role limits our abilities. */ - if (target_role_e != RSC_ROLE_STARTED && ( - target_role_e == RSC_ROLE_SLAVE || - target_role_e == RSC_ROLE_STOPPED || - safe_str_neq(target_role, rsc_state))) - { - offset += snprintf(buffer + offset, LINE_MAX - offset, "(target-role:%s) ", target_role); - } - } offset += snprintf(buffer + offset, LINE_MAX - offset, "%s", rsc_state); } @@ -540,7 +528,7 @@ native_print(resource_t * rsc, const char *pre_text, long options, void *print_d offset += snprintf(buffer + offset, LINE_MAX - offset, " %s", node->details->uname); if (node->details->online == FALSE && node->details->unclean) { - offset += snprintf(buffer + offset, LINE_MAX - offset, " (UNCLEAN)"); + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%sUNCLEAN", flagOffset?", ":""); } } @@ -548,26 +536,52 @@ native_print(resource_t * rsc, const char *pre_text, long options, void *print_d const char *pending_task = native_pending_task(rsc); if (pending_task) { - offset += snprintf(buffer + offset, LINE_MAX - offset, " (%s)", pending_task); + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%s%s", flagOffset?", ":"", pending_task); + } + } + + if (target_role) { + enum rsc_role_e target_role_e = text2role(target_role); + + /* Ignore target role Started, as it is the default anyways + * (and would also allow a Master to be Master). + * Show if current role differs from target role, + * or if target role limits our abilities. */ + if (target_role_e == RSC_ROLE_STOPPED) { + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%sdisabled", flagOffset?", ":""); + rsc->cluster->disabled_resources++; + + } else if (uber_parent(rsc)->variant == pe_master + && target_role_e > RSC_ROLE_STOPPED + && target_role_e < RSC_ROLE_MASTER + && safe_str_neq(target_role, role2text(rsc->role))) { + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%starget-role:%s", flagOffset?", ":"", target_role); + rsc->cluster->disabled_resources++; } } - if(is_not_set(rsc->flags, pe_rsc_managed)) { - offset += snprintf(buffer + offset, LINE_MAX - offset, " (unmanaged)"); + if (is_set(rsc->flags, pe_rsc_block)) { + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%sblocked", flagOffset?", ":""); + rsc->cluster->blocked_resources++; + + } else if (is_not_set(rsc->flags, pe_rsc_managed)) { + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%sunmanaged", flagOffset?", ":""); } + if(is_set(rsc->flags, pe_rsc_failure_ignored)) { - offset += snprintf(buffer + offset, LINE_MAX - offset, " (failure ignored)"); + flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset, "%sfailure ignored", flagOffset?", ":""); } if ((options & pe_print_rsconly) || g_list_length(rsc->running_on) > 1) { - const char *desc = crm_element_value(rsc->xml, XML_ATTR_DESC); - if(desc) { - offset += snprintf(buffer + offset, LINE_MAX - offset, " %s", desc); - } + desc = crm_element_value(rsc->xml, XML_ATTR_DESC); } CRM_LOG_ASSERT(offset > 0); - status_print("%s", buffer); + if(flagOffset > 0) { + status_print("%s ( %s ) %s", buffer, flagBuffer, desc?desc:""); + } else { + status_print("%s %s", buffer, desc?desc:""); + } #if CURSES_ENABLED if ((options & pe_print_rsconly) || g_list_length(rsc->running_on) > 1) { diff --git a/lib/pengine/remote.c b/lib/pengine/remote.c new file mode 100644 index 00000000000..e8d9bab6279 --- /dev/null +++ b/lib/pengine/remote.c @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2013 Andrew Beekhof + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include +#include +#include +#include +#include + +gboolean +is_rsc_baremetal_remote_node(resource_t *rsc, pe_working_set_t * data_set) +{ + node_t *node; + + if (rsc == NULL) { + return FALSE; + } else if (rsc->is_remote_node == FALSE) { + return FALSE; + } + + node = pe_find_node(data_set->nodes, rsc->id); + if (node == NULL) { + return FALSE; + } + + return is_baremetal_remote_node(node); +} + +gboolean +is_baremetal_remote_node(node_t *node) +{ + if (is_remote_node(node) && (node->details->remote_rsc == FALSE || node->details->remote_rsc->container == FALSE)) { + return TRUE; + } + return FALSE; +} + +gboolean +is_container_remote_node(node_t *node) +{ + if (is_remote_node(node) && (node->details->remote_rsc && node->details->remote_rsc->container)) { + return TRUE; + } + return FALSE; +} + +gboolean +is_remote_node(node_t *node) +{ + if (node && node->details->type == node_remote) { + return TRUE; + } + return FALSE; +} + +resource_t * +rsc_contains_remote_node(pe_working_set_t * data_set, resource_t *rsc) +{ + if (is_set(data_set->flags, pe_flag_have_remote_nodes) == FALSE) { + return NULL; + } + + if (rsc->fillers) { + GListPtr gIter = NULL; + for (gIter = rsc->fillers; gIter != NULL; gIter = gIter->next) { + resource_t *filler = (resource_t *) gIter->data; + + if (filler->is_remote_node) { + return filler; + } + } + } + return NULL; +} + +gboolean +xml_contains_remote_node(xmlNode *xml) +{ + const char *class = crm_element_value(xml, XML_AGENT_ATTR_CLASS); + const char *provider = crm_element_value(xml, XML_AGENT_ATTR_PROVIDER); + const char *agent = crm_element_value(xml, XML_ATTR_TYPE); + + if (safe_str_eq(agent, "remote") && safe_str_eq(provider, "pacemaker") && safe_str_eq(class, "ocf")) { + return TRUE; + } + return FALSE; +} + +/*! + * \internal + * \brief Execute a supplied function for each guest node running on a host + * + * \param[in] data_set Working set for cluster + * \param[in] host Host node to check + * \param[in] helper Function to call for each guest node + * \param[in/out] user_data Pointer to pass to helper function + */ +void +pe_foreach_guest_node(const pe_working_set_t *data_set, const node_t *host, + void (*helper)(const node_t*, void*), void *user_data) +{ + GListPtr iter; + + CRM_CHECK(data_set && host && host->details && helper, return); + if (!is_set(data_set->flags, pe_flag_have_remote_nodes)) { + return; + } + for (iter = host->details->running_rsc; iter != NULL; iter = iter->next) { + resource_t *rsc = (resource_t *) iter->data; + + if (rsc->is_remote_node && (rsc->container != NULL)) { + node_t *guest_node = pe_find_node(data_set->nodes, rsc->id); + + if (guest_node) { + (*helper)(guest_node, user_data); + } + } + } +} diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 982b18ef354..bf9b53fc4e4 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -42,7 +42,7 @@ CRM_TRACE_INIT_DATA(pe_status); } \ } while(0) -gboolean unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, +gboolean unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, xmlNode ** last_failure, enum action_fail_response *failed, pe_working_set_t * data_set); static gboolean determine_remote_online_status(pe_working_set_t * data_set, node_t * this_node); @@ -168,6 +168,10 @@ unpack_config(xmlNode * config, pe_working_set_t * data_set) data_set->stonith_action = pe_pref(data_set->config_hash, "stonith-action"); crm_trace("STONITH will %s nodes", data_set->stonith_action); + set_config_flag(data_set, "concurrent-fencing", pe_flag_concurrent_fencing); + crm_debug("Concurrent fencing is %s", + is_set(data_set->flags, pe_flag_concurrent_fencing) ? "enabled" : "disabled"); + set_config_flag(data_set, "stop-all-resources", pe_flag_stop_everything); crm_debug("Stop all active resources: %s", is_set(data_set->flags, pe_flag_stop_everything) ? "true" : "false"); @@ -1145,6 +1149,8 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set) { const char *id = NULL; const char *uname = NULL; + const char *shutdown = NULL; + GListPtr gIter = NULL; xmlNode *state = NULL; @@ -1190,6 +1196,15 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set) attrs = find_xml_node(state, XML_TAG_TRANSIENT_NODEATTRS, FALSE); add_node_attrs(attrs, this_node, TRUE, data_set); + shutdown = g_hash_table_lookup(this_node->details->attrs, XML_CIB_ATTR_SHUTDOWN); + if (shutdown != NULL && safe_str_neq("0", shutdown)) { + resource_t *rsc = this_node->details->remote_rsc; + + crm_info("Node %s is shutting down", this_node->details->uname); + this_node->details->shutdown = TRUE; + rsc->next_role = RSC_ROLE_STOPPED; + } + if (crm_is_true(g_hash_table_lookup(this_node->details->attrs, "standby"))) { crm_info("Node %s is in standby-mode", this_node->details->uname); this_node->details->standby = TRUE; @@ -2125,6 +2140,7 @@ unpack_lrm_rsc_state(node_t * node, xmlNode * rsc_entry, pe_working_set_t * data xmlNode *migrate_op = NULL; xmlNode *rsc_op = NULL; + xmlNode *last_failure = NULL; enum action_fail_response on_fail = FALSE; enum rsc_role_e saved_role = RSC_ROLE_UNKNOWN; @@ -2168,7 +2184,7 @@ unpack_lrm_rsc_state(node_t * node, xmlNode * rsc_entry, pe_working_set_t * data migrate_op = rsc_op; } - unpack_rsc_op(rsc, node, rsc_op, &on_fail, data_set); + unpack_rsc_op(rsc, node, rsc_op, &last_failure, &on_fail, data_set); } /* create active recurring operations as optional */ @@ -2552,7 +2568,8 @@ static const char *get_op_key(xmlNode *xml_op) } static void -unpack_rsc_op_failure(resource_t *rsc, node_t *node, int rc, xmlNode *xml_op, enum action_fail_response *on_fail, pe_working_set_t * data_set) +unpack_rsc_op_failure(resource_t * rsc, node_t * node, int rc, xmlNode * xml_op, xmlNode ** last_failure, + enum action_fail_response * on_fail, pe_working_set_t * data_set) { int interval = 0; bool is_probe = FALSE; @@ -2563,6 +2580,9 @@ unpack_rsc_op_failure(resource_t *rsc, node_t *node, int rc, xmlNode *xml_op, en const char *op_version = crm_element_value(xml_op, XML_ATTR_CRM_VERSION); CRM_ASSERT(rsc); + + *last_failure = xml_op; + crm_element_value_int(xml_op, XML_LRM_ATTR_INTERVAL, &interval); if(interval == 0 && safe_str_eq(task, CRMD_ACTION_STATUS)) { is_probe = TRUE; @@ -2866,7 +2886,7 @@ static bool check_operation_expiry(resource_t *rsc, node_t *node, int rc, xmlNod digest_data = rsc_action_digest_cmp(rsc, xml_op, node, data_set); if (digest_data->rc == RSC_DIGEST_UNKNOWN) { - crm_trace("rsc op %s on node %s does not have a op digest to compare against", rsc->id, + crm_trace("rsc op %s/%s on node %s does not have a op digest to compare against", rsc->id, key, node->details->id); } else if (digest_data->rc != RSC_DIGEST_MATCH) { clear_failcount = 1; @@ -2930,12 +2950,14 @@ get_action_on_fail(resource_t *rsc, const char *key, const char *task, pe_workin } static void -update_resource_state(resource_t *rsc, node_t * node, xmlNode * xml_op, const char *task, int rc, - enum action_fail_response *on_fail, pe_working_set_t * data_set) +update_resource_state(resource_t * rsc, node_t * node, xmlNode * xml_op, const char * task, int rc, + xmlNode * last_failure, enum action_fail_response * on_fail, pe_working_set_t * data_set) { gboolean clear_past_failure = FALSE; CRM_ASSERT(rsc); + CRM_ASSERT(xml_op); + if (rc == PCMK_OCF_NOT_RUNNING) { clear_past_failure = TRUE; @@ -2943,7 +2965,15 @@ update_resource_state(resource_t *rsc, node_t * node, xmlNode * xml_op, const ch rsc->role = RSC_ROLE_STOPPED; } else if (safe_str_eq(task, CRMD_ACTION_STATUS)) { - clear_past_failure = TRUE; + if (last_failure) { + const char *op_key = get_op_key(xml_op); + const char *last_failure_key = get_op_key(last_failure); + + if (safe_str_eq(op_key, last_failure_key)) { + clear_past_failure = TRUE; + } + } + if (rsc->role < RSC_ROLE_STARTED) { set_active(rsc); } @@ -2972,7 +3002,6 @@ update_resource_state(resource_t *rsc, node_t * node, xmlNode * xml_op, const ch unpack_rsc_migration(rsc, node, xml_op, data_set); } else if (rsc->role < RSC_ROLE_STARTED) { - /* migrate_to and migrate_from will land here */ pe_rsc_trace(rsc, "%s active on %s", rsc->id, node->details->uname); set_active(rsc); } @@ -3010,7 +3039,7 @@ update_resource_state(resource_t *rsc, node_t * node, xmlNode * xml_op, const ch } gboolean -unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, +unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, xmlNode ** last_failure, enum action_fail_response * on_fail, pe_working_set_t * data_set) { int task_id = 0; @@ -3161,7 +3190,7 @@ unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, case PCMK_LRM_OP_DONE: pe_rsc_trace(rsc, "%s/%s completed on %s", rsc->id, task, node->details->uname); - update_resource_state(rsc, node, xml_op, task, rc, on_fail, data_set); + update_resource_state(rsc, node, xml_op, task, rc, *last_failure, on_fail, data_set); break; case PCMK_LRM_OP_NOT_INSTALLED: @@ -3174,7 +3203,7 @@ unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, *on_fail = action_fail_migrate; } resource_location(parent, node, -INFINITY, "hard-error", data_set); - unpack_rsc_op_failure(rsc, node, rc, xml_op, on_fail, data_set); + unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail, data_set); break; case PCMK_LRM_OP_ERROR: @@ -3191,7 +3220,7 @@ unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, crm_warn("Pretending the failure of %s (rc=%d) on %s succeeded", task_key, rc, node->details->uname); - update_resource_state(rsc, node, xml_op, task, target_rc, on_fail, data_set); + update_resource_state(rsc, node, xml_op, task, target_rc, *last_failure, on_fail, data_set); crm_xml_add(xml_op, XML_ATTR_UNAME, node->details->uname); set_bit(rsc->flags, pe_rsc_failure_ignored); @@ -3202,7 +3231,7 @@ unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op, } } else { - unpack_rsc_op_failure(rsc, node, rc, xml_op, on_fail, data_set); + unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail, data_set); if(status == PCMK_LRM_OP_ERROR_HARD) { do_crm_log(rc != PCMK_OCF_NOT_INSTALLED?LOG_ERR:LOG_NOTICE, diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c index 2f2a93a6361..ec7b380ff90 100644 --- a/lib/pengine/utils.c +++ b/lib/pengine/utils.c @@ -35,7 +35,6 @@ void unpack_operation(action_t * action, xmlNode * xml_obj, resource_t * contain pe_working_set_t * data_set); static xmlNode *find_rsc_op_entry_helper(resource_t * rsc, const char *key, gboolean include_disabled); -static gboolean is_rsc_baremetal_remote_node(resource_t *rsc, pe_working_set_t * data_set); bool pe_can_fence(pe_working_set_t * data_set, node_t *node) { @@ -64,7 +63,7 @@ bool pe_can_fence(pe_working_set_t * data_set, node_t *node) } node_t * -node_copy(node_t * this_node) +node_copy(const node_t *this_node) { node_t *new_node = NULL; @@ -398,7 +397,7 @@ custom_action(resource_t * rsc, char *key, const char *task, if (action == NULL) { if (save_action) { pe_rsc_trace(rsc, "Creating%s action %d: %s for %s on %s %d", - optional ? "" : " manditory", data_set->action_id, key, + optional ? "" : " mandatory", data_set->action_id, key, rsc ? rsc->id : "", on_node ? on_node->details->uname : "", optional); } @@ -803,7 +802,7 @@ unpack_operation(action_t * action, xmlNode * xml_obj, resource_t * container, action->on_fail = action_fail_restart_container; value = "restart container (and possibly migrate) (default)"; - /* for barmetal remote nodes, ensure that any failure that results in + /* for baremetal remote nodes, ensure that any failure that results in * dropping an active connection to a remote node results in fencing of * the remote node. * @@ -1192,7 +1191,7 @@ find_first_action(GListPtr input, const char *uuid, const char *task, node_t * o } GListPtr -find_actions(GListPtr input, const char *key, node_t * on_node) +find_actions(GListPtr input, const char *key, const node_t *on_node) { GListPtr gIter = input; GListPtr result = NULL; @@ -2020,85 +2019,6 @@ const char *rsc_printable_id(resource_t *rsc) return rsc->id; } -gboolean -is_rsc_baremetal_remote_node(resource_t *rsc, pe_working_set_t * data_set) -{ - node_t *node; - - if (rsc == NULL) { - return FALSE; - } else if (rsc->is_remote_node == FALSE) { - return FALSE; - } - - node = pe_find_node(data_set->nodes, rsc->id); - if (node == NULL) { - return FALSE; - } - - return is_baremetal_remote_node(node); -} - -gboolean -is_baremetal_remote_node(node_t *node) -{ - if (is_remote_node(node) && (node->details->remote_rsc == FALSE || node->details->remote_rsc->container == FALSE)) { - return TRUE; - } - return FALSE; -} - -gboolean -is_container_remote_node(node_t *node) -{ - if (is_remote_node(node) && (node->details->remote_rsc && node->details->remote_rsc->container)) { - return TRUE; - } - return FALSE; -} - -gboolean -is_remote_node(node_t *node) -{ - if (node && node->details->type == node_remote) { - return TRUE; - } - return FALSE; -} - -resource_t * -rsc_contains_remote_node(pe_working_set_t * data_set, resource_t *rsc) -{ - if (is_set(data_set->flags, pe_flag_have_remote_nodes) == FALSE) { - return NULL; - } - - if (rsc->fillers) { - GListPtr gIter = NULL; - for (gIter = rsc->fillers; gIter != NULL; gIter = gIter->next) { - resource_t *filler = (resource_t *) gIter->data; - - if (filler->is_remote_node) { - return filler; - } - } - } - return NULL; -} - -gboolean -xml_contains_remote_node(xmlNode *xml) -{ - const char *class = crm_element_value(xml, XML_AGENT_ATTR_CLASS); - const char *provider = crm_element_value(xml, XML_AGENT_ATTR_PROVIDER); - const char *agent = crm_element_value(xml, XML_ATTR_TYPE); - - if (safe_str_eq(agent, "remote") && safe_str_eq(provider, "pacemaker") && safe_str_eq(class, "ocf")) { - return TRUE; - } - return FALSE; -} - void clear_bit_recursive(resource_t * rsc, unsigned long long flag) { diff --git a/lib/services/dbus.c b/lib/services/dbus.c index cbc422c6d96..d36c73d9238 100644 --- a/lib/services/dbus.c +++ b/lib/services/dbus.c @@ -518,7 +518,7 @@ static dbus_bool_t pcmk_dbus_timeout_add(DBusTimeout *timeout, void *data){ guint id = g_timeout_add(dbus_timeout_get_interval(timeout), pcmk_dbus_timeout_dispatch, timeout); - crm_trace("Adding timeout %p (%ld)", timeout, dbus_timeout_get_interval(timeout)); + crm_trace("Adding timeout %p (%d)", timeout, dbus_timeout_get_interval(timeout)); if(id) { dbus_timeout_set_data(timeout, GUINT_TO_POINTER(id), NULL); diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index a9b09efde62..2cfe368d946 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -89,7 +89,7 @@ svc_read_output(int fd, svc_action_t * op, bool is_stderr) crm_trace("Reading %s stdout into offset %d", op->id, len); } else { - crm_trace("Reading %s %s", op->id, is_stderr?"stderr":"stdout", len); + crm_trace("Reading %s %s into offset %d", op->id, is_stderr?"stderr":"stdout", len); } do { @@ -457,13 +457,19 @@ action_launch_child(svc_action_t *op) _exit(op->rc); } +#ifndef HAVE_SYS_SIGNALFD_H +static int sigchld_pipe[2]; + static void -action_synced_wait(svc_action_t * op, sigset_t mask) +sigchld_handler() { + write(sigchld_pipe[1], "", 1); +} +#endif -#ifndef HAVE_SYS_SIGNALFD_H - CRM_ASSERT(FALSE); -#else +static void +action_synced_wait(svc_action_t * op, sigset_t *mask) +{ int status = 0; int timeout = op->timeout; int sfd = -1; @@ -471,10 +477,14 @@ action_synced_wait(svc_action_t * op, sigset_t mask) struct pollfd fds[3]; int wait_rc = 0; - sfd = signalfd(-1, &mask, SFD_NONBLOCK); +#ifdef HAVE_SYS_SIGNALFD_H + sfd = signalfd(-1, mask, SFD_NONBLOCK); if (sfd < 0) { crm_perror(LOG_ERR, "signalfd() failed"); } +#else + sfd = sigchld_pipe[0]; +#endif fds[0].fd = op->opaque->stdout_fd; fds[0].events = POLLIN; @@ -503,6 +513,7 @@ action_synced_wait(svc_action_t * op, sigset_t mask) } if (fds[2].revents & POLLIN) { +#ifdef HAVE_SYS_SIGNALFD_H struct signalfd_siginfo fdsi; ssize_t s; @@ -511,6 +522,12 @@ action_synced_wait(svc_action_t * op, sigset_t mask) crm_perror(LOG_ERR, "Read from signal fd %d failed", sfd); } else if (fdsi.ssi_signo == SIGCHLD) { +#else + if (1) { + /* Clear out the sigchld pipe. */ + char ch; + while (read(sfd, &ch, 1) == 1); +#endif wait_rc = waitpid(op->pid, &status, WNOHANG); if (wait_rc < 0){ @@ -583,10 +600,10 @@ action_synced_wait(svc_action_t * op, sigset_t mask) close(op->opaque->stdout_fd); close(op->opaque->stderr_fd); - close(sfd); +#ifdef HAVE_SYS_SIGNALFD_H + close(sfd); #endif - } /* For an asynchronous 'op', returns FALSE if 'op' should be free'd by the caller */ @@ -596,22 +613,62 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) { int stdout_fd[2]; int stderr_fd[2]; + struct stat st; + sigset_t *pmask; + +#ifdef HAVE_SYS_SIGNALFD_H sigset_t mask; sigset_t old_mask; - struct stat st; +#define sigchld_cleanup() { \ + if (sigismember(&old_mask, SIGCHLD) == 0) { \ + if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { \ + crm_perror(LOG_ERR, "sigprocmask() failed to unblock sigchld"); \ + } \ + } \ +} +#else + struct sigaction sa; + struct sigaction old_sa; +#define sigchld_cleanup() { \ + if (sigaction(SIGCHLD, &old_sa, NULL) < 0) { \ + crm_perror(LOG_ERR, "sigaction() failed to remove sigchld handler"); \ + } \ + close(sigchld_pipe[0]); \ + close(sigchld_pipe[1]); \ +} +#endif - if (pipe(stdout_fd) < 0) { - crm_err("pipe() failed"); + /* Fail fast */ + if(stat(op->opaque->exec, &st) != 0) { + int rc = errno; + crm_warn("Cannot execute '%s': %s (%d)", op->opaque->exec, pcmk_strerror(rc), rc); + services_handle_exec_error(op, rc); + if (!synchronous) { + return operation_finalize(op); + } + return FALSE; } - if (pipe(stderr_fd) < 0) { - crm_err("pipe() failed"); + if (pipe(stdout_fd) < 0) { + int rc = errno; + + crm_err("pipe(stdout_fd) failed. '%s': %s (%d)", op->opaque->exec, pcmk_strerror(rc), rc); + + services_handle_exec_error(op, rc); + if (!synchronous) { + return operation_finalize(op); + } + return FALSE; } - /* Fail fast */ - if(stat(op->opaque->exec, &st) != 0) { + if (pipe(stderr_fd) < 0) { int rc = errno; - crm_warn("Cannot execute '%s': %s (%d)", op->opaque->exec, pcmk_strerror(rc), rc); + + close(stdout_fd[0]); + close(stdout_fd[1]); + + crm_err("pipe(stderr_fd) failed. '%s': %s (%d)", op->opaque->exec, pcmk_strerror(rc), rc); + services_handle_exec_error(op, rc); if (!synchronous) { return operation_finalize(op); @@ -620,13 +677,33 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) } if (synchronous) { +#ifdef HAVE_SYS_SIGNALFD_H sigemptyset(&mask); sigaddset(&mask, SIGCHLD); sigemptyset(&old_mask); if (sigprocmask(SIG_BLOCK, &mask, &old_mask) < 0) { - crm_perror(LOG_ERR, "sigprocmask() failed"); + crm_perror(LOG_ERR, "sigprocmask() failed to block sigchld"); + } + + pmask = &mask; +#else + if(pipe(sigchld_pipe) == -1) { + crm_perror(LOG_ERR, "pipe() failed"); } + + set_fd_opts(sigchld_pipe[0], O_NONBLOCK); + set_fd_opts(sigchld_pipe[1], O_NONBLOCK); + + sa.sa_handler = sigchld_handler; + sa.sa_flags = 0; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGCHLD, &sa, &old_sa) < 0) { + crm_perror(LOG_ERR, "sigaction() failed to set sigchld handler"); + } + + pmask = NULL; +#endif } op->pid = fork(); @@ -645,6 +722,8 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) if (!synchronous) { return operation_finalize(op); } + + sigchld_cleanup(); return FALSE; } case 0: /* Child */ @@ -663,7 +742,12 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) close(stderr_fd[1]); } + if (synchronous) { + sigchld_cleanup(); + } + action_launch_child(op); + CRM_ASSERT(0); /* action_launch_child is effectively noreturn */ } /* Only the parent reaches here */ @@ -677,14 +761,8 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) set_fd_opts(op->opaque->stderr_fd, O_NONBLOCK); if (synchronous) { - action_synced_wait(op, mask); - - if (sigismember(&old_mask, SIGCHLD) == 0) { - if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0) { - crm_perror(LOG_ERR, "sigprocmask() to unblocked failed"); - } - } - + action_synced_wait(op, pmask); + sigchld_cleanup(); } else { crm_trace("Async waiting for %d - %s", op->pid, op->opaque->exec); diff --git a/lib/services/services_private.h b/lib/services/services_private.h index 802ce0b2934..43aedc65771 100644 --- a/lib/services/services_private.h +++ b/lib/services/services_private.h @@ -2,7 +2,7 @@ * Copyright (C) 2010 - 2011, Red Hat, Inc. * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/lib/services/systemd.c b/lib/services/systemd.c index a851bc6dcd0..eb5f8aa44bf 100644 --- a/lib/services/systemd.c +++ b/lib/services/systemd.c @@ -150,16 +150,13 @@ systemd_daemon_reload(int timeout) { static unsigned int reload_count = 0; const char *method = "Reload"; - + DBusMessage *msg = systemd_new_method(BUS_NAME".Manager", method); reload_count++; - if(reload_count % 10 == 0) { - DBusMessage *msg = systemd_new_method(BUS_NAME".Manager", method); + CRM_ASSERT(msg != NULL); + pcmk_dbus_send(msg, systemd_proxy, systemd_daemon_reload_complete, GUINT_TO_POINTER(reload_count), timeout); + dbus_message_unref(msg); - CRM_ASSERT(msg != NULL); - pcmk_dbus_send(msg, systemd_proxy, systemd_daemon_reload_complete, GUINT_TO_POINTER(reload_count), timeout); - dbus_message_unref(msg); - } return TRUE; } diff --git a/lib/services/systemd.h b/lib/services/systemd.h index c86bafe5b87..acd832e9b84 100644 --- a/lib/services/systemd.h +++ b/lib/services/systemd.h @@ -1,6 +1,6 @@ /* * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * @@ -9,7 +9,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * diff --git a/lib/services/upstart.h b/lib/services/upstart.h index 889b7b70147..a8372266c77 100644 --- a/lib/services/upstart.h +++ b/lib/services/upstart.h @@ -1,6 +1,6 @@ /* * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * @@ -9,7 +9,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * diff --git a/lib/transition/unpack.c b/lib/transition/unpack.c index 01c71f25d27..c873ebf0d36 100644 --- a/lib/transition/unpack.c +++ b/lib/transition/unpack.c @@ -32,7 +32,6 @@ static crm_action_t * unpack_action(synapse_t * parent, xmlNode * xml_action) { crm_action_t *action = NULL; - xmlNode *action_copy = NULL; const char *value = crm_element_value(xml_action, XML_ATTR_ID); if (value == NULL) { @@ -41,28 +40,25 @@ unpack_action(synapse_t * parent, xmlNode * xml_action) return NULL; } - action_copy = copy_xml(xml_action); action = calloc(1, sizeof(crm_action_t)); - if (action == NULL) { - return NULL; - } + CRM_CHECK(action != NULL, return NULL); action->id = crm_parse_int(value, NULL); action->type = action_type_rsc; - action->xml = action_copy; + action->xml = copy_xml(xml_action); action->synapse = parent; - if (safe_str_eq(crm_element_name(action_copy), XML_GRAPH_TAG_RSC_OP)) { + if (safe_str_eq(crm_element_name(action->xml), XML_GRAPH_TAG_RSC_OP)) { action->type = action_type_rsc; - } else if (safe_str_eq(crm_element_name(action_copy), XML_GRAPH_TAG_PSEUDO_EVENT)) { + } else if (safe_str_eq(crm_element_name(action->xml), XML_GRAPH_TAG_PSEUDO_EVENT)) { action->type = action_type_pseudo; - } else if (safe_str_eq(crm_element_name(action_copy), XML_GRAPH_TAG_CRM_EVENT)) { + } else if (safe_str_eq(crm_element_name(action->xml), XML_GRAPH_TAG_CRM_EVENT)) { action->type = action_type_crm; } - action->params = xml2list(action_copy); + action->params = xml2list(action->xml); value = g_hash_table_lookup(action->params, "CRM_meta_timeout"); if (value != NULL) { diff --git a/lib/transition/utils.c b/lib/transition/utils.c index 30a10079cdd..d3199d9c216 100644 --- a/lib/transition/utils.c +++ b/lib/transition/utils.c @@ -233,7 +233,7 @@ print_graph(unsigned int log_level, crm_graph_t * graph) do_crm_log(log_level, "Graph %d with %d actions:" " batch-limit=%d jobs, network-delay=%dms", - graph->id, graph->num_actions, graph->num_synapses, + graph->id, graph->num_actions, graph->batch_limit, graph->network_delay); for (lpc = graph->synapses; lpc != NULL; lpc = lpc->next) { diff --git a/lrmd/ipc_proxy.c b/lrmd/ipc_proxy.c index 84fb3ec4a46..07c13ab84a2 100644 --- a/lrmd/ipc_proxy.c +++ b/lrmd/ipc_proxy.c @@ -42,34 +42,46 @@ static qb_ipcs_service_t *crmd_ipcs = NULL; static qb_ipcs_service_t *stonith_ipcs = NULL; /* ipc providers == crmd clients connecting from cluster nodes */ -GHashTable *ipc_providers; +static GHashTable *ipc_providers = NULL; /* ipc clients == things like cibadmin, crm_resource, connecting locally */ -GHashTable *ipc_clients; +static GHashTable *ipc_clients = NULL; + +/*! + * \internal + * \brief Get an IPC proxy provider + * + * \return Pointer to a provider if one exists, NULL otherwise + * + * \note Grab the first provider available; any provider will work, and usually + * there will be only one. These are client connections originating from a + * cluster node's crmd. + */ +crm_client_t * +ipc_proxy_get_provider() +{ + if (ipc_providers) { + GHashTableIter iter; + gpointer key = NULL; + gpointer value = NULL; + + g_hash_table_iter_init(&iter, ipc_providers); + if (g_hash_table_iter_next(&iter, &key, &value)) { + return (crm_client_t*)value; + } + } + return NULL; +} static int32_t ipc_proxy_accept(qb_ipcs_connection_t * c, uid_t uid, gid_t gid, const char *ipc_channel) { - void *key = NULL; - void *value = NULL; crm_client_t *client; - crm_client_t *ipc_proxy = NULL; - GHashTableIter iter; + crm_client_t *ipc_proxy = ipc_proxy_get_provider(); xmlNode *msg; crm_trace("Connection %p on channel %s", c, ipc_channel); - if (g_hash_table_size(ipc_providers) == 0) { - crm_err("No ipc providers available for uid %d gid %d", uid, gid); - return -EREMOTEIO; - } - - g_hash_table_iter_init(&iter, ipc_providers); - if (g_hash_table_iter_next(&iter, (gpointer *) & key, (gpointer *) & value)) { - /* grab the first provider available, any provider in this - * table will work. Usually there will only be one. These are - * lrmd client connections originating for a cluster node's crmd. */ - ipc_proxy = value; - } else { + if (ipc_proxy == NULL) { crm_err("No ipc providers available for uid %d gid %d", uid, gid); return -EREMOTEIO; } @@ -89,7 +101,7 @@ ipc_proxy_accept(qb_ipcs_connection_t * c, uid_t uid, gid_t gid, const char *ipc g_hash_table_insert(ipc_clients, client->id, client); msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(msg, F_LRMD_IPC_OP, "new"); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_NEW); crm_xml_add(msg, F_LRMD_IPC_IPC_SERVER, ipc_channel); crm_xml_add(msg, F_LRMD_IPC_SESSION, client->id); lrmd_server_send_notify(ipc_proxy, msg); @@ -140,12 +152,22 @@ ipc_proxy_forward_client(crm_client_t *ipc_proxy, xmlNode *xml) const char *session = crm_element_value(xml, F_LRMD_IPC_SESSION); const char *msg_type = crm_element_value(xml, F_LRMD_IPC_OP); xmlNode *msg = get_message_xml(xml, F_LRMD_IPC_MSG); - crm_client_t *ipc_client = crm_client_get_by_id(session); + crm_client_t *ipc_client; int rc = 0; + /* If the IPC provider is acknowledging our shutdown request, + * defuse the short exit timer to give the cluster time to + * stop any resources we're running. + */ + if (safe_str_eq(msg_type, LRMD_IPC_OP_SHUTDOWN_ACK)) { + handle_shutdown_ack(); + return; + } + + ipc_client = crm_client_get_by_id(session); if (ipc_client == NULL) { xmlNode *msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(msg, F_LRMD_IPC_OP, "destroy"); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_DESTROY); crm_xml_add(msg, F_LRMD_IPC_SESSION, session); lrmd_server_send_notify(ipc_proxy, msg); free_xml(msg); @@ -164,11 +186,11 @@ ipc_proxy_forward_client(crm_client_t *ipc_proxy, xmlNode *xml) * and forwarding it to connection 1. */ - if (safe_str_eq(msg_type, "event")) { + if (safe_str_eq(msg_type, LRMD_IPC_OP_EVENT)) { crm_trace("Sending event to %s", ipc_client->id); rc = crm_ipcs_send(ipc_client, 0, msg, crm_ipc_server_event); - } else if (safe_str_eq(msg_type, "response")) { + } else if (safe_str_eq(msg_type, LRMD_IPC_OP_RESPONSE)) { int msg_id = 0; crm_element_value_int(xml, F_LRMD_IPC_MSG_ID, &msg_id); @@ -178,7 +200,7 @@ ipc_proxy_forward_client(crm_client_t *ipc_proxy, xmlNode *xml) CRM_LOG_ASSERT(msg_id == ipc_client->request_id); ipc_client->request_id = 0; - } else if (safe_str_eq(msg_type, "destroy")) { + } else if (safe_str_eq(msg_type, LRMD_IPC_OP_DESTROY)) { qb_ipcs_disconnect(ipc_client->ipcs); } else { @@ -233,7 +255,7 @@ ipc_proxy_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) client->request_id = id; msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(msg, F_LRMD_IPC_OP, "request"); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_REQUEST); crm_xml_add(msg, F_LRMD_IPC_SESSION, client->id); crm_xml_add(msg, F_LRMD_IPC_CLIENT, crm_client_name(client)); crm_xml_add(msg, F_LRMD_IPC_USER, client->user); @@ -247,6 +269,30 @@ ipc_proxy_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) return 0; } +/*! + * \internal + * \brief Notify a proxy provider that we wish to shut down + * + * \return 0 on success, -1 on error + */ +int +ipc_proxy_shutdown_req(crm_client_t *ipc_proxy) +{ + xmlNode *msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); + int rc; + + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_SHUTDOWN_REQ); + + /* We don't really have a session, but crmd needs this attribute + * to recognize this as proxy communication. + */ + crm_xml_add(msg, F_LRMD_IPC_SESSION, "0"); + + rc = (lrmd_server_send_notify(ipc_proxy, msg) < 0)? -1 : 0; + free_xml(msg); + return rc; +} + static int32_t ipc_proxy_closed(qb_ipcs_connection_t * c) { @@ -263,7 +309,7 @@ ipc_proxy_closed(qb_ipcs_connection_t * c) if (ipc_proxy) { xmlNode *msg = create_xml_node(NULL, T_LRMD_IPC_PROXY); - crm_xml_add(msg, F_LRMD_IPC_OP, "destroy"); + crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_DESTROY); crm_xml_add(msg, F_LRMD_IPC_SESSION, client->id); lrmd_server_send_notify(ipc_proxy, msg); free_xml(msg); diff --git a/lrmd/lrmd.c b/lrmd/lrmd.c index a64b430923e..cb4fdd9ffed 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -900,6 +900,8 @@ action_complete(svc_action_t * action) /* Ok, so this is the follow up monitor action to check if start actually completed */ if(cmd->lrmd_op_status == PCMK_LRM_OP_DONE && cmd->exec_rc == PCMK_OCF_PENDING) { goagain = true; + } else if(cmd->exec_rc == PCMK_OCF_OK && safe_str_eq(cmd->real_action, "stop")) { + goagain = true; } else { #ifdef HAVE_SYS_TIMEB_H @@ -1378,13 +1380,16 @@ process_lrmd_signon(crm_client_t * client, uint32_t id, xmlNode * request) const char *is_ipc_provider = crm_element_value(request, F_LRMD_IS_IPC_PROVIDER); const char *protocol_version = crm_element_value(request, F_LRMD_PROTOCOL_VERSION); - if (safe_str_neq(protocol_version, LRMD_PROTOCOL_VERSION)) { + if (compare_version(protocol_version, LRMD_PROTOCOL_VERSION) < 0) { + crm_err("Cluster API version must be greater than or equal to %s, not %s", + LRMD_PROTOCOL_VERSION, protocol_version); crm_xml_add_int(reply, F_LRMD_RC, -EPROTO); crm_xml_add(reply, F_LRMD_PROTOCOL_VERSION, LRMD_PROTOCOL_VERSION); } crm_xml_add(reply, F_LRMD_OPERATION, CRM_OP_REGISTER); crm_xml_add(reply, F_LRMD_CLIENTID, client->id); + crm_xml_add(reply, F_LRMD_PROTOCOL_VERSION, LRMD_PROTOCOL_VERSION); lrmd_server_send_reply(client, id, reply); if (crm_is_true(is_ipc_provider)) { @@ -1681,6 +1686,11 @@ process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) } else if (crm_str_eq(op, LRMD_OP_POKE, TRUE)) { do_notify = 1; do_reply = 1; + } else if (crm_str_eq(op, LRMD_OP_CHECK, TRUE)) { + xmlNode *data = get_message_xml(request, F_LRMD_CALLDATA); + const char *timeout = crm_element_value(data, F_LRMD_WATCHDOG); + CRM_LOG_ASSERT(data != NULL); + check_sbd_timeout(timeout); } else { rc = -EOPNOTSUPP; do_reply = 1; @@ -1688,8 +1698,8 @@ process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) crm_log_xml_warn(request, "UnknownOp"); } - crm_debug("Processed %s operation from %s: rc=%d, reply=%d, notify=%d, exit=%d", - op, client->id, rc, do_reply, do_notify, exit); + crm_debug("Processed %s operation from %s: rc=%d, reply=%d, notify=%d", + op, client->id, rc, do_reply, do_notify); if (do_reply) { send_reply(client, rc, id, call_id); diff --git a/lrmd/lrmd_private.h b/lrmd/lrmd_private.h index ddb1506d226..29146f5ec50 100644 --- a/lrmd/lrmd_private.h +++ b/lrmd/lrmd_private.h @@ -80,7 +80,9 @@ void process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) void free_rsc(gpointer data); -void lrmd_shutdown(int nsig); +void handle_shutdown_ack(void); + +void lrmd_client_destroy(crm_client_t *client); void client_disconnect_cleanup(const char *client_id); @@ -103,6 +105,8 @@ void ipc_proxy_cleanup(void); void ipc_proxy_add_provider(crm_client_t *client); void ipc_proxy_remove_provider(crm_client_t *client); void ipc_proxy_forward_client(crm_client_t *client, xmlNode *xml); +crm_client_t *ipc_proxy_get_provider(void); +int ipc_proxy_shutdown_req(crm_client_t *ipc_proxy); #endif #endif diff --git a/lrmd/main.c b/lrmd/main.c index a3b7929aeb9..7fc4d5f503f 100644 --- a/lrmd/main.c +++ b/lrmd/main.c @@ -40,6 +40,16 @@ static qb_ipcs_service_t *ipcs = NULL; stonith_t *stonith_api = NULL; int lrmd_call_id = 0; +#ifdef ENABLE_PCMK_REMOTE +/* whether shutdown request has been sent */ +static volatile sig_atomic_t shutting_down = FALSE; + +/* timer for waiting for acknowledgment of shutdown request */ +static volatile guint shutdown_ack_timer = 0; + +static gboolean lrmd_exit(gpointer data); +#endif + static void stonith_connection_destroy_cb(stonith_t * st, stonith_event_t * e) { @@ -151,6 +161,27 @@ lrmd_ipc_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) return 0; } +/*! + * \internal + * \brief Free a client connection, and exit if appropriate + * + * \param[in] client Client connection to free + */ +void +lrmd_client_destroy(crm_client_t *client) +{ + crm_client_destroy(client); + +#ifdef ENABLE_PCMK_REMOTE + /* If we were waiting to shut down, we can now safely do so + * if there are no more proxied IPC providers + */ + if (shutting_down && (ipc_proxy_get_provider() == NULL)) { + lrmd_exit(NULL); + } +#endif +} + static int32_t lrmd_ipc_closed(qb_ipcs_connection_t * c) { @@ -165,7 +196,7 @@ lrmd_ipc_closed(qb_ipcs_connection_t * c) #ifdef ENABLE_PCMK_REMOTE ipc_proxy_remove_provider(client); #endif - crm_client_destroy(client); + lrmd_client_destroy(client); return 0; } @@ -227,14 +258,110 @@ lrmd_server_send_notify(crm_client_t * client, xmlNode * msg) return -1; } -void -lrmd_shutdown(int nsig) +/*! + * \internal + * \brief Clean up and exit immediately + * + * \param[in] data Ignored + * + * \return Doesn't return + * \note This can be used as a timer callback. + */ +static gboolean +lrmd_exit(gpointer data) { crm_info("Terminating with %d clients", crm_hash_table_size(client_connections)); + + if (stonith_api) { + stonith_api->cmds->remove_notification(stonith_api, T_STONITH_NOTIFY_DISCONNECT); + stonith_api->cmds->disconnect(stonith_api); + stonith_api_delete(stonith_api); + } if (ipcs) { mainloop_del_ipc_server(ipcs); } + +#ifdef ENABLE_PCMK_REMOTE + lrmd_tls_server_destroy(); + ipc_proxy_cleanup(); +#endif + + crm_client_cleanup(); + g_hash_table_destroy(rsc_list); crm_exit(pcmk_ok); + return FALSE; +} + +/*! + * \internal + * \brief Request cluster shutdown if appropriate, otherwise exit immediately + * + * \param[in] nsig Signal that caused invocation (ignored) + */ +static void +lrmd_shutdown(int nsig) +{ +#ifdef ENABLE_PCMK_REMOTE + crm_client_t *ipc_proxy = ipc_proxy_get_provider(); + + /* If there are active proxied IPC providers, then we may be running + * resources, so notify the cluster that we wish to shut down. + */ + if (ipc_proxy) { + if (shutting_down) { + crm_notice("Waiting for cluster to stop resources before exiting"); + return; + } + + crm_info("Sending shutdown request to cluster"); + if (ipc_proxy_shutdown_req(ipc_proxy) < 0) { + crm_crit("Shutdown request failed, exiting immediately"); + + } else { + /* We requested a shutdown. Now, we need to wait for an + * acknowledgement from the proxy host (which ensures the proxy host + * supports shutdown requests), then wait for all proxy hosts to + * disconnect (which ensures that all resources have been stopped). + */ + shutting_down = TRUE; + + /* Stop accepting new proxy connections */ + lrmd_tls_server_destroy(); + + /* Older crmd versions will never acknowledge our request, so set a + * fairly short timeout to exit quickly in that case. If we get the + * ack, we'll defuse this timer. + */ + shutdown_ack_timer = g_timeout_add_seconds(20, lrmd_exit, NULL); + + /* Currently, we let the OS kill us if the clients don't disconnect + * in a reasonable time. We could instead set a long timer here + * (shorter than what the OS is likely to use) and exit immediately + * if it pops. + */ + return; + } + } +#endif + lrmd_exit(NULL); +} + +/*! + * \internal + * \brief Defuse short exit timer if shutting down + */ +void handle_shutdown_ack() +{ +#ifdef ENABLE_PCMK_REMOTE + if (shutting_down) { + crm_info("Received shutdown ack"); + if (shutdown_ack_timer > 0) { + g_source_remove(shutdown_ack_timer); + } + return; + } +#endif + crm_debug("Ignoring unexpected shutdown ack"); } /* *INDENT-OFF* */ @@ -255,7 +382,6 @@ static struct crm_option long_options[] = { int main(int argc, char **argv) { - int rc = 0; int flag = 0; int index = 0; const char *option = NULL; @@ -349,19 +475,7 @@ main(int argc, char **argv) crm_info("Starting"); g_main_run(mainloop); - mainloop_del_ipc_server(ipcs); -#ifdef ENABLE_PCMK_REMOTE - lrmd_tls_server_destroy(); - ipc_proxy_cleanup(); -#endif - crm_client_cleanup(); - - g_hash_table_destroy(rsc_list); - - if (stonith_api) { - stonith_api->cmds->disconnect(stonith_api); - stonith_api_delete(stonith_api); - } - - return rc; + /* should never get here */ + lrmd_exit(NULL); + return pcmk_ok; } diff --git a/lrmd/pacemaker_remote.in b/lrmd/pacemaker_remote.in index ba890877ae0..cc64a09ee6a 100644 --- a/lrmd/pacemaker_remote.in +++ b/lrmd/pacemaker_remote.in @@ -60,13 +60,17 @@ status() # rpm based distros if [ -d @sysconfdir@/sysconfig ]; then [ -f @INITDIR@/functions ] && . @INITDIR@/functions + set -a [ -f @sysconfdir@/sysconfig/pacemaker ] && . @sysconfdir@/sysconfig/pacemaker + set +a [ -z "$LOCK_FILE" ] && LOCK_FILE="@localstatedir@/lock/subsys/pacemaker_remote" fi # deb based distros if [ -d @sysconfdir@/default ]; then + set -a [ -f @sysconfdir@/default/pacemaker ] && . @sysconfdir@/default/pacemaker + set +a [ -z "$LOCK_FILE" ] && LOCK_FILE="@localstatedir@/lock/pacemaker_remote" fi diff --git a/lrmd/pacemaker_remote.service.in b/lrmd/pacemaker_remote.service.in index 15e61fb727b..d5e79308032 100644 --- a/lrmd/pacemaker_remote.service.in +++ b/lrmd/pacemaker_remote.service.in @@ -9,11 +9,14 @@ WantedBy=multi-user.target Type=simple KillMode=process NotifyAccess=none -EnvironmentFile=-/etc/sysconfig/pacemaker +EnvironmentFile=-@sysconfdir@/sysconfig/pacemaker +EnvironmentFile=-@sysconfdir@/sysconfig/sbd ExecStart=@sbindir@/pacemaker_remoted -TimeoutStopSec=30s +# Pacemaker Remote can exit only after all managed services have shut down; +# an HA database could conceivably take even longer than this +TimeoutStopSec=30min TimeoutStartSec=30s # Restart options include: no, on-success, on-failure, on-abort or always diff --git a/lrmd/regression.py.in b/lrmd/regression.py.in index 21efb587f9b..a3397d07a8f 100755 --- a/lrmd/regression.py.in +++ b/lrmd/regression.py.in @@ -261,7 +261,7 @@ class Tests: "ocf_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:ocf_test_rsc action:stop rc:ok op_status:complete\" ", "ocf_monitor_line" : "-c exec -r \"ocf_test_rsc\" -a \"monitor\" -i \"2000\" "+self.action_timeout, "ocf_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:ocf_test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout, - "ocf_cancel_line" : "-c cancel -r \"ocf_test_rsc\" -a \"monitor\" -i \"2000\" -t \"3000\" ", + "ocf_cancel_line" : "-c cancel -r \"ocf_test_rsc\" -a \"monitor\" -i \"2000\" -t \"6000\" ", "ocf_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:ocf_test_rsc action:monitor rc:ok op_status:Cancelled\" ", "systemd_reg_line" : "-c register_rsc -r systemd_test_rsc "+self.action_timeout+" -C systemd -T lrmd_dummy_daemon", @@ -274,7 +274,7 @@ class Tests: "systemd_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:systemd_test_rsc action:stop rc:ok op_status:complete\" ", "systemd_monitor_line" : "-c exec -r \"systemd_test_rsc\" -a \"monitor\" -i \"2000\" "+self.action_timeout, "systemd_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:systemd_test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout, - "systemd_cancel_line" : "-c cancel -r \"systemd_test_rsc\" -a \"monitor\" -i \"2000\" -t \"3000\" ", + "systemd_cancel_line" : "-c cancel -r \"systemd_test_rsc\" -a \"monitor\" -i \"2000\" -t \"6000\" ", "systemd_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:systemd_test_rsc action:monitor rc:ok op_status:Cancelled\" ", "upstart_reg_line" : "-c register_rsc -r upstart_test_rsc "+self.action_timeout+" -C upstart -T lrmd_dummy_daemon", @@ -287,7 +287,7 @@ class Tests: "upstart_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:upstart_test_rsc action:stop rc:ok op_status:complete\" ", "upstart_monitor_line" : "-c exec -r \"upstart_test_rsc\" -a \"monitor\" -i \"2000\" "+self.action_timeout, "upstart_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:upstart_test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout, - "upstart_cancel_line" : "-c cancel -r \"upstart_test_rsc\" -a \"monitor\" -i \"2000\" -t \"3000\" ", + "upstart_cancel_line" : "-c cancel -r \"upstart_test_rsc\" -a \"monitor\" -i \"2000\" -t \"6000\" ", "upstart_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:upstart_test_rsc action:monitor rc:ok op_status:Cancelled\" ", "service_reg_line" : "-c register_rsc -r service_test_rsc "+self.action_timeout+" -C service -T LSBDummy", @@ -300,7 +300,7 @@ class Tests: "service_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:service_test_rsc action:stop rc:ok op_status:complete\" ", "service_monitor_line" : "-c exec -r \"service_test_rsc\" -a \"monitor\" -i \"2000\" "+self.action_timeout, "service_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:service_test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout, - "service_cancel_line" : "-c cancel -r \"service_test_rsc\" -a \"monitor\" -i \"2000\" -t \"3000\" ", + "service_cancel_line" : "-c cancel -r \"service_test_rsc\" -a \"monitor\" -i \"2000\" -t \"6000\" ", "service_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:service_test_rsc action:monitor rc:ok op_status:Cancelled\" ", "lsb_reg_line" : "-c register_rsc -r lsb_test_rsc "+self.action_timeout+" -C lsb -T LSBDummy", @@ -313,7 +313,7 @@ class Tests: "lsb_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:lsb_test_rsc action:stop rc:ok op_status:complete\" ", "lsb_monitor_line" : "-c exec -r \"lsb_test_rsc\" -a status -i \"2000\" "+self.action_timeout, "lsb_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:lsb_test_rsc action:status rc:ok op_status:complete\" "+self.action_timeout, - "lsb_cancel_line" : "-c cancel -r \"lsb_test_rsc\" -a \"status\" -i \"2000\" -t \"3000\" ", + "lsb_cancel_line" : "-c cancel -r \"lsb_test_rsc\" -a \"status\" -i \"2000\" -t \"6000\" ", "lsb_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:lsb_test_rsc action:status rc:ok op_status:Cancelled\" ", "heartbeat_reg_line" : "-c register_rsc -r hb_test_rsc "+self.action_timeout+" -C heartbeat -T HBDummy", @@ -326,7 +326,7 @@ class Tests: "heartbeat_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:hb_test_rsc action:stop rc:ok op_status:complete\" ", "heartbeat_monitor_line" : "-c exec -r \"hb_test_rsc\" -a status -k 1 -v a -k 2 -v b -i \"2000\" "+self.action_timeout, "heartbeat_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:hb_test_rsc action:status rc:ok op_status:complete\" "+self.action_timeout, - "heartbeat_cancel_line" : "-c cancel -r \"hb_test_rsc\" -a \"status\" -k 1 -v a -k 2 -v b -i \"2000\" -t \"3000\" ", + "heartbeat_cancel_line" : "-c cancel -r \"hb_test_rsc\" -a \"status\" -k 1 -v a -k 2 -v b -i \"2000\" -t \"6000\" ", "heartbeat_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:hb_test_rsc action:status rc:ok op_status:Cancelled\" ", "stonith_reg_line" : "-c register_rsc -r stonith_test_rsc "+self.action_timeout+" -C stonith -P pacemaker -T fence_dummy_monitor", @@ -339,7 +339,7 @@ class Tests: "stonith_stop_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:stonith_test_rsc action:stop rc:ok op_status:complete\" ", "stonith_monitor_line" : "-c exec -r \"stonith_test_rsc\" -a \"monitor\" -i \"2000\" "+self.action_timeout, "stonith_monitor_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:stonith_test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout, - "stonith_cancel_line" : "-c cancel -r \"stonith_test_rsc\" -a \"monitor\" -i \"2000\" -t \"3000\" ", + "stonith_cancel_line" : "-c cancel -r \"stonith_test_rsc\" -a \"monitor\" -i \"2000\" -t \"6000\" ", "stonith_cancel_event" : "-l \"NEW_EVENT event_type:exec_complete rsc_id:stonith_test_rsc action:monitor rc:ok op_status:Cancelled\" ", } @@ -631,7 +631,7 @@ if __name__ == "__main__": test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd_and_kill("rm -f @localstatedir@/run/Dummy-test_rsc.state", "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" -t 6000") - test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"3000\" " + test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"6000\" " "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" "+self.action_timeout) test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) @@ -648,7 +648,7 @@ if __name__ == "__main__": "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" ") test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd_and_kill("rm -f @localstatedir@/run/Dummy-test_rsc.state", "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" -t 6000") - test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"3000\" " + test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"6000\" " "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" "+self.action_timeout) test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) @@ -669,7 +669,7 @@ if __name__ == "__main__": test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd_and_kill("killall -9 -q lrmd_dummy_daemon", "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" -t 8000") - test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"3000\" " + test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"6000\" " "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" "+self.action_timeout) test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) @@ -690,7 +690,7 @@ if __name__ == "__main__": test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) test.add_cmd_and_kill("killall -9 -q dd", "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" -t 8000") - test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"3000\" " + test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"6000\" " "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:complete\" "+self.action_timeout) test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) @@ -708,9 +708,9 @@ if __name__ == "__main__": test.add_cmd("-c exec -r \"test_rsc\" -a \"monitor\" -i \"100\" "+self.action_timeout+ "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" ") test.add_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) - test.add_expected_fail_cmd("-c cancel -r test_rsc -a \"monitor\" -i 1234 -t \"3000\" " ### interval is wrong, should fail + test.add_expected_fail_cmd("-c cancel -r test_rsc -a \"monitor\" -i 1234 -t \"6000\" " ### interval is wrong, should fail "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") - test.add_expected_fail_cmd("-c cancel -r test_rsc -a stop -i 100 -t \"3000\" " ### action name is wrong, should fail + test.add_expected_fail_cmd("-c cancel -r test_rsc -a stop -i 100 -t \"6000\" " ### action name is wrong, should fail "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:not running op_status:Cancelled\" ") test.add_cmd("-c unregister_rsc -r \"test_rsc\" "+self.action_timeout+ "-l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\" ") @@ -721,7 +721,7 @@ if __name__ == "__main__": "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:start rc:unknown error op_status:complete\" ") test.add_expected_fail_cmd("-c exec -r test_rsc -a stop "+self.action_timeout+ "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:stop rc:ok op_status:complete\" ") - test.add_expected_fail_cmd("-c exec -r test_rsc -a monitor -i 3000 "+self.action_timeout+ + test.add_expected_fail_cmd("-c exec -r test_rsc -a monitor -i 6000 "+self.action_timeout+ "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" ") test.add_expected_fail_cmd("-c cancel -r test_rsc -a start "+self.action_timeout+ "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:start rc:ok op_status:Cancelled\" ") @@ -896,7 +896,7 @@ if __name__ == "__main__": "-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" ") # this will fail because the monitor notifications should only go to the original caller, which no longer exists. test.add_expected_fail_cmd("-l \"NEW_EVENT event_type:exec_complete rsc_id:test_rsc action:monitor rc:ok op_status:complete\" "+self.action_timeout) - test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"3000\" ") + test.add_cmd("-c cancel -r \"test_rsc\" -a \"monitor\" -i \"100\" -t \"6000\" ") test.add_cmd("-c unregister_rsc -r \"test_rsc\" "+self.action_timeout+ "-l \"NEW_EVENT event_type:unregister rsc_id:test_rsc action:none rc:ok op_status:complete\" ") diff --git a/lrmd/remote_ctl.c b/lrmd/remote_ctl.c index ad859541cba..1983c880de7 100644 --- a/lrmd/remote_ctl.c +++ b/lrmd/remote_ctl.c @@ -333,7 +333,7 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) crm_element_value_int(msg, F_LRMD_IPC_MSG_ID, &msg_id); /* This is msg from remote ipc client going to real ipc server */ - if (safe_str_eq(op, "new")) { + if (safe_str_eq(op, LRMD_IPC_OP_NEW)) { const char *channel = crm_element_value(msg, F_LRMD_IPC_IPC_SERVER); CRM_CHECK(channel != NULL, return); @@ -342,10 +342,10 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) remote_proxy_notify_destroy(lrmd, session); } crm_info("new remote proxy client established to %s, session id %s", channel, session); - } else if (safe_str_eq(op, "destroy")) { + } else if (safe_str_eq(op, LRMD_IPC_OP_DESTROY)) { remote_proxy_end_session(session); - } else if (safe_str_eq(op, "request")) { + } else if (safe_str_eq(op, LRMD_IPC_OP_REQUEST)) { int flags = 0; xmlNode *request = get_message_xml(msg, F_LRMD_IPC_MSG); const char *name = crm_element_value(msg, F_LRMD_IPC_CLIENT); diff --git a/lrmd/tls_backend.c b/lrmd/tls_backend.c index df5387f3fa0..1909fdf2800 100644 --- a/lrmd/tls_backend.c +++ b/lrmd/tls_backend.c @@ -79,6 +79,9 @@ lrmd_remote_client_msg(gpointer data) g_source_remove(client->remote->auth_timeout); } client->remote->auth_timeout = 0; + + /* Alert other clients of the new connection */ + notify_of_new_client(client); } return 0; } @@ -163,8 +166,7 @@ lrmd_remote_client_destroy(gpointer user_data) close(csock); } - crm_client_destroy(client); - + lrmd_client_destroy(client); return; } @@ -186,13 +188,38 @@ lrmd_auth_timeout_cb(gpointer data) return FALSE; } +/* Convert a struct sockaddr address to a string, IPv4 and IPv6: */ + +static char * +get_ip_str(const struct sockaddr_storage * sa, char * s, size_t maxlen) +{ + switch(((struct sockaddr *)sa)->sa_family) { + case AF_INET: + inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), + s, maxlen); + break; + + case AF_INET6: + inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)sa)->sin6_addr), + s, maxlen); + break; + + default: + strncpy(s, "Unknown AF", maxlen); + return NULL; + } + + return s; +} + static int lrmd_remote_listen(gpointer data) { int csock = 0; int flag = 0; - unsigned laddr; - struct sockaddr_in addr; + unsigned laddr = 0; + struct sockaddr_storage addr; + char addr_str[INET6_ADDRSTRLEN]; gnutls_session_t *session = NULL; crm_client_t *new_client = NULL; @@ -205,7 +232,9 @@ lrmd_remote_listen(gpointer data) laddr = sizeof(addr); memset(&addr, 0, sizeof(addr)); csock = accept(ssock, (struct sockaddr *)&addr, &laddr); - crm_debug("New remote connection from %s", inet_ntoa(addr.sin_addr)); + + get_ip_str(&addr, addr_str, INET6_ADDRSTRLEN); + crm_info("New remote connection from %s", addr_str); if (csock == -1) { crm_err("accept socket failed"); @@ -245,8 +274,6 @@ lrmd_remote_listen(gpointer data) &lrmd_remote_fd_cb); g_hash_table_insert(client_connections, new_client->id, new_client); - /* Alert other clients of the new connection */ - notify_of_new_client(new_client); return TRUE; } diff --git a/mcp/pacemaker.c b/mcp/pacemaker.c index 41b93d1f793..f7f1d462b32 100644 --- a/mcp/pacemaker.c +++ b/mcp/pacemaker.c @@ -699,11 +699,18 @@ check_active_before_startup_processes(gpointer user_data) continue; } else if (start_seq != pcmk_children[lpc].start_seq) { continue; - } else if (crm_pid_active(pcmk_children[lpc].pid, pcmk_children[lpc].name) != 1) { - crm_notice("Process %s terminated (pid=%d)", - pcmk_children[lpc].name, pcmk_children[lpc].pid); - pcmk_process_exit(&(pcmk_children[lpc])); - continue; + } else { + const char *name = pcmk_children[lpc].name; + if (pcmk_children[lpc].flag == crm_proc_stonith_ng) { + name = "stonithd"; + } + + if (crm_pid_active(pcmk_children[lpc].pid, name) != 1) { + crm_notice("Process %s terminated (pid=%d)", + name, pcmk_children[lpc].pid); + pcmk_process_exit(&(pcmk_children[lpc])); + continue; + } } /* at least one of the processes found at startup * is still going, so keep this recurring timer around */ @@ -821,7 +828,7 @@ mcp_cpg_deliver(cpg_handle_t handle, const char *task = crm_element_value(xml, F_CRM_TASK); crm_trace("Received CPG message (%s): %.200s", - (task? task : "process list"), msg); + (task? task : "process list"), (char*)msg); if (task == NULL) { if (nodeid == local_nodeid) { diff --git a/mcp/pacemaker.h b/mcp/pacemaker.h index f06e0c705b5..5e9c28549df 100644 --- a/mcp/pacemaker.h +++ b/mcp/pacemaker.h @@ -2,7 +2,7 @@ * Copyright (C) 2010 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/mcp/pacemaker.service.in b/mcp/pacemaker.service.in index 9b0a8244bf8..470aeb24f5d 100644 --- a/mcp/pacemaker.service.in +++ b/mcp/pacemaker.service.in @@ -4,6 +4,7 @@ Description=Pacemaker High Availability Cluster Manager After=dbus.service After=basic.target After=syslog.service +After=rsyslog.service After=network.target After=corosync.service diff --git a/mcp/pacemaker.sysconfig b/mcp/pacemaker.sysconfig index 4b1fdff12ab..d76ccb2a23c 100644 --- a/mcp/pacemaker.sysconfig +++ b/mcp/pacemaker.sysconfig @@ -1,5 +1,3 @@ -# For non-systemd based systems, prefix export to each enabled line - # Turn on special handling for CMAN clusters in the init script # Without this, fenced (and by inference, cman) cannot reliably be made to shut down # PCMK_STACK=cman @@ -80,8 +78,8 @@ # PCMK_ipc_type=shared-mem|socket|posix|sysv # Specify an IPC buffer size in bytes -# Useful when connecting to really big clusters that exceed the default 20k buffer -# PCMK_ipc_buffer=20480 +# Useful when connecting to really big clusters that exceed the default 128k buffer +# PCMK_ipc_buffer=131072 #==#==# Profiling and memory leak testing diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 78aece0b1e6..9fa3be6748e 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -3,8 +3,12 @@ %global pcmk_docdir %{_docdir}/%{name} %global specversion 1 +%global pcmkversion 1.1.14 +# set following to the actual commit or, for final release, concatenate +# "pcmkversion" macro to "Pacemaker-" (will yield a tag per the convention) %global commit HEAD -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global shortcommit %(c=%{commit}; [ ${c} = Pacemaker-%{pcmkversion} ] && echo %{pcmkversion} || echo ${c:0:7}) +%global post_release %([ %{commit} = Pacemaker-%{pcmkversion} ]; echo $?) %global github_owner ClusterLabs # Turn off the auto compilation of python files not in the site-packages directory @@ -13,7 +17,11 @@ %global rawhide %(test ! -e /etc/yum.repos.d/fedora-rawhide.repo; echo $?) %global cs_version %(pkg-config corosync --modversion | awk -F . '{print $1}') -%global py_site %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +# It has to be eventually decided whether to use Python2 or Python3 +%global py_site %{?python_sitearch}%{!?python_sitearch:%(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} + +# https://fedoraproject.org/wiki/EPEL:Packaging?rd=Packaging:EPEL#The_.25license_tag +%{!?_licensedir:%global license %doc} # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " @@ -49,18 +57,27 @@ %if %{with pre_release} %global pcmk_release 0.%{specversion}.%{shortcommit}.git %else +%if 0%{post_release} +%global pcmk_release %{specversion}.%{shortcommit}.git +%else %global pcmk_release %{specversion} %endif +%endif Name: pacemaker Summary: Scalable High-Availability cluster resource manager -Version: 1.1.14 +Version: %{pcmkversion} Release: %{pcmk_release}%{?dist} +%if %{defined _unitdir} License: GPLv2+ and LGPLv2+ +%else +# initscript is Revised BSD +License: GPLv2+ and LGPLv2+ and BSD +%endif Url: http://www.clusterlabs.org Group: System Environment/Daemons -Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz +Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) AutoReqProv: on Requires: python @@ -78,10 +95,10 @@ ExclusiveArch: i386 i686 x86_64 %endif -# Required for core functionality -BuildRequires: automake autoconf libtool pkgconfig python libtool-ltdl-devel +# Required for core functionality (python-devel depends on python) +BuildRequires: automake autoconf libtool pkgconfig libtool-ltdl-devel BuildRequires: pkgconfig(glib-2.0) libxml2-devel libxslt-devel libuuid-devel -BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel pam-devel +BuildRequires: python-devel bzip2-devel pam-devel # Required for agent_config.h which specifies the correct scratch directory BuildRequires: resource-agents @@ -187,7 +204,12 @@ The %{name}-cluster-libs package contains cluster-aware shared libraries needed for nodes that will form part of the cluster nodes. %package remote +%if %{defined _unitdir} License: GPLv2+ and LGPLv2+ +%else +# initscript is Revised BSD +License: GPLv2+ and LGPLv2+ and BSD +%endif Summary: Pacemaker remote daemon for non-cluster nodes Group: System Environment/Daemons Requires: %{name}-libs = %{version}-%{release} @@ -229,10 +251,20 @@ Summary: Test framework for cluster-related technologies like Pacemaker Group: System Environment/Daemons Requires: python Requires: %{name}-libs = %{version}-%{release} + +# systemd python bindings are separate package in some distros %if %{defined systemd_requires} + +%if 0%{?fedora} > 20 Requires: systemd-python %endif +%if 0%{?rhel} > 6 +Requires: systemd-python +%endif + +%endif + %description cts Test framework for cluster-related technologies like Pacemaker @@ -266,7 +298,8 @@ docdir=%{pcmk_docdir} %{configure} \ %{?with_profiling: --with-profiling} \ %{?with_coverage: --with-coverage} \ %{!?with_cman: --without-cman} \ - --without-heartbeat \ + --without-heartbeat \ + %{!?with_doc: --with-brand=} \ --with-initdir=%{_initrddir} \ --localstatedir=%{_var} \ --with-version=%{version}-%{release} @@ -284,7 +317,6 @@ rm -rf %{buildroot} make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} V=1 install mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig -mkdir -p ${RPM_BUILD_ROOT}%{_var}/lib/pacemaker/cores install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker install -m 644 tools/crm_mon.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/crm_mon @@ -339,7 +371,7 @@ rm -rf %{buildroot} %systemd_preun pacemaker.service %postun -%systemd_postun_with_restart pacemaker.service +%systemd_postun_with_restart pacemaker.service %post remote %systemd_post pacemaker_remote.service @@ -348,7 +380,7 @@ rm -rf %{buildroot} %systemd_preun pacemaker_remote.service %postun remote -%systemd_postun_with_restart pacemaker_remote.service +%systemd_postun_with_restart pacemaker_remote.service %post cli %systemd_post crm_mon.service @@ -401,10 +433,7 @@ exit 0 ########################################################### %defattr(-,root,root) -%exclude %{_datadir}/pacemaker/tests - %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker -%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %{_sbindir}/pacemakerd %if %{defined _unitdir} @@ -413,10 +442,6 @@ exit 0 %{_initrddir}/pacemaker %endif -%exclude %{_datadir}/pacemaker/report.common -%exclude %{_datadir}/pacemaker/report.collector -%{_datadir}/pacemaker -%{_datadir}/snmp/mibs/PCMK-MIB.txt %exclude %{_libexecdir}/pacemaker/lrmd_test %exclude %{_sbindir}/pacemaker_remoted %{_libexecdir}/pacemaker/* @@ -424,13 +449,16 @@ exit 0 %{_sbindir}/crm_attribute %{_sbindir}/crm_master %{_sbindir}/crm_node -%{_sbindir}/attrd_updater %{_sbindir}/fence_legacy %{_sbindir}/fence_pcmk %{_sbindir}/stonith_admin -%doc %{_mandir}/man7/* -%doc %{_mandir}/man8/attrd_updater.* +%doc %{_mandir}/man7/crmd.* +%doc %{_mandir}/man7/pengine.* +%doc %{_mandir}/man7/stonithd.* +%doc %{_mandir}/man7/ocf_pacemaker_controld.* +%doc %{_mandir}/man7/ocf_pacemaker_o2cb.* +%doc %{_mandir}/man7/ocf_pacemaker_remote.* %doc %{_mandir}/man8/crm_attribute.* %doc %{_mandir}/man8/crm_node.* %doc %{_mandir}/man8/crm_master.* @@ -439,18 +467,15 @@ exit 0 %doc %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/stonith_admin.* -%doc COPYING +%license COPYING %doc AUTHORS %doc ChangeLog -%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib -%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cores %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine -%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/blackbox -%dir /usr/lib/ocf -%dir /usr/lib/ocf/resource.d -/usr/lib/ocf/resource.d/pacemaker +/usr/lib/ocf/resource.d/pacemaker/controld +/usr/lib/ocf/resource.d/pacemaker/o2cb +/usr/lib/ocf/resource.d/pacemaker/remote /usr/lib/ocf/resource.d/.isolation %if "%{?cs_version}" != "UNKNOWN" @@ -467,6 +492,7 @@ exit 0 %files cli %defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %config(noreplace) %{_sysconfdir}/sysconfig/crm_mon %if %{defined _unitdir} @@ -477,6 +503,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/init/crm_mon.conf %endif +%{_sbindir}/attrd_updater %{_sbindir}/cibadmin %{_sbindir}/crm_diff %{_sbindir}/crm_error @@ -491,10 +518,26 @@ exit 0 %{_sbindir}/crm_simulate %{_sbindir}/crm_report %{_sbindir}/crm_ticket -%{_datadir}/pacemaker/report.common -%{_datadir}/pacemaker/report.collector +%exclude %{_datadir}/pacemaker/tests +%{_datadir}/pacemaker +%{_datadir}/snmp/mibs/PCMK-MIB.txt + +%exclude /usr/lib/ocf/resource.d/pacemaker/controld +%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb +%exclude /usr/lib/ocf/resource.d/pacemaker/remote + +%dir /usr/lib/ocf +%dir /usr/lib/ocf/resource.d +/usr/lib/ocf/resource.d/pacemaker + +%doc %{_mandir}/man7/* +%exclude %{_mandir}/man7/crmd.* +%exclude %{_mandir}/man7/pengine.* +%exclude %{_mandir}/man7/stonithd.* +%exclude %{_mandir}/man7/ocf_pacemaker_controld.* +%exclude %{_mandir}/man7/ocf_pacemaker_o2cb.* +%exclude %{_mandir}/man7/ocf_pacemaker_remote.* %doc %{_mandir}/man8/* -%exclude %{_mandir}/man8/attrd_updater.* %exclude %{_mandir}/man8/crm_attribute.* %exclude %{_mandir}/man8/crm_node.* %exclude %{_mandir}/man8/crm_master.* @@ -504,10 +547,14 @@ exit 0 %exclude %{_mandir}/man8/pacemaker_remoted.* %exclude %{_mandir}/man8/stonith_admin.* -%doc COPYING +%license COPYING %doc AUTHORS %doc ChangeLog +%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker +%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/blackbox +%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cores + %files -n %{name}-libs %defattr(-,root,root) @@ -520,13 +567,13 @@ exit 0 %{_libdir}/libpengine.so.* %{_libdir}/libstonithd.so.* %{_libdir}/libtransitioner.so.* -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %files -n %{name}-cluster-libs %defattr(-,root,root) %{_libdir}/libcrmcluster.so.* -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %files remote @@ -541,7 +588,7 @@ exit 0 %{_sbindir}/pacemaker_remoted %{_mandir}/man8/pacemaker_remoted.* -%doc COPYING.LIB +%license COPYING %doc AUTHORS %files doc @@ -553,7 +600,7 @@ exit 0 %{py_site}/cts %{_datadir}/pacemaker/tests/cts %{_libexecdir}/pacemaker/lrmd_test -%doc COPYING.LIB +%license COPYING %doc AUTHORS %files -n %{name}-libs-devel @@ -566,7 +613,7 @@ exit 0 %{_var}/lib/pacemaker/gcov %endif %{_libdir}/pkgconfig/*.pc -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %changelog diff --git a/pengine/allocate.c b/pengine/allocate.c index 6462a0e55c5..fb984e18e6a 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -36,6 +36,8 @@ CRM_TRACE_INIT_DATA(pe_allocate); void set_alloc_actions(pe_working_set_t * data_set); void migrate_reload_madness(pe_working_set_t * data_set); +extern void ReloadRsc(resource_t * rsc, node_t *node, pe_working_set_t * data_set); +extern gboolean DeleteRsc(resource_t * rsc, node_t * node, gboolean optional, pe_working_set_t * data_set); resource_alloc_functions_t resource_class_alloc_functions[] = { { @@ -322,8 +324,7 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op #if 0 /* Always reload/restart the entire resource */ - op = custom_action(rsc, start_key(rsc), RSC_START, NULL, FALSE, TRUE, data_set); - update_action_flags(op, pe_action_allow_reload_conversion); + ReloadRsc(rsc, active_node, data_set); #else /* Re-sending the recurring op is sufficient - the old one will be cancelled automatically */ op = custom_action(rsc, key, task, active_node, TRUE, TRUE, data_set); @@ -333,11 +334,9 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op } else if (digest_restart && rsc->isolation_wrapper == NULL && (uber_parent(rsc))->isolation_wrapper == NULL) { pe_rsc_trace(rsc, "Reloading '%s' action for resource %s", task, rsc->id); - /* Allow this resource to reload - unless something else causes a full restart */ - set_bit(rsc->flags, pe_rsc_try_reload); - - /* Create these for now, it keeps the action IDs the same in the regression outputs */ - custom_action(rsc, key, task, NULL, TRUE, TRUE, data_set); + /* Reload this resource */ + ReloadRsc(rsc, active_node, data_set); + free(key); } else { pe_rsc_trace(rsc, "Resource %s doesn't know how to reload", rsc->id); @@ -352,8 +351,6 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op return did_change; } -extern gboolean DeleteRsc(resource_t * rsc, node_t * node, gboolean optional, - pe_working_set_t * data_set); static void check_actions_for(xmlNode * rsc_entry, resource_t * rsc, node_t * node, pe_working_set_t * data_set) @@ -769,7 +766,7 @@ apply_system_health(pe_working_set_t * data_set) /* Requires the admin to configure the rsc_location constaints for * processing the stored health scores */ - /* TODO: Check for the existance of appropriate node health constraints */ + /* TODO: Check for the existence of appropriate node health constraints */ return TRUE; } else { @@ -985,7 +982,7 @@ sort_rsc_process_order(gconstpointer a, gconstpointer b, gpointer data) int r1_weight = -INFINITY; int r2_weight = -INFINITY; - const char *reason = "existance"; + const char *reason = "existence"; const GListPtr nodes = (GListPtr) data; resource_t *resource1 = (resource_t *) convert_const_pointer(a); @@ -1326,6 +1323,7 @@ stage6(pe_working_set_t * data_set) action_t *done = get_pseudo_op(STONITH_DONE, data_set); gboolean need_stonith = TRUE; GListPtr gIter = data_set->nodes; + GListPtr stonith_ops = NULL; crm_trace("Processing fencing and shutdown cases"); @@ -1371,11 +1369,15 @@ stage6(pe_working_set_t * data_set) dc_down = stonith_op; dc_fence = stonith_op; - } else { + } else if (is_set(data_set->flags, pe_flag_concurrent_fencing) == FALSE) { if (last_stonith) { order_actions(last_stonith, stonith_op, pe_order_optional); } last_stonith = stonith_op; + + } else { + order_actions(stonith_op, done, pe_order_implies_then); + stonith_ops = g_list_append(stonith_ops, stonith_op); } } else if (node->details->online && node->details->shutdown && @@ -1440,8 +1442,21 @@ stage6(pe_working_set_t * data_set) order_actions(node_stop, dc_down, pe_order_optional); } - if (last_stonith && dc_down != last_stonith) { - order_actions(last_stonith, dc_down, pe_order_optional); + if (last_stonith) { + if (dc_down != last_stonith) { + order_actions(last_stonith, dc_down, pe_order_optional); + } + + } else { + GListPtr gIter2 = NULL; + + for (gIter2 = stonith_ops; gIter2 != NULL; gIter2 = gIter2->next) { + action_t *stonith_op = (action_t *) gIter2->data; + + if (dc_down != stonith_op) { + order_actions(stonith_op, dc_down, pe_order_optional); + } + } } } @@ -1454,6 +1469,8 @@ stage6(pe_working_set_t * data_set) } order_actions(done, all_stopped, pe_order_implies_then); + + g_list_free(stonith_ops); return TRUE; } @@ -1709,16 +1726,18 @@ apply_remote_node_ordering(pe_working_set_t *data_set) NULL, pe_order_preserve | pe_order_implies_first, data_set); - } else { + } - custom_action_order(remote_rsc, - generate_op_key(remote_rsc->id, RSC_START, 0), - NULL, - action->rsc, - NULL, - action, - pe_order_preserve | pe_order_implies_then | pe_order_runnable_left, - data_set); + if(container && is_set(container->flags, pe_rsc_failed)) { + /* Just like a stop, the demote is implied by the + * container having failed/stopped + * + * If we really wanted to we would order the demote + * after the stop, IFF the containers current role was + * stopped (otherwise we re-introduce an ordering + * loop) + */ + pe_set_action_bit(action, pe_action_pseudo); } } else if (safe_str_eq(action->task, "stop") && @@ -1969,7 +1988,6 @@ stage7(pe_working_set_t * data_set) for (gIter = data_set->resources; gIter != NULL; gIter = gIter->next) { resource_t *rsc = (resource_t *) gIter->data; - rsc_reload(rsc, data_set); LogActions(rsc, data_set, FALSE); } return TRUE; diff --git a/pengine/allocate.h b/pengine/allocate.h index 73f750e2960..1dbc76498c7 100644 --- a/pengine/allocate.h +++ b/pengine/allocate.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -155,7 +155,6 @@ extern gboolean expand_notification_data(notify_data_t * n_data, pe_working_set_ extern void create_notifications(resource_t * rsc, notify_data_t * n_data, pe_working_set_t * data_set); extern void free_notification_data(notify_data_t * n_data); -extern void rsc_reload(resource_t * rsc, pe_working_set_t * data_set); extern void rsc_stonith_ordering(resource_t * rsc, action_t * stonith_op, pe_working_set_t * data_set); diff --git a/pengine/clone.c b/pengine/clone.c index 66810eb171c..fd47018298f 100644 --- a/pengine/clone.c +++ b/pengine/clone.c @@ -1193,7 +1193,7 @@ clone_action_flags(action_t * action, node_t * node) if (is_set(flags, pe_action_optional) && is_set(child_flags, pe_action_optional) == FALSE) { - pe_rsc_trace(child, "%s is manditory because of %s", action->uuid, + pe_rsc_trace(child, "%s is mandatory because of %s", action->uuid, child_action->uuid); flags = crm_clear_bit(__FUNCTION__, action->rsc->id, flags, pe_action_optional); pe_clear_action_bit(action, pe_action_optional); @@ -1277,19 +1277,37 @@ clone_update_actions_interleave(action_t * first, action_t * then, node_t * node first_action = find_first_action(first_child->actions, NULL, first_task, node); then_action = find_first_action(then_child->actions, NULL, then->task, node); - CRM_CHECK(first_action != NULL || is_set(first_child->flags, pe_rsc_orphan), - crm_err("No action found for %s in %s (first)", first_task, first_child->id)); - - if (then_action == NULL && is_not_set(then_child->flags, pe_rsc_orphan) - && crm_str_eq(then->task, RSC_STOP, TRUE) == FALSE - && crm_str_eq(then->task, RSC_DEMOTED, TRUE) == FALSE) { - crm_err("Internal error: No action found for %s in %s (then)", then->task, - then_child->id); + if (first_action == NULL) { + if (is_not_set(first_child->flags, pe_rsc_orphan) + && crm_str_eq(first_task, RSC_STOP, TRUE) == FALSE + && crm_str_eq(first_task, RSC_DEMOTE, TRUE) == FALSE) { + crm_err("Internal error: No action found for %s in %s (first)", + first_task, first_child->id); + + } else { + crm_trace("No action found for %s in %s%s (first)", + first_task, first_child->id, + is_set(first_child->flags, pe_rsc_orphan) ? " (ORPHAN)" : ""); + } + continue; } - if (first_action == NULL || then_action == NULL) { + /* We're only interested if 'then' is neither stopping nor being demoted */ + if (then_action == NULL) { + if (is_not_set(then_child->flags, pe_rsc_orphan) + && crm_str_eq(then->task, RSC_STOP, TRUE) == FALSE + && crm_str_eq(then->task, RSC_DEMOTE, TRUE) == FALSE) { + crm_err("Internal error: No action found for %s in %s (then)", + then->task, then_child->id); + + } else { + crm_trace("No action found for %s in %s%s (then)", + then->task, then_child->id, + is_set(then_child->flags, pe_rsc_orphan) ? " (ORPHAN)" : ""); + } continue; } + if (order_actions(first_action, then_action, type)) { crm_debug("Created constraint for %s -> %s", first_action->uuid, then_action->uuid); changed |= (pe_graph_updated_first | pe_graph_updated_then); diff --git a/pengine/constraints.c b/pengine/constraints.c index 7527aa6d1f8..aea4d474d44 100644 --- a/pengine/constraints.c +++ b/pengine/constraints.c @@ -1420,6 +1420,12 @@ custom_action_order(resource_t * lh_rsc, char *lh_action_task, action_t * lh_act order = calloc(1, sizeof(order_constraint_t)); + crm_trace("Creating[%d] %s %s %s - %s %s %s", data_set->order_id, + lh_rsc?lh_rsc->id:"NA", lh_action_task, lh_action?lh_action->uuid:"NA", + rh_rsc?rh_rsc->id:"NA", rh_action_task, rh_action?rh_action->uuid:"NA"); + + /* CRM_ASSERT(data_set->order_id != 291); */ + order->id = data_set->order_id++; order->type = type; order->lh_rsc = lh_rsc; diff --git a/pengine/graph.c b/pengine/graph.c index 4bc23d5c52a..230ee2f654b 100644 --- a/pengine/graph.c +++ b/pengine/graph.c @@ -516,7 +516,7 @@ update_action(action_t * then) first = rsc_expand_action(first); } if (first != other->action) { - crm_trace("Ordering %s afer %s instead of %s", then->uuid, first->uuid, + crm_trace("Ordering %s after %s instead of %s", then->uuid, first->uuid, other->action->uuid); } @@ -774,13 +774,101 @@ get_router_node(action_t *action) return router_node; } +/*! + * \internal + * \brief Add an XML node tag for a specified ID + * + * \param[in] id Node UUID to add + * \param[in,out] xml Parent XML tag to add to + */ +static void +add_node_to_xml_by_id(const char *id, xmlNode *xml) +{ + xmlNode *node_xml; + + node_xml = create_xml_node(xml, XML_CIB_TAG_NODE); + crm_xml_add(node_xml, XML_ATTR_UUID, id); +} + +/*! + * \internal + * \brief Add an XML node tag for a specified node + * + * \param[in] node Node to add + * \param[in/out] xml XML to add node to + */ +static void +add_node_to_xml(const node_t *node, void *xml) +{ + add_node_to_xml_by_id(node->details->id, (xmlNode *) xml); +} + +/*! + * \internal + * \brief Add XML with nodes that an action is expected to bring down + * + * If a specified action is expected to bring any nodes down, add an XML block + * with their UUIDs. When a node is lost, this allows the crmd to determine + * whether it was expected. + * + * \param[in,out] xml Parent XML tag to add to + * \param[in] action Action to check for downed nodes + * \param[in] data_set Working set for cluster + */ +static void +add_downed_nodes(xmlNode *xml, const action_t *action, + const pe_working_set_t *data_set) +{ + CRM_CHECK(xml && action && action->node && data_set, return); + + if (safe_str_eq(action->task, CRM_OP_SHUTDOWN)) { + + /* Shutdown makes the action's node down */ + xmlNode *downed = create_xml_node(xml, XML_GRAPH_TAG_DOWNED); + add_node_to_xml_by_id(action->node->details->id, downed); + + } else if (safe_str_eq(action->task, CRM_OP_FENCE)) { + + /* Fencing makes the action's node and any hosted guest nodes down */ + const char *fence = g_hash_table_lookup(action->meta, "stonith_action"); + + if (safe_str_eq(fence, "off") || safe_str_eq(fence, "reboot")) { + xmlNode *downed = create_xml_node(xml, XML_GRAPH_TAG_DOWNED); + add_node_to_xml_by_id(action->node->details->id, downed); + pe_foreach_guest_node(data_set, action->node, add_node_to_xml, downed); + } + + } else if (action->rsc && action->rsc->is_remote_node + && safe_str_eq(action->task, CRMD_ACTION_STOP)) { + + /* Stopping a remote connection resource makes connected node down, + * unless it's part of a migration + */ + GListPtr iter; + action_t *input; + gboolean migrating = FALSE; + + for (iter = action->actions_before; iter != NULL; iter = iter->next) { + input = ((action_wrapper_t *) iter->data)->action; + if (input->rsc && safe_str_eq(action->rsc->id, input->rsc->id) + && safe_str_eq(input->task, CRMD_ACTION_MIGRATED)) { + migrating = TRUE; + break; + } + } + if (!migrating) { + xmlNode *downed = create_xml_node(xml, XML_GRAPH_TAG_DOWNED); + add_node_to_xml_by_id(action->rsc->id, downed); + } + } +} + static xmlNode * action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) { gboolean needs_node_info = TRUE; xmlNode *action_xml = NULL; xmlNode *args_xml = NULL; - char *action_id_s = NULL; if (action == NULL) { return NULL; @@ -788,7 +876,6 @@ action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) if (safe_str_eq(action->task, CRM_OP_FENCE)) { action_xml = create_xml_node(NULL, XML_GRAPH_TAG_CRM_EVENT); -/* needs_node_info = FALSE; */ } else if (safe_str_eq(action->task, CRM_OP_SHUTDOWN)) { action_xml = create_xml_node(NULL, XML_GRAPH_TAG_CRM_EVENT); @@ -810,9 +897,7 @@ action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) action_xml = create_xml_node(NULL, XML_GRAPH_TAG_RSC_OP); } - action_id_s = crm_itoa(action->id); - crm_xml_add(action_xml, XML_ATTR_ID, action_id_s); - free(action_id_s); + crm_xml_add_int(action_xml, XML_ATTR_ID, action->id); crm_xml_add(action_xml, XML_LRM_ATTR_TASK, action->task); if (action->rsc != NULL && action->rsc->clone_name != NULL) { @@ -854,10 +939,12 @@ action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) } } + /* No details if this action is only being listed in the inputs section */ if (as_input) { return action_xml; } + /* List affected resource */ if (action->rsc) { if (is_set(action->flags, pe_action_pseudo) == FALSE) { int lpc = 0; @@ -925,6 +1012,7 @@ action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) } } + /* List any attributes in effect */ args_xml = create_xml_node(NULL, XML_TAG_ATTRS); crm_xml_add(args_xml, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET); @@ -962,9 +1050,14 @@ action2xml(action_t * action, gboolean as_input, pe_working_set_t *data_set) } sorted_xml(args_xml, action_xml, FALSE); - crm_log_xml_trace(action_xml, "dumped action"); free_xml(args_xml); + /* List any nodes this action is expected to make down */ + if (needs_node_info && (action->node != NULL)) { + add_downed_nodes(action_xml, action, data_set); + } + + crm_log_xml_trace(action_xml, "dumped action"); return action_xml; } diff --git a/pengine/group.c b/pengine/group.c index 15c058fc1f4..7c5d5b4f55e 100644 --- a/pengine/group.c +++ b/pengine/group.c @@ -317,7 +317,7 @@ group_rsc_colocation_lh(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation return; } else if (constraint->score >= INFINITY) { - crm_config_err("%s: Cannot perform manditory colocation" + crm_config_err("%s: Cannot perform mandatory colocation" " between non-colocated group and %s", rsc_lh->id, rsc_rh->id); return; } @@ -358,7 +358,7 @@ group_rsc_colocation_rh(resource_t * rsc_lh, resource_t * rsc_rh, rsc_colocation return; } else if (constraint->score >= INFINITY) { - crm_config_err("%s: Cannot perform manditory colocation with" + crm_config_err("%s: Cannot perform mandatory colocation with" " non-colocated group: %s", rsc_lh->id, rsc_rh->id); return; } @@ -387,7 +387,7 @@ group_action_flags(action_t * action, node_t * node) if (is_set(flags, pe_action_optional) && is_set(child_flags, pe_action_optional) == FALSE) { - pe_rsc_trace(action->rsc, "%s is manditory because of %s", action->uuid, + pe_rsc_trace(action->rsc, "%s is mandatory because of %s", action->uuid, child_action->uuid); clear_bit(flags, pe_action_optional); pe_clear_action_bit(action, pe_action_optional); diff --git a/pengine/native.c b/pengine/native.c index 4a81def421d..ecc83863d50 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -48,6 +48,7 @@ void RecurringOp_Stopped(resource_t * rsc, action_t * start, node_t * node, void pe_post_notify(resource_t * rsc, node_t * node, action_t * op, notify_data_t * n_data, pe_working_set_t * data_set); +void ReloadRsc(resource_t * rsc, node_t *node, pe_working_set_t * data_set); gboolean DeleteRsc(resource_t * rsc, node_t * node, gboolean optional, pe_working_set_t * data_set); gboolean StopRsc(resource_t * rsc, node_t * next, gboolean optional, pe_working_set_t * data_set); gboolean StartRsc(resource_t * rsc, node_t * next, gboolean optional, pe_working_set_t * data_set); @@ -655,7 +656,7 @@ RecurringOp(resource_t * rsc, action_t * start, node_t * node, if (start != NULL) { pe_rsc_trace(rsc, "Marking %s %s due to %s", - key, is_set(start->flags, pe_action_optional) ? "optional" : "manditory", + key, is_set(start->flags, pe_action_optional) ? "optional" : "mandatory", start->uuid); is_optional = (rsc->cmds->action_flags(start, NULL) & pe_action_optional); } else { @@ -667,7 +668,7 @@ RecurringOp(resource_t * rsc, action_t * start, node_t * node, possible_matches = find_actions_exact(rsc->actions, key, node); if (possible_matches == NULL) { is_optional = FALSE; - pe_rsc_trace(rsc, "Marking %s manditory: not active", key); + pe_rsc_trace(rsc, "Marking %s mandatory: not active", key); } else { GListPtr gIter = NULL; @@ -774,6 +775,10 @@ RecurringOp(resource_t * rsc, action_t * start, node_t * node, NULL, strdup(key), mon, pe_order_implies_then | pe_order_runnable_left, data_set); + custom_action_order(rsc, reload_key(rsc), NULL, + NULL, strdup(key), mon, + pe_order_implies_then | pe_order_runnable_left, data_set); + if (rsc->next_role == RSC_ROLE_MASTER) { custom_action_order(rsc, promote_key(rsc), NULL, rsc, NULL, mon, @@ -919,7 +924,7 @@ RecurringOp_Stopped(resource_t * rsc, action_t * start, node_t * node, /* start a monitor for an already stopped resource */ possible_matches = find_actions_exact(rsc->actions, key, stop_node); if (possible_matches == NULL) { - pe_rsc_trace(rsc, "Marking %s manditory on %s: not active", key, + pe_rsc_trace(rsc, "Marking %s mandatory on %s: not active", key, crm_str(stop_node_uname)); is_optional = FALSE; } else { @@ -1258,8 +1263,7 @@ native_create_actions(resource_t * rsc, pe_working_set_t * data_set) /* Required steps from this role to the next */ while (role != rsc->next_role) { next_role = rsc_state_matrix[role][rsc->next_role]; - pe_rsc_trace(rsc, "Role: Executing: %s->%s = (%s)", role2text(role), - role2text(rsc->next_role), role2text(next_role), rsc->id); + pe_rsc_trace(rsc, "Role: Executing: %s->%s = (%s)", role2text(role), role2text(next_role), rsc->id); if (rsc_action_matrix[role][next_role] (rsc, chosen, FALSE, data_set) == FALSE) { break; } @@ -1820,7 +1824,7 @@ native_update_actions(action_t * first, action_t * then, node_t * node, enum pe_ enum pe_action_flags then_flags = then->flags; enum pe_action_flags first_flags = first->flags; - crm_trace( "Testing %s on %s (0x%.6x) with %s 0x%.6x %x %x", + crm_trace( "Testing %s on %s (0x%.6x) with %s 0x%.6x", first->uuid, first->node ? first->node->details->uname : "[none]", first->flags, then->uuid, then->flags); @@ -2814,7 +2818,12 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete, top, generate_op_key(top->id, RSC_START, 0), NULL, flags, data_set); - if (node && node->details->shutdown == FALSE) { + /* Before any reloads, if they exist */ + custom_action_order(rsc, NULL, probe, + top, reload_key(rsc), NULL, + pe_order_optional, data_set); + + if (node->details->shutdown == FALSE) { custom_action_order(rsc, NULL, probe, rsc, generate_op_key(rsc->id, RSC_STOP, 0), NULL, pe_order_optional, data_set); @@ -2876,37 +2885,46 @@ native_start_constraints(resource_t * rsc, action_t * stonith_op, pe_working_set } } +/* User data to pass to guest node iterator */ +struct action_list_s { + GListPtr search_list; /* list of actions to search */ + GListPtr result_list; /* list of matching actions for this node */ + const char *key; /* action key to match */ +}; + +/*! + * \internal + * \brief Prepend a node's actions matching a key to a list + * + * \param[in] node Guest node + * \param[in/out] data User data + */ +static void prepend_node_actions(const node_t *node, void *data) +{ + GListPtr actions; + struct action_list_s *info = (struct action_list_s *) data; + + actions = find_actions(info->search_list, info->key, node); + info->result_list = g_list_concat(actions, info->result_list); +} + static GListPtr find_fence_target_node_actions(GListPtr search_list, const char *key, node_t *fence_target, pe_working_set_t *data_set) { - GListPtr gIter = NULL; - GListPtr result_list = find_actions(search_list, key, fence_target); + struct action_list_s action_list; - /* find stop actions for this rsc on any container nodes running on - * the fencing target node */ - for (gIter = fence_target->details->running_rsc; gIter != NULL; gIter = gIter->next) { - GListPtr iter = NULL; - GListPtr tmp_list = NULL; - resource_t *tmp_rsc = (resource_t *) gIter->data; - node_t *container_node = NULL; + /* Actions on the target that match the key are implied by the fencing */ + action_list.search_list = search_list; + action_list.result_list = find_actions(search_list, key, fence_target); + action_list.key = key; - /* found a container node that lives on the host node - * that is getting fenced. Find stop for our rsc that live on - * the container node as well. These stop operations are also - * implied by fencing of the host cluster node. */ - if (tmp_rsc->is_remote_node && tmp_rsc->container != NULL) { - container_node = pe_find_node(data_set->nodes, tmp_rsc->id); - } - if (container_node) { - tmp_list = find_actions(search_list, key, container_node); - } - for (iter = tmp_list; iter != NULL; iter = iter->next) { - result_list = g_list_prepend(result_list, (action_t *) iter->data); - } - g_list_free(tmp_list); - } + /* + * If the target is a host for any guest nodes, actions on those nodes + * that match the key are also implied by the fencing. + */ + pe_foreach_guest_node(data_set, fence_target, prepend_node_actions, &action_list); - return result_list; + return action_list.result_list; } static void @@ -3135,92 +3153,54 @@ get_first_named_action(resource_t * rsc, const char *action, gboolean only_valid return a; } -static void -ReloadRsc(resource_t * rsc, action_t * stop, action_t * start, pe_working_set_t * data_set) -{ - action_t *action = NULL; - action_t *rewrite = NULL; - - if (is_not_set(rsc->flags, pe_rsc_try_reload)) { - return; - - } else if (is_not_set(stop->flags, pe_action_optional)) { - pe_rsc_trace(rsc, "%s: stop action", rsc->id); - return; - - } else if (is_not_set(start->flags, pe_action_optional)) { - pe_rsc_trace(rsc, "%s: start action", rsc->id); - return; - } - - pe_rsc_trace(rsc, "%s on %s", rsc->id, stop->node->details->uname); - - action = get_first_named_action(rsc, RSC_PROMOTE, TRUE, NULL); - if (action && is_set(action->flags, pe_action_optional) == FALSE) { - update_action_flags(action, pe_action_pseudo); - } - - action = get_first_named_action(rsc, RSC_DEMOTE, TRUE, NULL); - if (action && is_set(action->flags, pe_action_optional) == FALSE) { - rewrite = action; - update_action_flags(stop, pe_action_pseudo); - - } else { - rewrite = start; - } - - pe_rsc_info(rsc, "Rewriting %s of %s on %s as a reload", - rewrite->task, rsc->id, stop->node->details->uname); - set_bit(rsc->flags, pe_rsc_reload); - update_action_flags(rewrite, pe_action_optional | pe_action_clear); - - free(rewrite->uuid); - free(rewrite->task); - rewrite->task = strdup("reload"); - rewrite->uuid = generate_op_key(rsc->id, rewrite->task, 0); -} - void -rsc_reload(resource_t * rsc, pe_working_set_t * data_set) +ReloadRsc(resource_t * rsc, node_t *node, pe_working_set_t * data_set) { GListPtr gIter = NULL; - action_t *stop = NULL; - action_t *start = NULL; - - if(is_set(rsc->flags, pe_rsc_munging)) { - return; - } - set_bit(rsc->flags, pe_rsc_munging); + action_t *other = NULL; + action_t *reload = NULL; if (rsc->children) { for (gIter = rsc->children; gIter != NULL; gIter = gIter->next) { resource_t *child_rsc = (resource_t *) gIter->data; - rsc_reload(child_rsc, data_set); + ReloadRsc(child_rsc, node, data_set); } return; } else if (rsc->variant > pe_native) { + /* Complex resource with no children */ return; - } - - pe_rsc_trace(rsc, "Processing %s", rsc->id); - stop = - get_first_named_action(rsc, RSC_STOP, TRUE, - rsc->running_on ? rsc->running_on->data : NULL); - start = get_first_named_action(rsc, RSC_START, TRUE, NULL); + } else if (is_not_set(rsc->flags, pe_rsc_managed)) { + pe_rsc_trace(rsc, "%s: unmanaged", rsc->id); + return; - if (is_not_set(rsc->flags, pe_rsc_managed) - || is_set(rsc->flags, pe_rsc_failed) - || is_set(rsc->flags, pe_rsc_start_pending) - || rsc->next_role < RSC_ROLE_STARTED) { + } else if (is_set(rsc->flags, pe_rsc_failed) || is_set(rsc->flags, pe_rsc_start_pending)) { pe_rsc_trace(rsc, "%s: general resource state: flags=0x%.16llx", rsc->id, rsc->flags); + stop_action(rsc, node, FALSE); /* Force a full restart, overkill? */ + return; + + } else if (node == NULL) { + pe_rsc_trace(rsc, "%s: not active", rsc->id); return; } - if (stop != NULL && is_set(stop->flags, pe_action_optional) && is_set(rsc->flags, pe_rsc_try_reload)) { - ReloadRsc(rsc, stop, start, data_set); + pe_rsc_trace(rsc, "Processing %s", rsc->id); + set_bit(rsc->flags, pe_rsc_reload); + + reload = custom_action( + rsc, reload_key(rsc), CRMD_ACTION_RELOAD, node, FALSE, TRUE, data_set); + + /* stop = stop_action(rsc, node, optional); */ + other = get_first_named_action(rsc, RSC_STOP, TRUE, node); + if (other != NULL) { + order_actions(reload, other, pe_order_optional); + } + + other = get_first_named_action(rsc, RSC_DEMOTE, TRUE, node); + if (other != NULL) { + order_actions(reload, other, pe_order_optional); } } diff --git a/pengine/pengine.h b/pengine/pengine.h index 87fa1507c49..671cfe3dae6 100644 --- a/pengine/pengine.h +++ b/pengine/pengine.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/pengine/regression.sh b/pengine/regression.sh index c547a476830..e5a8135c4d7 100755 --- a/pengine/regression.sh +++ b/pengine/regression.sh @@ -147,7 +147,7 @@ do_test order3 "Order stop " do_test order4 "Order (multiple) " do_test order5 "Order (move) " do_test order6 "Order (move w/ restart) " -do_test order7 "Order (manditory) " +do_test order7 "Order (mandatory) " do_test order-optional "Order (score=0) " do_test order-required "Order (score=INFINITY) " do_test bug-lf-2171 "Prevent group start when clone is stopped" @@ -227,6 +227,7 @@ do_test stop-failure-no-quorum "Stop failure without quorum" do_test stop-failure-no-fencing "Stop failure without fencing available" do_test stop-failure-with-fencing "Stop failure with fencing available" do_test multiple-active-block-group "Support of multiple-active=block for resource groups" +do_test multiple-monitor-one-failed "Consider resource failed if any of the configured monitor operations failed" echo "" do_test quorum-1 "No quorum - ignore" @@ -315,7 +316,7 @@ do_test a-demote-then-b-migrate "A demote then B stop. migrate B" #echo "" #do_test complex1 "Complex " -do_test bug-lf-2422 "Dependancy on partially active group - stop ocfs:*" +do_test bug-lf-2422 "Dependency on partially active group - stop ocfs:*" echo "" do_test clone-anon-probe-1 "Probe the correct (anonymous) clone instance for each node" @@ -540,6 +541,8 @@ do_test honor_stonith_rsc_order3 "cl#5056- Honor order constraint, stonith clone do_test honor_stonith_rsc_order4 "cl#5056- Honor order constraint, between two native stonith rscs." do_test probe-timeout "cl#5099 - Default probe timeout" +do_test concurrent-fencing "Allow performing fencing operations in parallel" + echo "" do_test systemhealth1 "System Health () #1" do_test systemhealth2 "System Health () #2" @@ -799,6 +802,7 @@ do_test whitebox-stop "Stop whitebox container with resources assigned to it" do_test whitebox-move "Move whitebox container with resources assigned to it" do_test whitebox-asymmetric "Verify connection rsc opts-in based on container resource" do_test whitebox-ms-ordering "Verify promote/demote can not occur before connection is established" +do_test whitebox-ms-ordering-move "Stop/Start cycle within a moving container" do_test whitebox-orphaned "Properly shutdown orphaned whitebox container" do_test whitebox-orphan-ms "Properly tear down orphan ms resources on remote-nodes" do_test whitebox-unexpectedly-running "Recover container nodes the cluster did not start." diff --git a/pengine/test10/594.exp b/pengine/test10/594.exp index ef1e5e28956..bb15a3660eb 100644 --- a/pengine/test10/594.exp +++ b/pengine/test10/594.exp @@ -193,6 +193,9 @@ + + + @@ -201,6 +204,9 @@ + + + diff --git a/pengine/test10/662.exp b/pengine/test10/662.exp index f37fd6e2542..b18a5ea7386 100644 --- a/pengine/test10/662.exp +++ b/pengine/test10/662.exp @@ -306,6 +306,9 @@ + + + diff --git a/pengine/test10/797.exp b/pengine/test10/797.exp index c0bcf7bba4b..6126a4cc06b 100644 --- a/pengine/test10/797.exp +++ b/pengine/test10/797.exp @@ -343,6 +343,9 @@ + + + diff --git a/pengine/test10/8-am-then-bm-a-migrating-b-stopping.summary b/pengine/test10/8-am-then-bm-a-migrating-b-stopping.summary index 8f4628c6f23..2aa3f07dee4 100644 --- a/pengine/test10/8-am-then-bm-a-migrating-b-stopping.summary +++ b/pengine/test10/8-am-then-bm-a-migrating-b-stopping.summary @@ -1,9 +1,10 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ 18node1 18node2 18node3 ] A (ocf::heartbeat:Dummy): Started 18node1 - B (ocf::heartbeat:Dummy): (target-role:Stopped) Started 18node2 + B (ocf::heartbeat:Dummy): Started 18node2 ( disabled ) Transition Summary: * Migrate A (Started 18node1 -> 18node2) @@ -22,5 +23,5 @@ Revised cluster status: Online: [ 18node1 18node2 18node3 ] A (ocf::heartbeat:Dummy): Started 18node2 - B (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + B (ocf::heartbeat:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/829.exp b/pengine/test10/829.exp index f1c4a985e01..5975a6b1b20 100644 --- a/pengine/test10/829.exp +++ b/pengine/test10/829.exp @@ -260,6 +260,9 @@ + + + diff --git a/pengine/test10/9-am-then-bm-b-migrating-a-stopping.summary b/pengine/test10/9-am-then-bm-b-migrating-a-stopping.summary index 0dfcc26363b..37d16be4766 100644 --- a/pengine/test10/9-am-then-bm-b-migrating-a-stopping.summary +++ b/pengine/test10/9-am-then-bm-b-migrating-a-stopping.summary @@ -1,8 +1,9 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ 18node1 18node2 18node3 ] - A (ocf::heartbeat:Dummy): (target-role:Stopped) Started 18node1 + A (ocf::heartbeat:Dummy): Started 18node1 ( disabled ) B (ocf::heartbeat:Dummy): Started 18node2 Transition Summary: @@ -17,6 +18,6 @@ Executing cluster transition: Revised cluster status: Online: [ 18node1 18node2 18node3 ] - A (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + A (ocf::heartbeat:Dummy): Stopped ( disabled ) B (ocf::heartbeat:Dummy): Stopped diff --git a/pengine/test10/asymmetric.summary b/pengine/test10/asymmetric.summary index 7c51fd2679d..42ec9fc0746 100644 --- a/pengine/test10/asymmetric.summary +++ b/pengine/test10/asymmetric.summary @@ -1,10 +1,11 @@ +2 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ puma1 puma3 ] Master/Slave Set: ms_drbd_poolA [ebe3fb6e-7778-426e-be58-190ab1ff3dd3] Masters: [ puma3 ] - Slaves: [ puma1 ] + Slaves (target-role): [ puma1 ] vpool_ip_poolA (ocf::heartbeat:IPaddr2): Stopped drbd_target_poolA (ocf::vpools:iscsi_target): Stopped @@ -21,7 +22,7 @@ Online: [ puma1 puma3 ] Master/Slave Set: ms_drbd_poolA [ebe3fb6e-7778-426e-be58-190ab1ff3dd3] Masters: [ puma3 ] - Slaves: [ puma1 ] + Slaves (target-role): [ puma1 ] vpool_ip_poolA (ocf::heartbeat:IPaddr2): Stopped drbd_target_poolA (ocf::vpools:iscsi_target): Stopped diff --git a/pengine/test10/bug-1572-1.exp b/pengine/test10/bug-1572-1.exp index 4325a5b299b..32ad950e96e 100644 --- a/pengine/test10/bug-1572-1.exp +++ b/pengine/test10/bug-1572-1.exp @@ -752,6 +752,9 @@ + + + diff --git a/pengine/test10/bug-1572-2.exp b/pengine/test10/bug-1572-2.exp index 006e6a52d79..6193c86e149 100644 --- a/pengine/test10/bug-1572-2.exp +++ b/pengine/test10/bug-1572-2.exp @@ -373,6 +373,9 @@ + + + diff --git a/pengine/test10/bug-1573.exp b/pengine/test10/bug-1573.exp index 5e45746ad96..651d26363d2 100644 --- a/pengine/test10/bug-1573.exp +++ b/pengine/test10/bug-1573.exp @@ -39,6 +39,9 @@ + + + diff --git a/pengine/test10/bug-1718.summary b/pengine/test10/bug-1718.summary index e24d303b1d9..622a5a8b3e8 100644 --- a/pengine/test10/bug-1718.summary +++ b/pengine/test10/bug-1718.summary @@ -1,3 +1,4 @@ +2 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ biggame.ds9 heartbeat.ds9 ops.ds9 ] @@ -5,7 +6,7 @@ OFFLINE: [ defiant.ds9 warbird.ds9 ] Resource Group: Web_Group Apache_IP (ocf::heartbeat:IPaddr): Started heartbeat.ds9 - resource_IP2 (ocf::heartbeat:IPaddr): (target-role:stopped) Stopped + resource_IP2 (ocf::heartbeat:IPaddr): Stopped ( disabled ) resource_dummyweb (ocf::heartbeat:Dummy): Stopped Resource Group: group_fUN resource_IP3 (ocf::heartbeat:IPaddr): Started ops.ds9 @@ -33,7 +34,7 @@ OFFLINE: [ defiant.ds9 warbird.ds9 ] Resource Group: Web_Group Apache_IP (ocf::heartbeat:IPaddr): Started heartbeat.ds9 - resource_IP2 (ocf::heartbeat:IPaddr): (target-role:stopped) Stopped + resource_IP2 (ocf::heartbeat:IPaddr): Stopped ( disabled ) resource_dummyweb (ocf::heartbeat:Dummy): Stopped Resource Group: group_fUN resource_IP3 (ocf::heartbeat:IPaddr): Stopped diff --git a/pengine/test10/bug-1765.summary b/pengine/test10/bug-1765.summary index 593bac392c8..478cad545f1 100644 --- a/pengine/test10/bug-1765.summary +++ b/pengine/test10/bug-1765.summary @@ -1,3 +1,4 @@ +6 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ sles236 sles238 ] @@ -7,7 +8,7 @@ Online: [ sles236 sles238 ] Stopped: [ sles238 ] Master/Slave Set: ms-drbd1 [drbd1] Masters: [ sles236 ] - Slaves: [ sles238 ] + Slaves (target-role): [ sles238 ] Transition Summary: * Start drbd0:1 (sles238) @@ -29,8 +30,8 @@ Online: [ sles236 sles238 ] Master/Slave Set: ms-drbd0 [drbd0] Masters: [ sles236 ] - Slaves: [ sles238 ] + Slaves (target-role): [ sles238 ] Master/Slave Set: ms-drbd1 [drbd1] Masters: [ sles236 ] - Slaves: [ sles238 ] + Slaves (target-role): [ sles238 ] diff --git a/pengine/test10/bug-1820-1.exp b/pengine/test10/bug-1820-1.exp index 03f354bdfae..778ea3167ae 100644 --- a/pengine/test10/bug-1820-1.exp +++ b/pengine/test10/bug-1820-1.exp @@ -241,6 +241,9 @@ + + + diff --git a/pengine/test10/bug-1820.exp b/pengine/test10/bug-1820.exp index e89bebf7b9b..f18b2c77094 100644 --- a/pengine/test10/bug-1820.exp +++ b/pengine/test10/bug-1820.exp @@ -207,6 +207,9 @@ + + + diff --git a/pengine/test10/bug-1822.exp b/pengine/test10/bug-1822.exp index f4bea195692..974d74d9caa 100644 --- a/pengine/test10/bug-1822.exp +++ b/pengine/test10/bug-1822.exp @@ -168,6 +168,9 @@ + + + diff --git a/pengine/test10/bug-5014-A-stop-B-started.summary b/pengine/test10/bug-5014-A-stop-B-started.summary index b2e51721a9f..20af4abbbea 100644 --- a/pengine/test10/bug-5014-A-stop-B-started.summary +++ b/pengine/test10/bug-5014-A-stop-B-started.summary @@ -1,8 +1,9 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Started fc16-builder + ClusterIP (ocf::heartbeat:IPaddr2): Started fc16-builder ( disabled ) ClusterIP2 (ocf::heartbeat:IPaddr2): Started fc16-builder Transition Summary: @@ -15,6 +16,6 @@ Executing cluster transition: Revised cluster status: Online: [ fc16-builder ] - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) ClusterIP2 (ocf::heartbeat:IPaddr2): Started fc16-builder diff --git a/pengine/test10/bug-5014-A-stopped-B-stopped.summary b/pengine/test10/bug-5014-A-stopped-B-stopped.summary index 503f96f4be8..970d81c3f9b 100644 --- a/pengine/test10/bug-5014-A-stopped-B-stopped.summary +++ b/pengine/test10/bug-5014-A-stopped-B-stopped.summary @@ -1,8 +1,9 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped Transition Summary: @@ -15,6 +16,6 @@ Executing cluster transition: Revised cluster status: Online: [ fc16-builder ] - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped diff --git a/pengine/test10/bug-5014-CLONE-A-stop-B-started.summary b/pengine/test10/bug-5014-CLONE-A-stop-B-started.summary index 10201241b00..5e9bec062f1 100644 --- a/pengine/test10/bug-5014-CLONE-A-stop-B-started.summary +++ b/pengine/test10/bug-5014-CLONE-A-stop-B-started.summary @@ -1,3 +1,4 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -20,7 +21,7 @@ Revised cluster status: Online: [ fc16-builder ] Clone Set: clone1 [ClusterIP] - Stopped: [ fc16-builder ] + Stopped (disabled): [ fc16-builder ] Clone Set: clone2 [ClusterIP2] Started: [ fc16-builder ] diff --git a/pengine/test10/bug-5014-CthenAthenB-C-stopped.summary b/pengine/test10/bug-5014-CthenAthenB-C-stopped.summary index 13153a29819..991e618e1d9 100644 --- a/pengine/test10/bug-5014-CthenAthenB-C-stopped.summary +++ b/pengine/test10/bug-5014-CthenAthenB-C-stopped.summary @@ -1,10 +1,11 @@ +1 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped - ClusterIP3 (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP3 (ocf::heartbeat:IPaddr2): Stopped ( disabled ) Transition Summary: * Start ClusterIP (fc16-builder - blocked) @@ -20,5 +21,5 @@ Online: [ fc16-builder ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped - ClusterIP3 (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP3 (ocf::heartbeat:IPaddr2): Stopped ( disabled ) diff --git a/pengine/test10/bug-5014-GROUP-A-stopped-B-started.summary b/pengine/test10/bug-5014-GROUP-A-stopped-B-started.summary index 5571ab81e50..67df8d755d8 100644 --- a/pengine/test10/bug-5014-GROUP-A-stopped-B-started.summary +++ b/pengine/test10/bug-5014-GROUP-A-stopped-B-started.summary @@ -1,9 +1,10 @@ +2 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] Resource Group: group1 - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Started fc16-builder + ClusterIP (ocf::heartbeat:IPaddr2): Started fc16-builder ( disabled ) Resource Group: group2 ClusterIP2 (ocf::heartbeat:IPaddr2): Started fc16-builder @@ -20,7 +21,7 @@ Revised cluster status: Online: [ fc16-builder ] Resource Group: group1 - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) Resource Group: group2 ClusterIP2 (ocf::heartbeat:IPaddr2): Started fc16-builder diff --git a/pengine/test10/bug-5014-GROUP-A-stopped-B-stopped.summary b/pengine/test10/bug-5014-GROUP-A-stopped-B-stopped.summary index 425169a876f..e5251a0adb5 100644 --- a/pengine/test10/bug-5014-GROUP-A-stopped-B-stopped.summary +++ b/pengine/test10/bug-5014-GROUP-A-stopped-B-stopped.summary @@ -1,9 +1,10 @@ +2 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] Resource Group: group1 - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) Resource Group: group2 ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped @@ -16,7 +17,7 @@ Revised cluster status: Online: [ fc16-builder ] Resource Group: group1 - ClusterIP (ocf::heartbeat:IPaddr2): (target-role:Stopped) Stopped + ClusterIP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) Resource Group: group2 ClusterIP2 (ocf::heartbeat:IPaddr2): Stopped diff --git a/pengine/test10/bug-5014-ordered-set-symmetrical-false.summary b/pengine/test10/bug-5014-ordered-set-symmetrical-false.summary index b980cc1f887..4322db36c2a 100644 --- a/pengine/test10/bug-5014-ordered-set-symmetrical-false.summary +++ b/pengine/test10/bug-5014-ordered-set-symmetrical-false.summary @@ -1,3 +1,4 @@ +1 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -5,7 +6,7 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + C (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) Transition Summary: * Stop C (fc16-builder) @@ -20,5 +21,5 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/bug-5014-ordered-set-symmetrical-true.summary b/pengine/test10/bug-5014-ordered-set-symmetrical-true.summary index 9691ba68950..af74ba6527f 100644 --- a/pengine/test10/bug-5014-ordered-set-symmetrical-true.summary +++ b/pengine/test10/bug-5014-ordered-set-symmetrical-true.summary @@ -1,3 +1,4 @@ +1 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -5,7 +6,7 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + C (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) Transition Summary: * Stop A (Started fc16-builder) @@ -22,5 +23,5 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/bug-5028-bottom.summary b/pengine/test10/bug-5028-bottom.summary index 3aa7d1f74d4..fc5cf8f05a0 100644 --- a/pengine/test10/bug-5028-bottom.summary +++ b/pengine/test10/bug-5028-bottom.summary @@ -3,7 +3,7 @@ Current cluster status: Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g - dummy01 (ocf::heartbeat:Dummy): FAILED bl460g6a (unmanaged) + dummy01 (ocf::heartbeat:Dummy): FAILED bl460g6a ( blocked ) dummy02 (ocf::heartbeat:Dummy-stop-NG): Started bl460g6a Transition Summary: @@ -18,6 +18,6 @@ Revised cluster status: Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g - dummy01 (ocf::heartbeat:Dummy): FAILED bl460g6a (unmanaged) + dummy01 (ocf::heartbeat:Dummy): FAILED bl460g6a ( blocked ) dummy02 (ocf::heartbeat:Dummy-stop-NG): Stopped diff --git a/pengine/test10/bug-5028-detach.exp b/pengine/test10/bug-5028-detach.exp index f5ebaebe61a..3f7cdafdc66 100644 --- a/pengine/test10/bug-5028-detach.exp +++ b/pengine/test10/bug-5028-detach.exp @@ -3,6 +3,9 @@ + + + diff --git a/pengine/test10/bug-5028-detach.summary b/pengine/test10/bug-5028-detach.summary index 0f3247f5dfe..5e93b2a7e74 100644 --- a/pengine/test10/bug-5028-detach.summary +++ b/pengine/test10/bug-5028-detach.summary @@ -1,10 +1,13 @@ + *** Resource management is DISABLED *** + The cluster will not attempt to start, stop or recover services + Current cluster status: Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g dummy01 (ocf::heartbeat:Dummy): Started bl460g6a (unmanaged) - dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a (unmanaged) + dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a ( blocked ) Transition Summary: @@ -16,5 +19,5 @@ Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g dummy01 (ocf::heartbeat:Dummy): Started bl460g6a (unmanaged) - dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a (unmanaged) + dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a ( blocked ) diff --git a/pengine/test10/bug-5028.summary b/pengine/test10/bug-5028.summary index ea0c95fdedd..ad7657c1dce 100644 --- a/pengine/test10/bug-5028.summary +++ b/pengine/test10/bug-5028.summary @@ -4,7 +4,7 @@ Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g dummy01 (ocf::heartbeat:Dummy): Started bl460g6a - dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a (unmanaged) + dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a ( blocked ) Transition Summary: * Stop dummy01 (Started bl460g6a - blocked) @@ -18,5 +18,5 @@ Online: [ bl460g6a bl460g6b ] Resource Group: dummy-g dummy01 (ocf::heartbeat:Dummy): Started bl460g6a - dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a (unmanaged) + dummy02 (ocf::heartbeat:Dummy-stop-NG): FAILED bl460g6a ( blocked ) diff --git a/pengine/test10/bug-5059.summary b/pengine/test10/bug-5059.summary index 7f6108aa9d5..38efad7195d 100644 --- a/pengine/test10/bug-5059.summary +++ b/pengine/test10/bug-5059.summary @@ -1,3 +1,4 @@ +12 of 6 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Node gluster03.h: standby @@ -7,10 +8,10 @@ OFFLINE: [ gluster04.h ] Master/Slave Set: ms_stateful [g_stateful] Resource Group: g_stateful:0 p_stateful1 (ocf::pacemaker:Stateful): Started gluster01.h - p_stateful2 (ocf::pacemaker:Stateful): Stopped + p_stateful2 (ocf::pacemaker:Stateful): Stopped ( target-role:Started ) Resource Group: g_stateful:1 p_stateful1 (ocf::pacemaker:Stateful): Started gluster02.h - p_stateful2 (ocf::pacemaker:Stateful): Stopped + p_stateful2 (ocf::pacemaker:Stateful): Stopped ( target-role:Started ) Stopped: [ gluster03.h gluster04.h ] Clone Set: c_dummy [p_dummy1] Started: [ gluster01.h gluster02.h ] @@ -70,7 +71,7 @@ OFFLINE: [ gluster04.h ] Master/Slave Set: ms_stateful [g_stateful] Masters: [ gluster01.h ] - Slaves: [ gluster02.h ] + Slaves (target-role): [ gluster02.h ] Clone Set: c_dummy [p_dummy1] Started: [ gluster01.h gluster02.h ] diff --git a/pengine/test10/bug-5140-require-all-false.summary b/pengine/test10/bug-5140-require-all-false.summary index b9d38bbeca1..e06e969c3a8 100644 --- a/pengine/test10/bug-5140-require-all-false.summary +++ b/pengine/test10/bug-5140-require-all-false.summary @@ -1,3 +1,4 @@ +4 of 35 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Node hex-1: standby @@ -17,9 +18,9 @@ Node hex-3: OFFLINE (standby) Clone Set: fs2 [fs-ocfs-2] Stopped: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] - Stopped: [ hex-1 hex-2 hex-3 ] + Stopped (disabled): [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r1 [drbd-r1] - Stopped: [ hex-1 hex-2 hex-3 ] + Stopped (disabled): [ hex-1 hex-2 hex-3 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Stopped vg-md0 (ocf::heartbeat:LVM): Stopped @@ -61,9 +62,9 @@ Node hex-3: OFFLINE (standby) Clone Set: fs2 [fs-ocfs-2] Stopped: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] - Stopped: [ hex-1 hex-2 hex-3 ] + Stopped (disabled): [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r1 [drbd-r1] - Stopped: [ hex-1 hex-2 hex-3 ] + Stopped (disabled): [ hex-1 hex-2 hex-3 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Stopped vg-md0 (ocf::heartbeat:LVM): Stopped diff --git a/pengine/test10/bug-5143-ms-shuffle.summary b/pengine/test10/bug-5143-ms-shuffle.summary index 75b65cfbf0e..63c54e126d1 100644 --- a/pengine/test10/bug-5143-ms-shuffle.summary +++ b/pengine/test10/bug-5143-ms-shuffle.summary @@ -1,3 +1,4 @@ +7 of 34 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-1 hex-2 hex-3 ] @@ -10,9 +11,9 @@ Online: [ hex-1 hex-2 hex-3 ] Started: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] Masters: [ hex-1 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] Master/Slave Set: ms-r1 [drbd-r1] - Slaves: [ hex-2 hex-3 ] + Slaves (target-role): [ hex-2 hex-3 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Started hex-3 vg-md0 (ocf::heartbeat:LVM): Started hex-3 @@ -23,7 +24,7 @@ Online: [ hex-1 hex-2 hex-3 ] dummy5 (ocf::heartbeat:Delay): Started hex-1 dummy6 (ocf::heartbeat:Delay): Started hex-2 Resource Group: r0-group - fs-r0 (ocf::heartbeat:Filesystem): (target-role:Stopped) Stopped + fs-r0 (ocf::heartbeat:Filesystem): Stopped ( disabled ) dummy2 (ocf::heartbeat:Delay): Stopped Transition Summary: @@ -55,10 +56,10 @@ Online: [ hex-1 hex-2 hex-3 ] Started: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] Masters: [ hex-1 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] Master/Slave Set: ms-r1 [drbd-r1] Masters: [ hex-3 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Started hex-3 vg-md0 (ocf::heartbeat:LVM): Started hex-3 @@ -69,6 +70,6 @@ Online: [ hex-1 hex-2 hex-3 ] dummy5 (ocf::heartbeat:Delay): Started hex-1 dummy6 (ocf::heartbeat:Delay): Started hex-2 Resource Group: r0-group - fs-r0 (ocf::heartbeat:Filesystem): (target-role:Stopped) Stopped + fs-r0 (ocf::heartbeat:Filesystem): Stopped ( disabled ) dummy2 (ocf::heartbeat:Delay): Stopped diff --git a/pengine/test10/bug-5186-partial-migrate.exp b/pengine/test10/bug-5186-partial-migrate.exp index 678f137ed46..eddabe191d8 100644 --- a/pengine/test10/bug-5186-partial-migrate.exp +++ b/pengine/test10/bug-5186-partial-migrate.exp @@ -354,6 +354,9 @@ + + + diff --git a/pengine/test10/bug-cl-5168.summary b/pengine/test10/bug-cl-5168.summary index 7b8ff6f0553..b197abedaf2 100644 --- a/pengine/test10/bug-cl-5168.summary +++ b/pengine/test10/bug-cl-5168.summary @@ -1,3 +1,4 @@ +5 of 34 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-1 hex-2 hex-3 ] @@ -10,7 +11,7 @@ Online: [ hex-1 hex-2 hex-3 ] Started: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] Masters: [ hex-1 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Started hex-3 vg-md0 (ocf::heartbeat:LVM): Started hex-3 @@ -24,7 +25,7 @@ Online: [ hex-1 hex-2 hex-3 ] fs-r0 (ocf::heartbeat:Filesystem): Started hex-1 dummy2 (ocf::heartbeat:Delay): Started hex-1 Master/Slave Set: ms-r1 [drbd-r1] - Slaves: [ hex-2 hex-3 ] + Slaves (target-role): [ hex-2 hex-3 ] Transition Summary: * Promote drbd-r1:1 (Slave -> Master hex-3) @@ -55,7 +56,7 @@ Online: [ hex-1 hex-2 hex-3 ] Started: [ hex-1 hex-2 hex-3 ] Master/Slave Set: ms-r0 [drbd-r0] Masters: [ hex-1 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] Resource Group: md0-group md0 (ocf::heartbeat:Raid1): Started hex-3 vg-md0 (ocf::heartbeat:LVM): Started hex-3 @@ -70,5 +71,5 @@ Online: [ hex-1 hex-2 hex-3 ] dummy2 (ocf::heartbeat:Delay): Started hex-1 Master/Slave Set: ms-r1 [drbd-r1] Masters: [ hex-3 ] - Slaves: [ hex-2 ] + Slaves (target-role): [ hex-2 ] diff --git a/pengine/test10/bug-cl-5170.summary b/pengine/test10/bug-cl-5170.summary index 97d2034be4c..c932a864814 100644 --- a/pengine/test10/bug-cl-5170.summary +++ b/pengine/test10/bug-cl-5170.summary @@ -7,7 +7,7 @@ Online: [ TCS-2 ] ip_trf (ocf::heartbeat:IPaddr2): Started TCS-2 ip_mgmt (ocf::heartbeat:IPaddr2): Started TCS-2 Clone Set: cl_tomcat_nms [d_tomcat_nms] - d_tomcat_nms (ocf::ntc:tomcat): FAILED TCS-2 (unmanaged) + d_tomcat_nms (ocf::ntc:tomcat): FAILED TCS-2 ( blocked ) Stopped: [ TCS-1 ] Transition Summary: @@ -29,6 +29,6 @@ Online: [ TCS-2 ] ip_trf (ocf::heartbeat:IPaddr2): Stopped ip_mgmt (ocf::heartbeat:IPaddr2): Stopped Clone Set: cl_tomcat_nms [d_tomcat_nms] - d_tomcat_nms (ocf::ntc:tomcat): FAILED TCS-2 (unmanaged) + d_tomcat_nms (ocf::ntc:tomcat): FAILED TCS-2 ( blocked ) Stopped: [ TCS-1 ] diff --git a/pengine/test10/bug-cl-5219.summary b/pengine/test10/bug-cl-5219.summary index 9e64a9b2e1c..3a2526507d1 100644 --- a/pengine/test10/bug-cl-5219.summary +++ b/pengine/test10/bug-cl-5219.summary @@ -1,8 +1,9 @@ +1 of 9 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ ha1.test.anchor.net.au ha2.test.anchor.net.au ] - child1-service (ocf::pacemaker:Dummy): (target-role:Stopped) Started ha2.test.anchor.net.au + child1-service (ocf::pacemaker:Dummy): Started ha2.test.anchor.net.au ( disabled ) child2-service (ocf::pacemaker:Dummy): Started ha2.test.anchor.net.au parent-service (ocf::pacemaker:Dummy): Started ha2.test.anchor.net.au Master/Slave Set: child1 [stateful-child1] @@ -25,7 +26,7 @@ Executing cluster transition: Revised cluster status: Online: [ ha1.test.anchor.net.au ha2.test.anchor.net.au ] - child1-service (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + child1-service (ocf::pacemaker:Dummy): Stopped ( disabled ) child2-service (ocf::pacemaker:Dummy): Started ha2.test.anchor.net.au parent-service (ocf::pacemaker:Dummy): Started ha2.test.anchor.net.au Master/Slave Set: child1 [stateful-child1] diff --git a/pengine/test10/bug-cl-5247.exp b/pengine/test10/bug-cl-5247.exp index 7b7e5b9059d..adb31043e0b 100644 --- a/pengine/test10/bug-cl-5247.exp +++ b/pengine/test10/bug-cl-5247.exp @@ -661,6 +661,9 @@ + + + diff --git a/pengine/test10/bug-lf-2171.summary b/pengine/test10/bug-lf-2171.summary index 5af3cd0ecd0..b1413c3ce1f 100644 --- a/pengine/test10/bug-lf-2171.summary +++ b/pengine/test10/bug-lf-2171.summary @@ -1,3 +1,4 @@ +3 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ xenserver1 xenserver2 ] @@ -29,7 +30,7 @@ Revised cluster status: Online: [ xenserver1 xenserver2 ] Clone Set: cl_res_Dummy1 [res_Dummy1] - Stopped: [ xenserver1 xenserver2 ] + Stopped (disabled): [ xenserver1 xenserver2 ] Resource Group: gr_Dummy res_Dummy2 (ocf::heartbeat:Dummy): Stopped res_Dummy3 (ocf::heartbeat:Dummy): Stopped diff --git a/pengine/test10/bug-lf-2317.summary b/pengine/test10/bug-lf-2317.summary index f6b0ae406bc..bed83f16588 100644 --- a/pengine/test10/bug-lf-2317.summary +++ b/pengine/test10/bug-lf-2317.summary @@ -1,3 +1,4 @@ +2 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ ibm1.isg.si ibm2.isg.si ] @@ -5,7 +6,7 @@ Online: [ ibm1.isg.si ibm2.isg.si ] HostingIsg (ocf::heartbeat:Xen): Started ibm2.isg.si Master/Slave Set: ms_drbd_r0 [drbd_r0] Masters: [ ibm2.isg.si ] - Slaves: [ ibm1.isg.si ] + Slaves (target-role): [ ibm1.isg.si ] Transition Summary: * Promote drbd_r0:1 (Slave -> Master ibm1.isg.si) diff --git a/pengine/test10/bug-lf-2358.summary b/pengine/test10/bug-lf-2358.summary index 434c5ed0265..98b26eff29c 100644 --- a/pengine/test10/bug-lf-2358.summary +++ b/pengine/test10/bug-lf-2358.summary @@ -1,9 +1,10 @@ +2 of 15 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ alice.demo bob.demo ] Master/Slave Set: ms_drbd_nfsexport [res_drbd_nfsexport] - Stopped: [ alice.demo bob.demo ] + Stopped (disabled): [ alice.demo bob.demo ] Resource Group: rg_nfs res_fs_nfsexport (ocf::heartbeat:Filesystem): Stopped res_ip_nfs (ocf::heartbeat:IPaddr2): Stopped @@ -42,7 +43,7 @@ Revised cluster status: Online: [ alice.demo bob.demo ] Master/Slave Set: ms_drbd_nfsexport [res_drbd_nfsexport] - Stopped: [ alice.demo bob.demo ] + Stopped (disabled): [ alice.demo bob.demo ] Resource Group: rg_nfs res_fs_nfsexport (ocf::heartbeat:Filesystem): Stopped res_ip_nfs (ocf::heartbeat:IPaddr2): Stopped diff --git a/pengine/test10/bug-lf-2422.summary b/pengine/test10/bug-lf-2422.summary index c78a3145816..54341c924db 100644 --- a/pengine/test10/bug-lf-2422.summary +++ b/pengine/test10/bug-lf-2422.summary @@ -1,3 +1,4 @@ +8 of 21 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ qa-suse-1 qa-suse-2 qa-suse-3 qa-suse-4 ] @@ -58,22 +59,22 @@ Online: [ qa-suse-1 qa-suse-2 qa-suse-3 qa-suse-4 ] Resource Group: o2stage:0 dlm (ocf::pacemaker:controld): Started qa-suse-1 clvm (ocf::lvm2:clvmd): Started qa-suse-1 - o2cb (ocf::ocfs2:o2cb): (target-role:Stopped) Stopped + o2cb (ocf::ocfs2:o2cb): Stopped ( disabled ) cmirror (ocf::lvm2:cmirrord): Stopped Resource Group: o2stage:1 dlm (ocf::pacemaker:controld): Started qa-suse-4 clvm (ocf::lvm2:clvmd): Started qa-suse-4 - o2cb (ocf::ocfs2:o2cb): (target-role:Stopped) Stopped + o2cb (ocf::ocfs2:o2cb): Stopped ( disabled ) cmirror (ocf::lvm2:cmirrord): Stopped Resource Group: o2stage:2 dlm (ocf::pacemaker:controld): Started qa-suse-3 clvm (ocf::lvm2:clvmd): Started qa-suse-3 - o2cb (ocf::ocfs2:o2cb): (target-role:Stopped) Stopped + o2cb (ocf::ocfs2:o2cb): Stopped ( disabled ) cmirror (ocf::lvm2:cmirrord): Stopped Resource Group: o2stage:3 dlm (ocf::pacemaker:controld): Started qa-suse-2 clvm (ocf::lvm2:clvmd): Started qa-suse-2 - o2cb (ocf::ocfs2:o2cb): (target-role:Stopped) Stopped + o2cb (ocf::ocfs2:o2cb): Stopped ( disabled ) cmirror (ocf::lvm2:cmirrord): Stopped Clone Set: c-ocfs [ocfs] Stopped: [ qa-suse-1 qa-suse-2 qa-suse-3 qa-suse-4 ] diff --git a/pengine/test10/bug-lf-2453.summary b/pengine/test10/bug-lf-2453.summary index 70eb79e8abf..3ff1a6bbdc7 100644 --- a/pengine/test10/bug-lf-2453.summary +++ b/pengine/test10/bug-lf-2453.summary @@ -1,3 +1,4 @@ +2 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ domu1 domu2 ] @@ -32,7 +33,7 @@ Online: [ domu1 domu2 ] PrimitiveResource1 (ocf::heartbeat:IPaddr2): Stopped Clone Set: CloneResource1 [apache] - Stopped: [ domu1 domu2 ] + Stopped (disabled): [ domu1 domu2 ] Clone Set: CloneResource2 [DummyResource] Stopped: [ domu1 domu2 ] diff --git a/pengine/test10/bug-lf-2508.exp b/pengine/test10/bug-lf-2508.exp index def299ed26c..363154d58f0 100644 --- a/pengine/test10/bug-lf-2508.exp +++ b/pengine/test10/bug-lf-2508.exp @@ -518,6 +518,9 @@ + + + diff --git a/pengine/test10/bug-lf-2551.exp b/pengine/test10/bug-lf-2551.exp index 5702daf0096..44bdfca2bba 100644 --- a/pengine/test10/bug-lf-2551.exp +++ b/pengine/test10/bug-lf-2551.exp @@ -497,6 +497,9 @@ + + + diff --git a/pengine/test10/bug-lf-2606.exp b/pengine/test10/bug-lf-2606.exp index 6367e8ef90e..467e2332eb6 100644 --- a/pengine/test10/bug-lf-2606.exp +++ b/pengine/test10/bug-lf-2606.exp @@ -142,6 +142,9 @@ + + + diff --git a/pengine/test10/bug-lf-2606.summary b/pengine/test10/bug-lf-2606.summary index 435f8f8add7..3e74d4bcf57 100644 --- a/pengine/test10/bug-lf-2606.summary +++ b/pengine/test10/bug-lf-2606.summary @@ -1,10 +1,11 @@ +1 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Node node2: UNCLEAN (online) Online: [ node1 ] rsc_stonith (stonith:null): Started node1 - rsc1 (ocf::pacemaker:Dummy): FAILED node2 + rsc1 (ocf::pacemaker:Dummy): FAILED node2 ( disabled ) rsc2 (ocf::pacemaker:Dummy): Started node2 Master/Slave Set: ms3 [rsc3] Masters: [ node2 ] @@ -35,7 +36,7 @@ Online: [ node1 ] OFFLINE: [ node2 ] rsc_stonith (stonith:null): Started node1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) rsc2 (ocf::pacemaker:Dummy): Started node1 Master/Slave Set: ms3 [rsc3] Slaves: [ node1 ] diff --git a/pengine/test10/bug-rh-1097457.exp b/pengine/test10/bug-rh-1097457.exp index 3b65a245c1f..94a4e8d3dc6 100644 --- a/pengine/test10/bug-rh-1097457.exp +++ b/pengine/test10/bug-rh-1097457.exp @@ -389,6 +389,9 @@ + + + diff --git a/pengine/test10/bug-rh-1097457.summary b/pengine/test10/bug-rh-1097457.summary index c8751ae4390..d78d951c17b 100644 --- a/pengine/test10/bug-rh-1097457.summary +++ b/pengine/test10/bug-rh-1097457.summary @@ -1,3 +1,4 @@ +2 of 26 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ lama2 lama3 ] @@ -12,8 +13,8 @@ Containers: [ lamaVM1:VM1 lamaVM2:VM2 lamaVM3:VM3 ] VM3 (ocf::heartbeat:VirtualDomain): Started lama3 FSlun3 (ocf::heartbeat:Filesystem): FAILED lamaVM2 FSlun4 (ocf::heartbeat:Filesystem): Started lamaVM3 - FAKE5-IP (ocf::heartbeat:IPaddr2): (target-role:stopped) Stopped - FAKE6-IP (ocf::heartbeat:IPaddr2): (target-role:stopped) Stopped + FAKE5-IP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) + FAKE6-IP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) FAKE5 (ocf::heartbeat:Dummy): Started lamaVM3 Resource Group: lamaVM1-G1 FAKE1 (ocf::heartbeat:Dummy): Started lamaVM1 @@ -81,8 +82,8 @@ Containers: [ lamaVM1:VM1 lamaVM2:VM2 lamaVM3:VM3 ] VM3 (ocf::heartbeat:VirtualDomain): Started lama3 FSlun3 (ocf::heartbeat:Filesystem): FAILED [ lama2 lamaVM2 ] FSlun4 (ocf::heartbeat:Filesystem): Started lamaVM3 - FAKE5-IP (ocf::heartbeat:IPaddr2): (target-role:stopped) Stopped - FAKE6-IP (ocf::heartbeat:IPaddr2): (target-role:stopped) Stopped + FAKE5-IP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) + FAKE6-IP (ocf::heartbeat:IPaddr2): Stopped ( disabled ) FAKE5 (ocf::heartbeat:Dummy): Started lamaVM3 Resource Group: lamaVM1-G1 FAKE1 (ocf::heartbeat:Dummy): Started lamaVM1 diff --git a/pengine/test10/bug-suse-707150.summary b/pengine/test10/bug-suse-707150.summary index 0dadf0a9033..da1d5c4f87e 100644 --- a/pengine/test10/bug-suse-707150.summary +++ b/pengine/test10/bug-suse-707150.summary @@ -1,16 +1,17 @@ +9 of 28 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-0 hex-9 ] OFFLINE: [ hex-7 hex-8 ] - vm-00 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + vm-00 (ocf::heartbeat:Xen): Stopped ( disabled ) Clone Set: base-clone [base-group] Resource Group: base-group:0 dlm (ocf::pacemaker:controld): Started hex-0 o2cb (ocf::ocfs2:o2cb): Stopped clvm (ocf::lvm2:clvmd): Stopped cmirrord (ocf::lvm2:cmirrord): Stopped - vg1 (ocf::heartbeat:LVM): (target-role:Stopped) Stopped + vg1 (ocf::heartbeat:LVM): Stopped ( disabled ) ocfs2-1 (ocf::heartbeat:Filesystem): Stopped Stopped: [ hex-7 hex-8 hex-9 ] vm-01 (ocf::heartbeat:Xen): Stopped @@ -48,21 +49,21 @@ Revised cluster status: Online: [ hex-0 hex-9 ] OFFLINE: [ hex-7 hex-8 ] - vm-00 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + vm-00 (ocf::heartbeat:Xen): Stopped ( disabled ) Clone Set: base-clone [base-group] Resource Group: base-group:0 dlm (ocf::pacemaker:controld): Started hex-0 o2cb (ocf::ocfs2:o2cb): Started hex-0 clvm (ocf::lvm2:clvmd): Started hex-0 cmirrord (ocf::lvm2:cmirrord): Started hex-0 - vg1 (ocf::heartbeat:LVM): (target-role:Stopped) Stopped + vg1 (ocf::heartbeat:LVM): Stopped ( disabled ) ocfs2-1 (ocf::heartbeat:Filesystem): Stopped Resource Group: base-group:1 dlm (ocf::pacemaker:controld): Started hex-9 o2cb (ocf::ocfs2:o2cb): Started hex-9 clvm (ocf::lvm2:clvmd): Started hex-9 cmirrord (ocf::lvm2:cmirrord): Started hex-9 - vg1 (ocf::heartbeat:LVM): (target-role:Stopped) Stopped + vg1 (ocf::heartbeat:LVM): Stopped ( disabled ) ocfs2-1 (ocf::heartbeat:Filesystem): Stopped Stopped: [ hex-7 hex-8 ] vm-01 (ocf::heartbeat:Xen): Stopped diff --git a/pengine/test10/clone-fail-block-colocation.summary b/pengine/test10/clone-fail-block-colocation.summary index 68fc7a01b26..9b9167af520 100644 --- a/pengine/test10/clone-fail-block-colocation.summary +++ b/pengine/test10/clone-fail-block-colocation.summary @@ -10,7 +10,7 @@ Online: [ DEM-1 DEM-2 ] Clone Set: cl_bird [d_bird] Started: [ DEM-1 DEM-2 ] Clone Set: cl_bird6 [d_bird6] - d_bird6 (lsb:bird6): FAILED DEM-1 (unmanaged) + d_bird6 (lsb:bird6): FAILED DEM-1 ( blocked ) Started: [ DEM-2 ] Clone Set: cl_tomcat_nms [d_tomcat_nms] Started: [ DEM-1 DEM-2 ] @@ -51,7 +51,7 @@ Online: [ DEM-1 DEM-2 ] Clone Set: cl_bird [d_bird] Started: [ DEM-1 DEM-2 ] Clone Set: cl_bird6 [d_bird6] - d_bird6 (lsb:bird6): FAILED DEM-1 (unmanaged) + d_bird6 (lsb:bird6): FAILED DEM-1 ( blocked ) Started: [ DEM-2 ] Clone Set: cl_tomcat_nms [d_tomcat_nms] Started: [ DEM-1 DEM-2 ] diff --git a/pengine/test10/clone-no-shuffle.summary b/pengine/test10/clone-no-shuffle.summary index 59ffbbe8643..9cbba90974e 100644 --- a/pengine/test10/clone-no-shuffle.summary +++ b/pengine/test10/clone-no-shuffle.summary @@ -1,3 +1,4 @@ +2 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ dktest1sles10 dktest2sles10 ] @@ -54,7 +55,7 @@ Online: [ dktest1sles10 dktest2sles10 ] stonith-1 (stonith:dummy): Started dktest1sles10 Master/Slave Set: ms-drbd1 [drbd1] - Slaves: [ dktest1sles10 ] + Slaves (target-role): [ dktest1sles10 ] Stopped: [ dktest2sles10 ] testip (ocf::heartbeat:IPaddr2): Stopped diff --git a/pengine/test10/clone-order-16instances.summary b/pengine/test10/clone-order-16instances.summary index d0c3fbb2a70..34eb7356456 100644 --- a/pengine/test10/clone-order-16instances.summary +++ b/pengine/test10/clone-order-16instances.summary @@ -1,3 +1,4 @@ +16 of 33 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] @@ -7,7 +8,7 @@ Online: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng Started: [ virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com ] Stopped: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] Clone Set: clvmd-clone [clvmd] - Stopped: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] + Stopped (disabled): [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] Transition Summary: * Start dlm:10 (virt-009.cluster-qe.lab.eng.brq.redhat.com) @@ -64,5 +65,5 @@ Online: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng Clone Set: dlm-clone [dlm] Started: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] Clone Set: clvmd-clone [clvmd] - Stopped: [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] + Stopped (disabled): [ virt-009.cluster-qe.lab.eng.brq.redhat.com virt-010.cluster-qe.lab.eng.brq.redhat.com virt-012.cluster-qe.lab.eng.brq.redhat.com virt-013.cluster-qe.lab.eng.brq.redhat.com virt-014.cluster-qe.lab.eng.brq.redhat.com virt-015.cluster-qe.lab.eng.brq.redhat.com virt-016.cluster-qe.lab.eng.brq.redhat.com virt-020.cluster-qe.lab.eng.brq.redhat.com virt-027.cluster-qe.lab.eng.brq.redhat.com virt-028.cluster-qe.lab.eng.brq.redhat.com virt-029.cluster-qe.lab.eng.brq.redhat.com virt-030.cluster-qe.lab.eng.brq.redhat.com virt-031.cluster-qe.lab.eng.brq.redhat.com virt-032.cluster-qe.lab.eng.brq.redhat.com virt-033.cluster-qe.lab.eng.brq.redhat.com virt-034.cluster-qe.lab.eng.brq.redhat.com ] diff --git a/pengine/test10/cloned-group-stop.summary b/pengine/test10/cloned-group-stop.summary index 95abd493364..8357c38b3d8 100644 --- a/pengine/test10/cloned-group-stop.summary +++ b/pengine/test10/cloned-group-stop.summary @@ -1,3 +1,4 @@ +2 of 20 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ rhos4-node3 rhos4-node4 ] @@ -78,7 +79,7 @@ Online: [ rhos4-node3 rhos4-node4 ] mysql-fs (ocf::heartbeat:Filesystem): Started rhos4-node3 mysql-db (ocf::heartbeat:mysql): Started rhos4-node3 Clone Set: qpidd-clone [qpidd] - Stopped: [ rhos4-node3 rhos4-node4 ] + Stopped (disabled): [ rhos4-node3 rhos4-node4 ] Clone Set: keystone-clone [keystone] Stopped: [ rhos4-node3 rhos4-node4 ] Clone Set: glance-clone [glance] diff --git a/pengine/test10/coloc-clone-stays-active.summary b/pengine/test10/coloc-clone-stays-active.summary index a0370b5f4e0..34dc2c0e338 100644 --- a/pengine/test10/coloc-clone-stays-active.summary +++ b/pengine/test10/coloc-clone-stays-active.summary @@ -1,3 +1,4 @@ +50 of 87 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ s01-0 s01-1 ] @@ -18,18 +19,18 @@ Online: [ s01-0 s01-1 ] vip-238 (ocf::heartbeat:IPaddr2): Started s01-1 Master/Slave Set: ms-drbd-pool-0 [drbd-pool-0] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-drbd-pool-1 [drbd-pool-1] Masters: [ s01-1 ] - Slaves: [ s01-0 ] + Slaves (target-role): [ s01-0 ] Master/Slave Set: ms-iscsi-pool-0-vips-fw [iscsi-pool-0-vips-fw] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-iscsi-pool-1-vips-fw [iscsi-pool-1-vips-fw] Masters: [ s01-1 ] - Slaves: [ s01-0 ] + Slaves (target-role): [ s01-0 ] Clone Set: cl-o2cb [o2cb] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-s01-service [drbd-s01-service] Masters: [ s01-0 s01-1 ] Clone Set: cl-s01-service-fs [s01-service-fs] @@ -37,10 +38,10 @@ Online: [ s01-0 s01-1 ] Clone Set: cl-ietd [ietd] Started: [ s01-0 s01-1 ] Clone Set: cl-dhcpd [dhcpd] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Resource Group: http-server vip-233 (ocf::heartbeat:IPaddr2): Started s01-0 - nginx (lsb:nginx): (target-role:Stopped) Stopped + nginx (lsb:nginx): Stopped ( disabled ) Master/Slave Set: ms-drbd-s01-logs [drbd-s01-logs] Masters: [ s01-0 s01-1 ] Clone Set: cl-s01-logs-fs [s01-logs-fs] @@ -58,22 +59,22 @@ Online: [ s01-0 s01-1 ] Clone Set: connected-outer [ping-bmc-and-switch] Started: [ s01-0 s01-1 ] Resource Group: iscsi-vds-dom0-stateless-0-target-all - iscsi-vds-dom0-stateless-0-target (ocf::vds-ok:iSCSITarget): (target-role:Stopped) Stopped - iscsi-vds-dom0-stateless-0-lun-1 (ocf::vds-ok:iSCSILogicalUnit): (target-role:Stopped) Stopped + iscsi-vds-dom0-stateless-0-target (ocf::vds-ok:iSCSITarget): Stopped ( disabled ) + iscsi-vds-dom0-stateless-0-lun-1 (ocf::vds-ok:iSCSILogicalUnit): Stopped ( disabled ) Resource Group: iscsi-vds-dom0-stateless-0-vips vip-227 (ocf::heartbeat:IPaddr2): Stopped vip-228 (ocf::heartbeat:IPaddr2): Stopped Master/Slave Set: ms-drbd-vds-dom0-stateless-0 [drbd-vds-dom0-stateless-0] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-iscsi-vds-dom0-stateless-0-vips-fw [iscsi-vds-dom0-stateless-0-vips-fw] - Slaves: [ s01-0 s01-1 ] + Slaves (target-role): [ s01-0 s01-1 ] Clone Set: cl-dlm [dlm] Started: [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-vds-tftpboot [drbd-vds-tftpboot] Masters: [ s01-0 s01-1 ] Clone Set: cl-vds-tftpboot-fs [vds-tftpboot-fs] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Clone Set: cl-gfs2 [gfs2] Started: [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-vds-http [drbd-vds-http] @@ -126,18 +127,18 @@ Online: [ s01-0 s01-1 ] vip-238 (ocf::heartbeat:IPaddr2): Started s01-1 Master/Slave Set: ms-drbd-pool-0 [drbd-pool-0] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-drbd-pool-1 [drbd-pool-1] Masters: [ s01-1 ] - Slaves: [ s01-0 ] + Slaves (target-role): [ s01-0 ] Master/Slave Set: ms-iscsi-pool-0-vips-fw [iscsi-pool-0-vips-fw] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-iscsi-pool-1-vips-fw [iscsi-pool-1-vips-fw] Masters: [ s01-1 ] - Slaves: [ s01-0 ] + Slaves (target-role): [ s01-0 ] Clone Set: cl-o2cb [o2cb] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-s01-service [drbd-s01-service] Masters: [ s01-0 s01-1 ] Clone Set: cl-s01-service-fs [s01-service-fs] @@ -145,10 +146,10 @@ Online: [ s01-0 s01-1 ] Clone Set: cl-ietd [ietd] Started: [ s01-0 s01-1 ] Clone Set: cl-dhcpd [dhcpd] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Resource Group: http-server vip-233 (ocf::heartbeat:IPaddr2): Started s01-0 - nginx (lsb:nginx): (target-role:Stopped) Stopped + nginx (lsb:nginx): Stopped ( disabled ) Master/Slave Set: ms-drbd-s01-logs [drbd-s01-logs] Masters: [ s01-0 s01-1 ] Clone Set: cl-s01-logs-fs [s01-logs-fs] @@ -166,22 +167,22 @@ Online: [ s01-0 s01-1 ] Clone Set: connected-outer [ping-bmc-and-switch] Started: [ s01-0 s01-1 ] Resource Group: iscsi-vds-dom0-stateless-0-target-all - iscsi-vds-dom0-stateless-0-target (ocf::vds-ok:iSCSITarget): (target-role:Stopped) Stopped - iscsi-vds-dom0-stateless-0-lun-1 (ocf::vds-ok:iSCSILogicalUnit): (target-role:Stopped) Stopped + iscsi-vds-dom0-stateless-0-target (ocf::vds-ok:iSCSITarget): Stopped ( disabled ) + iscsi-vds-dom0-stateless-0-lun-1 (ocf::vds-ok:iSCSILogicalUnit): Stopped ( disabled ) Resource Group: iscsi-vds-dom0-stateless-0-vips vip-227 (ocf::heartbeat:IPaddr2): Stopped vip-228 (ocf::heartbeat:IPaddr2): Stopped Master/Slave Set: ms-drbd-vds-dom0-stateless-0 [drbd-vds-dom0-stateless-0] Masters: [ s01-0 ] - Slaves: [ s01-1 ] + Slaves (target-role): [ s01-1 ] Master/Slave Set: ms-iscsi-vds-dom0-stateless-0-vips-fw [iscsi-vds-dom0-stateless-0-vips-fw] - Slaves: [ s01-0 s01-1 ] + Slaves (target-role): [ s01-0 s01-1 ] Clone Set: cl-dlm [dlm] Started: [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-vds-tftpboot [drbd-vds-tftpboot] Masters: [ s01-0 s01-1 ] Clone Set: cl-vds-tftpboot-fs [vds-tftpboot-fs] - Stopped: [ s01-0 s01-1 ] + Stopped (disabled): [ s01-0 s01-1 ] Clone Set: cl-gfs2 [gfs2] Started: [ s01-0 s01-1 ] Master/Slave Set: ms-drbd-vds-http [drbd-vds-http] diff --git a/pengine/test10/colocate-primitive-with-clone.exp b/pengine/test10/colocate-primitive-with-clone.exp index 8d8ffeaf4ca..45fb7196f3f 100644 --- a/pengine/test10/colocate-primitive-with-clone.exp +++ b/pengine/test10/colocate-primitive-with-clone.exp @@ -135,6 +135,9 @@ + + + diff --git a/pengine/test10/colocation_constraint_stops_master.summary b/pengine/test10/colocation_constraint_stops_master.summary index e0b69765fbd..f59737d263b 100644 --- a/pengine/test10/colocation_constraint_stops_master.summary +++ b/pengine/test10/colocation_constraint_stops_master.summary @@ -1,3 +1,4 @@ +2 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder fc16-builder2 ] diff --git a/pengine/test10/colocation_constraint_stops_slave.summary b/pengine/test10/colocation_constraint_stops_slave.summary index 1e5c0f12b49..878b83b4bb7 100644 --- a/pengine/test10/colocation_constraint_stops_slave.summary +++ b/pengine/test10/colocation_constraint_stops_slave.summary @@ -1,11 +1,12 @@ +2 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] - Slaves: [ fc16-builder ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + Slaves (target-role): [ fc16-builder ] + NATIVE_RSC_B (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) Transition Summary: * Stop NATIVE_RSC_A:0 (fc16-builder) @@ -29,5 +30,5 @@ OFFLINE: [ fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] Stopped: [ fc16-builder fc16-builder2 ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + NATIVE_RSC_B (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/complex_enforce_colo.summary b/pengine/test10/complex_enforce_colo.summary index 6f64364e2b2..dd838b26f04 100644 --- a/pengine/test10/complex_enforce_colo.summary +++ b/pengine/test10/complex_enforce_colo.summary @@ -1,3 +1,4 @@ +3 of 132 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ rhos6-node1 rhos6-node2 rhos6-node3 ] @@ -378,7 +379,7 @@ Online: [ rhos6-node1 rhos6-node2 rhos6-node3 ] Clone Set: mongodb-clone [mongodb] Started: [ rhos6-node1 rhos6-node2 rhos6-node3 ] Clone Set: keystone-clone [keystone] - Stopped: [ rhos6-node1 rhos6-node2 rhos6-node3 ] + Stopped (disabled): [ rhos6-node1 rhos6-node2 rhos6-node3 ] Clone Set: glance-fs-clone [glance-fs] Started: [ rhos6-node1 rhos6-node2 rhos6-node3 ] Clone Set: glance-registry-clone [glance-registry] diff --git a/pengine/test10/concurrent-fencing.dot b/pengine/test10/concurrent-fencing.dot new file mode 100644 index 00000000000..657fa6aea02 --- /dev/null +++ b/pengine/test10/concurrent-fencing.dot @@ -0,0 +1,13 @@ +digraph "g" { +"all_stopped" [ style=bold color="green" fontcolor="orange"] +"stonith 'reboot' node1" -> "stonith 'reboot' node2" [ style = bold] +"stonith 'reboot' node1" -> "stonith_complete" [ style = bold] +"stonith 'reboot' node1" [ style=bold color="green" fontcolor="black"] +"stonith 'reboot' node2" -> "stonith_complete" [ style = bold] +"stonith 'reboot' node2" [ style=bold color="green" fontcolor="black"] +"stonith 'reboot' node3" -> "stonith 'reboot' node2" [ style = bold] +"stonith 'reboot' node3" -> "stonith_complete" [ style = bold] +"stonith 'reboot' node3" [ style=bold color="green" fontcolor="black"] +"stonith_complete" -> "all_stopped" [ style = bold] +"stonith_complete" [ style=bold color="green" fontcolor="orange"] +} diff --git a/pengine/test10/concurrent-fencing.exp b/pengine/test10/concurrent-fencing.exp new file mode 100644 index 00000000000..354111ad5c7 --- /dev/null +++ b/pengine/test10/concurrent-fencing.exp @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/concurrent-fencing.scores b/pengine/test10/concurrent-fencing.scores new file mode 100644 index 00000000000..03222310437 --- /dev/null +++ b/pengine/test10/concurrent-fencing.scores @@ -0,0 +1,7 @@ +Allocation scores: +native_color: lsb_dummy allocation score on node1: 0 +native_color: lsb_dummy allocation score on node2: 0 +native_color: lsb_dummy allocation score on node3: 0 +native_color: stonith-1 allocation score on node1: 0 +native_color: stonith-1 allocation score on node2: 0 +native_color: stonith-1 allocation score on node3: 0 diff --git a/pengine/test10/concurrent-fencing.summary b/pengine/test10/concurrent-fencing.summary new file mode 100644 index 00000000000..10b2fdef20d --- /dev/null +++ b/pengine/test10/concurrent-fencing.summary @@ -0,0 +1,24 @@ + +Current cluster status: +Node node1 (uuid1): UNCLEAN (offline) +Node node2 (uuid2): UNCLEAN (offline) +Node node3 (uuid3): UNCLEAN (offline) + + stonith-1 (stonith:dummy): Stopped + lsb_dummy (lsb:/usr/lib/heartbeat/cts/LSBDummy): Stopped + +Transition Summary: + +Executing cluster transition: + * Fencing node3 (reboot) + * Fencing node1 (reboot) + * Fencing node2 (reboot) + * Pseudo action: stonith_complete + * Pseudo action: all_stopped + +Revised cluster status: +OFFLINE: [ node1 node2 node3 ] + + stonith-1 (stonith:dummy): Stopped + lsb_dummy (lsb:/usr/lib/heartbeat/cts/LSBDummy): Stopped + diff --git a/pengine/test10/concurrent-fencing.xml b/pengine/test10/concurrent-fencing.xml new file mode 100644 index 00000000000..e769425de22 --- /dev/null +++ b/pengine/test10/concurrent-fencing.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/container-is-remote-node.summary b/pengine/test10/container-is-remote-node.summary index 6693f1b6888..6ed05267af7 100644 --- a/pengine/test10/container-is-remote-node.summary +++ b/pengine/test10/container-is-remote-node.summary @@ -1,3 +1,4 @@ +3 of 19 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ lama2 lama3 ] @@ -15,7 +16,7 @@ Containers: [ RNVM1:VM1 ] Started: [ lama2 lama3 ] Stopped: [ RNVM1 ] Clone Set: gfs2-lv_1_2-clone [gfs2-lv_1_2] - Stopped: [ RNVM1 lama2 lama3 ] + Stopped (disabled): [ RNVM1 lama2 lama3 ] VM1 (ocf::heartbeat:VirtualDomain): Started lama2 Resource Group: RES1 FSdata1 (ocf::heartbeat:Filesystem): Started RNVM1 @@ -42,7 +43,7 @@ Containers: [ RNVM1:VM1 ] Started: [ lama2 lama3 ] Stopped: [ RNVM1 ] Clone Set: gfs2-lv_1_2-clone [gfs2-lv_1_2] - Stopped: [ RNVM1 lama2 lama3 ] + Stopped (disabled): [ RNVM1 lama2 lama3 ] VM1 (ocf::heartbeat:VirtualDomain): Started lama2 Resource Group: RES1 FSdata1 (ocf::heartbeat:Filesystem): Started RNVM1 diff --git a/pengine/test10/enforce-colo1.summary b/pengine/test10/enforce-colo1.summary index d8b16ed4a40..985907305c0 100644 --- a/pengine/test10/enforce-colo1.summary +++ b/pengine/test10/enforce-colo1.summary @@ -1,3 +1,4 @@ +3 of 6 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ rhel7-auto1 rhel7-auto2 rhel7-auto3 ] @@ -31,6 +32,6 @@ Online: [ rhel7-auto1 rhel7-auto2 rhel7-auto3 ] shooter (stonith:fence_xvm): Started rhel7-auto2 engine (ocf::heartbeat:Dummy): Stopped Clone Set: keystone-clone [keystone] - Stopped: [ rhel7-auto1 rhel7-auto2 rhel7-auto3 ] + Stopped (disabled): [ rhel7-auto1 rhel7-auto2 rhel7-auto3 ] central (ocf::heartbeat:Dummy): Stopped diff --git a/pengine/test10/expire-non-blocked-failure.summary b/pengine/test10/expire-non-blocked-failure.summary index 311c00776f5..8af917ca1ba 100644 --- a/pengine/test10/expire-non-blocked-failure.summary +++ b/pengine/test10/expire-non-blocked-failure.summary @@ -3,7 +3,7 @@ Current cluster status: Online: [ node1 node2 ] rsc_stonith (stonith:null): Started node1 - rsc1 (ocf::pacemaker:Dummy): FAILED node2 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node2 ( blocked ) rsc2 (ocf::pacemaker:Dummy): Started node1 Transition Summary: @@ -15,6 +15,6 @@ Revised cluster status: Online: [ node1 node2 ] rsc_stonith (stonith:null): Started node1 - rsc1 (ocf::pacemaker:Dummy): FAILED node2 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node2 ( blocked ) rsc2 (ocf::pacemaker:Dummy): Started node1 diff --git a/pengine/test10/failcount-block.summary b/pengine/test10/failcount-block.summary index edd91b2be5e..52956245704 100644 --- a/pengine/test10/failcount-block.summary +++ b/pengine/test10/failcount-block.summary @@ -4,7 +4,7 @@ Online: [ pcmk-1 ] OFFLINE: [ pcmk-4 ] rsc_pcmk-1 (ocf::heartbeat:IPaddr2): Started pcmk-1 - rsc_pcmk-2 (ocf::heartbeat:IPaddr2): FAILED pcmk-1 (unmanaged) + rsc_pcmk-2 (ocf::heartbeat:IPaddr2): FAILED pcmk-1 ( blocked ) rsc_pcmk-3 (ocf::heartbeat:IPaddr2): Stopped rsc_pcmk-4 (ocf::heartbeat:IPaddr2): Stopped rsc_pcmk-5 (ocf::heartbeat:IPaddr2): Started pcmk-1 @@ -28,7 +28,7 @@ Online: [ pcmk-1 ] OFFLINE: [ pcmk-4 ] rsc_pcmk-1 (ocf::heartbeat:IPaddr2): Started pcmk-1 - rsc_pcmk-2 (ocf::heartbeat:IPaddr2): FAILED pcmk-1 (unmanaged) + rsc_pcmk-2 (ocf::heartbeat:IPaddr2): FAILED pcmk-1 ( blocked ) rsc_pcmk-3 (ocf::heartbeat:IPaddr2): Started pcmk-1 rsc_pcmk-4 (ocf::heartbeat:IPaddr2): Started pcmk-1 rsc_pcmk-5 (ocf::heartbeat:IPaddr2): Started pcmk-1 diff --git a/pengine/test10/group11.summary b/pengine/test10/group11.summary index 768aa17ef87..9619e513e1a 100644 --- a/pengine/test10/group11.summary +++ b/pengine/test10/group11.summary @@ -1,10 +1,11 @@ +2 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 ] Resource Group: group1 rsc1 (heartbeat:apache): Started node1 - rsc2 (heartbeat:apache): (target-role:Stopped) Started node1 + rsc2 (heartbeat:apache): Started node1 ( disabled ) rsc3 (heartbeat:apache): Started node1 Transition Summary: @@ -24,6 +25,6 @@ Online: [ node1 ] Resource Group: group1 rsc1 (heartbeat:apache): Started node1 - rsc2 (heartbeat:apache): (target-role:Stopped) Stopped + rsc2 (heartbeat:apache): Stopped ( disabled ) rsc3 (heartbeat:apache): Stopped diff --git a/pengine/test10/inc12.exp b/pengine/test10/inc12.exp index 90509f12436..ac3bc394ed6 100644 --- a/pengine/test10/inc12.exp +++ b/pengine/test10/inc12.exp @@ -422,6 +422,9 @@ + + + @@ -443,6 +446,9 @@ + + + @@ -464,6 +470,9 @@ + + + @@ -488,6 +497,9 @@ + + + @@ -512,6 +524,9 @@ + + + @@ -536,6 +551,9 @@ + + + diff --git a/pengine/test10/interleave-pseudo-stop.exp b/pengine/test10/interleave-pseudo-stop.exp index f1aedfa44f3..8412fd80fa7 100644 --- a/pengine/test10/interleave-pseudo-stop.exp +++ b/pengine/test10/interleave-pseudo-stop.exp @@ -519,6 +519,9 @@ + + + diff --git a/pengine/test10/interleave-pseudo-stop.summary b/pengine/test10/interleave-pseudo-stop.summary index 613d0f3b0c6..a682462837c 100644 --- a/pengine/test10/interleave-pseudo-stop.summary +++ b/pengine/test10/interleave-pseudo-stop.summary @@ -75,7 +75,7 @@ OFFLINE: [ node1 ] Stopped: [ node1 ] Clone Set: imagestorecloneset [imagestoreclone] Started: [ node2 ] - Stopped: [ node1 ] + Stopped (disabled): [ node1 ] Clone Set: configstorecloneset [configstoreclone] Started: [ node2 ] Stopped: [ node1 ] diff --git a/pengine/test10/interleave-stop.summary b/pengine/test10/interleave-stop.summary index 14aa585a3a6..b5a1a98e19d 100644 --- a/pengine/test10/interleave-stop.summary +++ b/pengine/test10/interleave-stop.summary @@ -66,7 +66,7 @@ Online: [ node2 ] Stopped: [ node1 ] Clone Set: imagestorecloneset [imagestoreclone] Started: [ node2 ] - Stopped: [ node1 ] + Stopped (disabled): [ node1 ] Clone Set: configstorecloneset [configstoreclone] Started: [ node2 ] Stopped: [ node1 ] diff --git a/pengine/test10/load-stopped-loop-2.summary b/pengine/test10/load-stopped-loop-2.summary index 522b5686169..5da41e4f9c3 100644 --- a/pengine/test10/load-stopped-loop-2.summary +++ b/pengine/test10/load-stopped-loop-2.summary @@ -1,3 +1,4 @@ +4 of 25 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ xfc0 xfc1 xfc2 xfc3 ] @@ -12,10 +13,10 @@ Online: [ xfc0 xfc1 xfc2 xfc3 ] xu-test11 (ocf::heartbeat:Xen): Started xfc3 xu-test12 (ocf::heartbeat:Xen): Started xfc2 xu-test13 (ocf::heartbeat:Xen): Stopped - xu-test14 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test15 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test16 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test17 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + xu-test14 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test15 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test16 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test17 (ocf::heartbeat:Xen): Stopped ( disabled ) xu-test2 (ocf::heartbeat:Xen): Started xfc3 xu-test3 (ocf::heartbeat:Xen): Started xfc1 xu-test4 (ocf::heartbeat:Xen): Started xfc0 @@ -97,10 +98,10 @@ Online: [ xfc0 xfc1 xfc2 xfc3 ] xu-test11 (ocf::heartbeat:Xen): Started xfc3 xu-test12 (ocf::heartbeat:Xen): Started xfc3 xu-test13 (ocf::heartbeat:Xen): Started xfc3 - xu-test14 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test15 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test16 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped - xu-test17 (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + xu-test14 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test15 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test16 (ocf::heartbeat:Xen): Stopped ( disabled ) + xu-test17 (ocf::heartbeat:Xen): Stopped ( disabled ) xu-test2 (ocf::heartbeat:Xen): Started xfc1 xu-test3 (ocf::heartbeat:Xen): Started xfc0 xu-test4 (ocf::heartbeat:Xen): Started xfc2 diff --git a/pengine/test10/load-stopped-loop.exp b/pengine/test10/load-stopped-loop.exp index 8851e95f297..deac4916b42 100644 --- a/pengine/test10/load-stopped-loop.exp +++ b/pengine/test10/load-stopped-loop.exp @@ -3,7 +3,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -113,7 +113,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -203,20 +203,20 @@ - + - + - + @@ -225,20 +225,20 @@ - + - + - + @@ -247,42 +247,42 @@ - + - + - + - + - + - + - + @@ -295,20 +295,20 @@ - + - + - + @@ -317,42 +317,42 @@ - + - + - + - + - + - + - + @@ -379,7 +379,7 @@ - + @@ -391,7 +391,7 @@ - + @@ -403,16 +403,16 @@ - + - + - + - + diff --git a/pengine/test10/load-stopped-loop.summary b/pengine/test10/load-stopped-loop.summary index ffcae1f8d88..2ff5bae3a46 100644 --- a/pengine/test10/load-stopped-loop.summary +++ b/pengine/test10/load-stopped-loop.summary @@ -1,17 +1,18 @@ +32 of 308 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ mgmt01 v03-a v03-b ] - stonith-v02-a (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-b (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v02-a (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-b (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-c (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-d (stonith:fence_ipmilan): Stopped ( disabled ) stonith-mgmt01 (stonith:fence_xvm): Started v03-b stonith-mgmt02 (stonith:meatware): Started mgmt01 - stonith-v03-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-c (stonith:fence_ipmilan): Stopped ( disabled ) stonith-v03-a (stonith:fence_ipmilan): Started v03-b stonith-v03-b (stonith:fence_ipmilan): Started v03-a - stonith-v03-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-d (stonith:fence_ipmilan): Stopped ( disabled ) Clone Set: cl-clvmd [clvmd] Started: [ mgmt01 v03-a v03-b ] Clone Set: cl-dlm [dlm] @@ -77,42 +78,42 @@ Online: [ mgmt01 v03-a v03-b ] Clone Set: cl-vds-ok-pool-1-pool [vds-ok-pool-1-pool] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) vd01-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b vd01-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped - vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) f13-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-vlan200-if [vlan200-if] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] lenny-x32-devel-vm (ocf::vds-ok:VirtualDomain): Started v03-a - dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gotin-bbb-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - maxb-c55-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - metae.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gotin-bbb-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + maxb-c55-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + metae.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) c5-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b Clone Set: cl-mcast-test-net [mcast-test-net] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) ktstudio.net-vm (ocf::vds-ok:VirtualDomain): Started v03-a cloudsrv.credo-dialogue.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b c6-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a @@ -127,15 +128,15 @@ Online: [ mgmt01 v03-a v03-b ] Stopped: [ mgmt01 ] gw.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b license.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - terminal.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + terminal.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) lustre01-left.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a lustre02-left.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b test-01.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a Clone Set: cl-libvirt-qpid [libvirt-qpid] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - gw.gleb.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gw.gotin.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + gw.gleb.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gw.gotin.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) terminal0.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a Clone Set: cl-mcast-gleb-net [mcast-gleb-net] Started: [ v03-a v03-b ] @@ -193,16 +194,16 @@ Executing cluster transition: Revised cluster status: Online: [ mgmt01 v03-a v03-b ] - stonith-v02-a (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-b (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v02-a (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-b (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-c (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-d (stonith:fence_ipmilan): Stopped ( disabled ) stonith-mgmt01 (stonith:fence_xvm): Started v03-b stonith-mgmt02 (stonith:meatware): Started mgmt01 - stonith-v03-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-c (stonith:fence_ipmilan): Stopped ( disabled ) stonith-v03-a (stonith:fence_ipmilan): Started v03-b stonith-v03-b (stonith:fence_ipmilan): Started v03-a - stonith-v03-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-d (stonith:fence_ipmilan): Stopped ( disabled ) Clone Set: cl-clvmd [clvmd] Started: [ mgmt01 v03-a v03-b ] Clone Set: cl-dlm [dlm] @@ -268,42 +269,42 @@ Online: [ mgmt01 v03-a v03-b ] Clone Set: cl-vds-ok-pool-1-pool [vds-ok-pool-1-pool] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) vd01-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b vd01-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a - vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) f13-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-vlan200-if [vlan200-if] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] lenny-x32-devel-vm (ocf::vds-ok:VirtualDomain): Started v03-a - dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gotin-bbb-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - maxb-c55-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - metae.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gotin-bbb-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + maxb-c55-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + metae.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) c5-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b Clone Set: cl-mcast-test-net [mcast-test-net] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) ktstudio.net-vm (ocf::vds-ok:VirtualDomain): Started v03-a cloudsrv.credo-dialogue.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b c6-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a @@ -318,15 +319,15 @@ Online: [ mgmt01 v03-a v03-b ] Stopped: [ mgmt01 ] gw.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b license.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a - terminal.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + terminal.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) lustre01-left.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a lustre02-left.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b test-01.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a Clone Set: cl-libvirt-qpid [libvirt-qpid] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - gw.gleb.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gw.gotin.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + gw.gleb.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gw.gotin.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) terminal0.anbriz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b Clone Set: cl-mcast-gleb-net [mcast-gleb-net] Started: [ v03-a v03-b ] diff --git a/pengine/test10/master-13.summary b/pengine/test10/master-13.summary index 1488a48fc4d..304f19cfc2d 100644 --- a/pengine/test10/master-13.summary +++ b/pengine/test10/master-13.summary @@ -1,10 +1,11 @@ +3 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ frigg odin ] Master/Slave Set: ms_drbd [drbd0] Masters: [ frigg ] - Slaves: [ odin ] + Slaves (target-role): [ odin ] Resource Group: group IPaddr0 (ocf::heartbeat:IPaddr): Stopped MailTo (ocf::heartbeat:MailTo): Stopped @@ -53,7 +54,7 @@ Online: [ frigg odin ] Master/Slave Set: ms_drbd [drbd0] Masters: [ odin ] - Slaves: [ frigg ] + Slaves (target-role): [ frigg ] Resource Group: group IPaddr0 (ocf::heartbeat:IPaddr): Started odin MailTo (ocf::heartbeat:MailTo): Started odin diff --git a/pengine/test10/master-7.exp b/pengine/test10/master-7.exp index 0b67d79d052..4ea225c188d 100644 --- a/pengine/test10/master-7.exp +++ b/pengine/test10/master-7.exp @@ -610,6 +610,9 @@ + + + diff --git a/pengine/test10/master-8.exp b/pengine/test10/master-8.exp index bec621e9d03..a233346a76e 100644 --- a/pengine/test10/master-8.exp +++ b/pengine/test10/master-8.exp @@ -687,6 +687,9 @@ + + + diff --git a/pengine/test10/master-9.exp b/pengine/test10/master-9.exp index 980d073ca08..d298e66857c 100644 --- a/pengine/test10/master-9.exp +++ b/pengine/test10/master-9.exp @@ -195,6 +195,9 @@ + + + diff --git a/pengine/test10/master-asymmetrical-order.summary b/pengine/test10/master-asymmetrical-order.summary index d2be383f384..1ff2836e1e5 100644 --- a/pengine/test10/master-asymmetrical-order.summary +++ b/pengine/test10/master-asymmetrical-order.summary @@ -1,3 +1,4 @@ +2 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] @@ -27,7 +28,7 @@ Revised cluster status: Online: [ node1 node2 ] Master/Slave Set: ms1 [rsc1] - Stopped: [ node1 node2 ] + Stopped (disabled): [ node1 node2 ] Master/Slave Set: ms2 [rsc2] Masters: [ node2 ] Slaves: [ node1 ] diff --git a/pengine/test10/master-colocation.summary b/pengine/test10/master-colocation.summary index c5d708bc276..324cf40f43b 100644 --- a/pengine/test10/master-colocation.summary +++ b/pengine/test10/master-colocation.summary @@ -1,9 +1,10 @@ +2 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ box1 box2 ] Master/Slave Set: ms-conntrackd [conntrackd-stateful] - Slaves: [ box1 box2 ] + Slaves (target-role): [ box1 box2 ] Resource Group: virtualips externalip (ocf::heartbeat:IPaddr2): Started box2 internalip (ocf::heartbeat:IPaddr2): Started box2 @@ -24,7 +25,7 @@ Online: [ box1 box2 ] Master/Slave Set: ms-conntrackd [conntrackd-stateful] Masters: [ box2 ] - Slaves: [ box1 ] + Slaves (target-role): [ box1 ] Resource Group: virtualips externalip (ocf::heartbeat:IPaddr2): Started box2 internalip (ocf::heartbeat:IPaddr2): Started box2 diff --git a/pengine/test10/master-demote-block.summary b/pengine/test10/master-demote-block.summary index a35923feb26..611b36c0d26 100644 --- a/pengine/test10/master-demote-block.summary +++ b/pengine/test10/master-demote-block.summary @@ -4,7 +4,7 @@ Node dl380g5c (21c624bd-c426-43dc-9665-bbfb92054bcd): standby Online: [ dl380g5d ] Master/Slave Set: stateful [dummy] - dummy (ocf::pacemaker:Stateful): FAILED Master dl380g5c (unmanaged) + dummy (ocf::pacemaker:Stateful): FAILED Master dl380g5c ( blocked ) Slaves: [ dl380g5d ] Transition Summary: @@ -17,6 +17,6 @@ Node dl380g5c (21c624bd-c426-43dc-9665-bbfb92054bcd): standby Online: [ dl380g5d ] Master/Slave Set: stateful [dummy] - dummy (ocf::pacemaker:Stateful): FAILED Master dl380g5c (unmanaged) + dummy (ocf::pacemaker:Stateful): FAILED Master dl380g5c ( blocked ) Slaves: [ dl380g5d ] diff --git a/pengine/test10/master-depend.summary b/pengine/test10/master-depend.summary index 51aa8e51771..51bb3ebfa80 100644 --- a/pengine/test10/master-depend.summary +++ b/pengine/test10/master-depend.summary @@ -1,3 +1,4 @@ +5 of 10 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ vbox4 ] @@ -10,9 +11,9 @@ OFFLINE: [ vbox3 ] Clone Set: clvmd_clone [clvmd] Stopped: [ vbox3 vbox4 ] vmnci36 (ocf::heartbeat:vm): Stopped - vmnci37 (ocf::heartbeat:vm): (target-role:stopped) Stopped - vmnci38 (ocf::heartbeat:vm): (target-role:stopped) Stopped - vmnci55 (ocf::heartbeat:vm): (target-role:stopped) Stopped + vmnci37 (ocf::heartbeat:vm): Stopped ( disabled ) + vmnci38 (ocf::heartbeat:vm): Stopped ( disabled ) + vmnci55 (ocf::heartbeat:vm): Stopped ( disabled ) Transition Summary: * Start drbd0:0 (vbox4) @@ -44,7 +45,7 @@ Online: [ vbox4 ] OFFLINE: [ vbox3 ] Master/Slave Set: drbd [drbd0] - Slaves: [ vbox4 ] + Slaves (target-role): [ vbox4 ] Stopped: [ vbox3 ] Clone Set: cman_clone [cman] Started: [ vbox4 ] @@ -52,7 +53,7 @@ OFFLINE: [ vbox3 ] Clone Set: clvmd_clone [clvmd] Stopped: [ vbox3 vbox4 ] vmnci36 (ocf::heartbeat:vm): Stopped - vmnci37 (ocf::heartbeat:vm): (target-role:stopped) Stopped - vmnci38 (ocf::heartbeat:vm): (target-role:stopped) Stopped - vmnci55 (ocf::heartbeat:vm): (target-role:stopped) Stopped + vmnci37 (ocf::heartbeat:vm): Stopped ( disabled ) + vmnci38 (ocf::heartbeat:vm): Stopped ( disabled ) + vmnci55 (ocf::heartbeat:vm): Stopped ( disabled ) diff --git a/pengine/test10/master-ordering.summary b/pengine/test10/master-ordering.summary index c8e40943d1e..47db1e62441 100644 --- a/pengine/test10/master-ordering.summary +++ b/pengine/test10/master-ordering.summary @@ -1,3 +1,4 @@ +4 of 17 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ webcluster01 ] @@ -80,7 +81,7 @@ OFFLINE: [ webcluster02 ] intip_1_master (ocf::heartbeat:IPaddr2): Started webcluster01 intip_2_slave (ocf::heartbeat:IPaddr2): Started webcluster01 Master/Slave Set: ms_drbd_www [drbd_www] - Slaves: [ webcluster01 ] + Slaves (target-role): [ webcluster01 ] Stopped: [ webcluster02 ] Clone Set: clone_ocfs2_www [ocfs2_www] (unique) ocfs2_www:0 (ocf::heartbeat:Filesystem): Stopped @@ -88,7 +89,7 @@ OFFLINE: [ webcluster02 ] Clone Set: clone_webservice [group_webservice] Stopped: [ webcluster01 webcluster02 ] Master/Slave Set: ms_drbd_mysql [drbd_mysql] - Slaves: [ webcluster01 ] + Slaves (target-role): [ webcluster01 ] Stopped: [ webcluster02 ] fs_mysql (ocf::heartbeat:Filesystem): Stopped diff --git a/pengine/test10/master-partially-demoted-group.summary b/pengine/test10/master-partially-demoted-group.summary index 0bda6050d09..150f7672932 100644 --- a/pengine/test10/master-partially-demoted-group.summary +++ b/pengine/test10/master-partially-demoted-group.summary @@ -1,3 +1,4 @@ +10 of 16 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ sd01-0 sd01-1 ] @@ -9,7 +10,7 @@ Online: [ sd01-0 sd01-1 ] cdev-pool-0-iscsi-lun-1 (ocf::vds-ok:iSCSILogicalUnit): Started sd01-1 Master/Slave Set: ms-cdev-pool-0-drbd [cdev-pool-0-drbd] Masters: [ sd01-1 ] - Slaves: [ sd01-0 ] + Slaves (target-role): [ sd01-0 ] Clone Set: cl-ietd [ietd] Started: [ sd01-0 sd01-1 ] Clone Set: cl-vlan1-net [vlan1-net] @@ -19,7 +20,7 @@ Online: [ sd01-0 sd01-1 ] vip-165 (ocf::heartbeat:IPaddr2): Started sd01-1 Master/Slave Set: ms-cdev-pool-0-iscsi-vips-fw [cdev-pool-0-iscsi-vips-fw] Masters: [ sd01-1 ] - Slaves: [ sd01-0 ] + Slaves (target-role): [ sd01-0 ] Transition Summary: * Move vip-164 (Started sd01-1 -> sd01-0) @@ -103,7 +104,7 @@ Online: [ sd01-0 sd01-1 ] cdev-pool-0-iscsi-lun-1 (ocf::vds-ok:iSCSILogicalUnit): Started sd01-0 Master/Slave Set: ms-cdev-pool-0-drbd [cdev-pool-0-drbd] Masters: [ sd01-0 ] - Slaves: [ sd01-1 ] + Slaves (target-role): [ sd01-1 ] Clone Set: cl-ietd [ietd] Started: [ sd01-0 sd01-1 ] Clone Set: cl-vlan1-net [vlan1-net] @@ -113,5 +114,5 @@ Online: [ sd01-0 sd01-1 ] vip-165 (ocf::heartbeat:IPaddr2): Started sd01-0 Master/Slave Set: ms-cdev-pool-0-iscsi-vips-fw [cdev-pool-0-iscsi-vips-fw] Masters: [ sd01-0 ] - Slaves: [ sd01-1 ] + Slaves (target-role): [ sd01-1 ] diff --git a/pengine/test10/master-probed-score.summary b/pengine/test10/master-probed-score.summary index f1518d953e6..e7f2ba37fbe 100644 --- a/pengine/test10/master-probed-score.summary +++ b/pengine/test10/master-probed-score.summary @@ -1,3 +1,4 @@ +2 of 60 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hypatia-corosync.nevis.columbia.edu orestes-corosync.nevis.columbia.edu ] @@ -11,7 +12,7 @@ Online: [ hypatia-corosync.nevis.columbia.edu orestes-corosync.nevis.columbia.ed SymlinkDhcpdConf (ocf::heartbeat:symlink): Stopped SymlinkSysconfigDhcpd (ocf::heartbeat:symlink): Stopped SymlinkDhcpdLeases (ocf::heartbeat:symlink): Stopped - Dhcpd (lsb:dhcpd): (target-role:stopped) Stopped + Dhcpd (lsb:dhcpd): Stopped ( disabled ) DhcpIP (ocf::heartbeat:IPaddr2): Stopped Clone Set: CupsClone [CupsGroup] Stopped: [ hypatia-corosync.nevis.columbia.edu orestes-corosync.nevis.columbia.edu ] @@ -301,7 +302,7 @@ Online: [ hypatia-corosync.nevis.columbia.edu orestes-corosync.nevis.columbia.ed SymlinkDhcpdConf (ocf::heartbeat:symlink): Started orestes-corosync.nevis.columbia.edu SymlinkSysconfigDhcpd (ocf::heartbeat:symlink): Started orestes-corosync.nevis.columbia.edu SymlinkDhcpdLeases (ocf::heartbeat:symlink): Started orestes-corosync.nevis.columbia.edu - Dhcpd (lsb:dhcpd): (target-role:stopped) Stopped + Dhcpd (lsb:dhcpd): Stopped ( disabled ) DhcpIP (ocf::heartbeat:IPaddr2): Stopped Clone Set: CupsClone [CupsGroup] Started: [ hypatia-corosync.nevis.columbia.edu orestes-corosync.nevis.columbia.edu ] diff --git a/pengine/test10/master-promotion-constraint.summary b/pengine/test10/master-promotion-constraint.summary index 68b237cd881..80b2505af2b 100644 --- a/pengine/test10/master-promotion-constraint.summary +++ b/pengine/test10/master-promotion-constraint.summary @@ -1,11 +1,12 @@ +4 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-13 hex-14 ] fencing-sbd (stonith:external/sbd): Started hex-13 Resource Group: g0 - d0 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - d1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + d0 (ocf::pacemaker:Dummy): Stopped ( disabled ) + d1 (ocf::pacemaker:Dummy): Stopped ( disabled ) Master/Slave Set: ms0 [s0] Masters: [ hex-14 ] Slaves: [ hex-13 ] @@ -25,8 +26,8 @@ Online: [ hex-13 hex-14 ] fencing-sbd (stonith:external/sbd): Started hex-13 Resource Group: g0 - d0 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - d1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + d0 (ocf::pacemaker:Dummy): Stopped ( disabled ) + d1 (ocf::pacemaker:Dummy): Stopped ( disabled ) Master/Slave Set: ms0 [s0] Slaves: [ hex-13 hex-14 ] diff --git a/pengine/test10/master-reattach.summary b/pengine/test10/master-reattach.summary index 2e7f492abad..b2caa4303e4 100644 --- a/pengine/test10/master-reattach.summary +++ b/pengine/test10/master-reattach.summary @@ -1,10 +1,11 @@ +2 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ dktest1 dktest2 ] Master/Slave Set: ms-drbd1 [drbd1] (unmanaged) - drbd1 (ocf::heartbeat:drbd): Master dktest1 (unmanaged) - drbd1 (ocf::heartbeat:drbd): Slave dktest2 (unmanaged) + drbd1 (ocf::heartbeat:drbd): Master dktest1 ( target-role:started, unmanaged ) + drbd1 (ocf::heartbeat:drbd): Slave dktest2 ( target-role:started, unmanaged ) Resource Group: apache apache-vip (ocf::heartbeat:IPaddr2): Started dktest1 (unmanaged) mount (ocf::heartbeat:Filesystem): Started dktest1 (unmanaged) @@ -23,8 +24,8 @@ Revised cluster status: Online: [ dktest1 dktest2 ] Master/Slave Set: ms-drbd1 [drbd1] (unmanaged) - drbd1 (ocf::heartbeat:drbd): Master dktest1 (unmanaged) - drbd1 (ocf::heartbeat:drbd): Slave dktest2 (unmanaged) + drbd1 (ocf::heartbeat:drbd): Master dktest1 ( target-role:started, unmanaged ) + drbd1 (ocf::heartbeat:drbd): Slave dktest2 ( target-role:started, unmanaged ) Resource Group: apache apache-vip (ocf::heartbeat:IPaddr2): Started dktest1 (unmanaged) mount (ocf::heartbeat:Filesystem): Started dktest1 (unmanaged) diff --git a/pengine/test10/migrate-fencing.exp b/pengine/test10/migrate-fencing.exp index 706277790f5..9c82f6b8dec 100644 --- a/pengine/test10/migrate-fencing.exp +++ b/pengine/test10/migrate-fencing.exp @@ -631,6 +631,9 @@ + + + diff --git a/pengine/test10/migrate-partial-4.summary b/pengine/test10/migrate-partial-4.summary index c3f70122125..382d8c3b925 100644 --- a/pengine/test10/migrate-partial-4.summary +++ b/pengine/test10/migrate-partial-4.summary @@ -1,3 +1,4 @@ +17 of 36 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ lustre01-left lustre02-left lustre03-left lustre04-left ] @@ -101,7 +102,7 @@ Online: [ lustre01-left lustre02-left lustre03-left lustre04-left ] ip-booth (ocf::heartbeat:IPaddr2): Started lustre02-left boothd (ocf::pacemaker:booth-site): Started lustre02-left Master/Slave Set: ms-drbd-mgs [drbd-mgs] - Slaves: [ lustre01-left lustre02-left ] + Slaves (target-role): [ lustre01-left lustre02-left ] Master/Slave Set: ms-drbd-testfs-mdt0000 [drbd-testfs-mdt0000] Stopped: [ lustre01-left lustre02-left lustre03-left lustre04-left ] Master/Slave Set: ms-drbd-testfs-mdt0000-left [drbd-testfs-mdt0000-left] diff --git a/pengine/test10/migrate-shutdown.exp b/pengine/test10/migrate-shutdown.exp index 9803dff21d8..a3578ef6d08 100644 --- a/pengine/test10/migrate-shutdown.exp +++ b/pengine/test10/migrate-shutdown.exp @@ -327,6 +327,9 @@ + + + @@ -345,6 +348,9 @@ + + + @@ -357,6 +363,9 @@ + + + @@ -387,6 +396,9 @@ + + + diff --git a/pengine/test10/multiple-active-block-group.summary b/pengine/test10/multiple-active-block-group.summary index 354bcafd253..1ded99eaa79 100644 --- a/pengine/test10/multiple-active-block-group.summary +++ b/pengine/test10/multiple-active-block-group.summary @@ -4,9 +4,9 @@ Online: [ node2 node3 ] st-sbd (stonith:external/sbd): Started node2 Resource Group: dgroup - dummy (ocf::heartbeat:DummyTimeout): FAILED (unmanaged)[ node2 node3 ] - dummy2 (ocf::heartbeat:Dummy): Started node2 (unmanaged) - dummy3 (ocf::heartbeat:Dummy): Started node2 (unmanaged) + dummy (ocf::heartbeat:DummyTimeout): FAILED ( blocked ) [ node2 node3 ] + dummy2 (ocf::heartbeat:Dummy): Started node2 ( blocked ) + dummy3 (ocf::heartbeat:Dummy): Started node2 ( blocked ) Transition Summary: @@ -17,7 +17,7 @@ Online: [ node2 node3 ] st-sbd (stonith:external/sbd): Started node2 Resource Group: dgroup - dummy (ocf::heartbeat:DummyTimeout): FAILED (unmanaged)[ node2 node3 ] - dummy2 (ocf::heartbeat:Dummy): Started node2 (unmanaged) - dummy3 (ocf::heartbeat:Dummy): Started node2 (unmanaged) + dummy (ocf::heartbeat:DummyTimeout): FAILED ( blocked ) [ node2 node3 ] + dummy2 (ocf::heartbeat:Dummy): Started node2 ( blocked ) + dummy3 (ocf::heartbeat:Dummy): Started node2 ( blocked ) diff --git a/pengine/test10/multiple-monitor-one-failed.dot b/pengine/test10/multiple-monitor-one-failed.dot new file mode 100644 index 00000000000..e4eb8fd0c47 --- /dev/null +++ b/pengine/test10/multiple-monitor-one-failed.dot @@ -0,0 +1,11 @@ +digraph "g" { +"Dummy-test2_monitor_10000 dhcp180" [ style=bold color="green" fontcolor="black"] +"Dummy-test2_monitor_30000 dhcp180" [ style=bold color="green" fontcolor="black"] +"Dummy-test2_start_0 dhcp180" -> "Dummy-test2_monitor_10000 dhcp180" [ style = bold] +"Dummy-test2_start_0 dhcp180" -> "Dummy-test2_monitor_30000 dhcp180" [ style = bold] +"Dummy-test2_start_0 dhcp180" [ style=bold color="green" fontcolor="black"] +"Dummy-test2_stop_0 dhcp180" -> "Dummy-test2_start_0 dhcp180" [ style = bold] +"Dummy-test2_stop_0 dhcp180" -> "all_stopped" [ style = bold] +"Dummy-test2_stop_0 dhcp180" [ style=bold color="green" fontcolor="black"] +"all_stopped" [ style=bold color="green" fontcolor="orange"] +} diff --git a/pengine/test10/multiple-monitor-one-failed.exp b/pengine/test10/multiple-monitor-one-failed.exp new file mode 100644 index 00000000000..2f0ff238dae --- /dev/null +++ b/pengine/test10/multiple-monitor-one-failed.exp @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/multiple-monitor-one-failed.scores b/pengine/test10/multiple-monitor-one-failed.scores new file mode 100644 index 00000000000..5e83394e8aa --- /dev/null +++ b/pengine/test10/multiple-monitor-one-failed.scores @@ -0,0 +1,3 @@ +Allocation scores: +native_color: Dummy-test2 allocation score on dhcp180: 0 +native_color: Dummy-test2 allocation score on dhcp69: 0 diff --git a/pengine/test10/multiple-monitor-one-failed.summary b/pengine/test10/multiple-monitor-one-failed.summary new file mode 100644 index 00000000000..b10abbe784e --- /dev/null +++ b/pengine/test10/multiple-monitor-one-failed.summary @@ -0,0 +1,21 @@ + +Current cluster status: +Online: [ dhcp180 dhcp69 ] + + Dummy-test2 (ocf::test:Dummy): FAILED dhcp180 + +Transition Summary: + * Recover Dummy-test2 (Started dhcp180) + +Executing cluster transition: + * Resource action: Dummy-test2 stop on dhcp180 + * Pseudo action: all_stopped + * Resource action: Dummy-test2 start on dhcp180 + * Resource action: Dummy-test2 monitor=30000 on dhcp180 + * Resource action: Dummy-test2 monitor=10000 on dhcp180 + +Revised cluster status: +Online: [ dhcp180 dhcp69 ] + + Dummy-test2 (ocf::test:Dummy): Started dhcp180 + diff --git a/pengine/test10/multiple-monitor-one-failed.xml b/pengine/test10/multiple-monitor-one-failed.xml new file mode 100644 index 00000000000..d1104586d3d --- /dev/null +++ b/pengine/test10/multiple-monitor-one-failed.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/not-reschedule-unneeded-monitor.summary b/pengine/test10/not-reschedule-unneeded-monitor.summary index 24a8279fd7d..2a872d55986 100644 --- a/pengine/test10/not-reschedule-unneeded-monitor.summary +++ b/pengine/test10/not-reschedule-unneeded-monitor.summary @@ -1,3 +1,4 @@ +1 of 11 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ castor kimball ] @@ -7,7 +8,7 @@ Online: [ castor kimball ] Started: [ castor kimball ] Clone Set: c-vm-fs [vm1] Started: [ castor kimball ] - xen-f (ocf::heartbeat:VirtualDomain): (target-role:Stopped) Stopped + xen-f (ocf::heartbeat:VirtualDomain): Stopped ( disabled ) sle12-kvm (ocf::heartbeat:VirtualDomain): FAILED castor Clone Set: cl_sgdisk [sgdisk] Started: [ castor kimball ] @@ -29,7 +30,7 @@ Online: [ castor kimball ] Started: [ castor kimball ] Clone Set: c-vm-fs [vm1] Started: [ castor kimball ] - xen-f (ocf::heartbeat:VirtualDomain): (target-role:Stopped) Stopped + xen-f (ocf::heartbeat:VirtualDomain): Stopped ( disabled ) sle12-kvm (ocf::heartbeat:VirtualDomain): Started kimball Clone Set: cl_sgdisk [sgdisk] Started: [ castor kimball ] diff --git a/pengine/test10/novell-239082.exp b/pengine/test10/novell-239082.exp index 86e3540ac6e..4cf1b06dcd3 100644 --- a/pengine/test10/novell-239082.exp +++ b/pengine/test10/novell-239082.exp @@ -456,6 +456,9 @@ + + + diff --git a/pengine/test10/novell-251689.summary b/pengine/test10/novell-251689.summary index 47ad222f83f..8d69588dca7 100644 --- a/pengine/test10/novell-251689.summary +++ b/pengine/test10/novell-251689.summary @@ -1,3 +1,4 @@ +1 of 11 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] @@ -12,7 +13,7 @@ Online: [ node1 node2 ] Started: [ node1 node2 ] Clone Set: configstorecloneset [configstoreclone] Started: [ node1 node2 ] - sles10 (ocf::heartbeat:Xen): (target-role:stopped) Started node2 + sles10 (ocf::heartbeat:Xen): Started node2 ( disabled ) Transition Summary: * Stop sles10 (node2) @@ -34,5 +35,5 @@ Online: [ node1 node2 ] Started: [ node1 node2 ] Clone Set: configstorecloneset [configstoreclone] Started: [ node1 node2 ] - sles10 (ocf::heartbeat:Xen): (target-role:stopped) Stopped + sles10 (ocf::heartbeat:Xen): Stopped ( disabled ) diff --git a/pengine/test10/novell-252693.exp b/pengine/test10/novell-252693.exp index 3074522e051..d9af5c08462 100644 --- a/pengine/test10/novell-252693.exp +++ b/pengine/test10/novell-252693.exp @@ -553,6 +553,9 @@ + + + diff --git a/pengine/test10/one-or-more-1.summary b/pengine/test10/one-or-more-1.summary index f4e5f81d0b3..f26919c5f8b 100644 --- a/pengine/test10/one-or-more-1.summary +++ b/pengine/test10/one-or-more-1.summary @@ -1,9 +1,10 @@ +1 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] - A (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + A (ocf::pacemaker:Dummy): Stopped ( disabled ) B (ocf::pacemaker:Dummy): Stopped C (ocf::pacemaker:Dummy): Stopped D (ocf::pacemaker:Dummy): Stopped @@ -23,7 +24,7 @@ Revised cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] - A (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + A (ocf::pacemaker:Dummy): Stopped ( disabled ) B (ocf::pacemaker:Dummy): Stopped C (ocf::pacemaker:Dummy): Stopped D (ocf::pacemaker:Dummy): Stopped diff --git a/pengine/test10/one-or-more-2.summary b/pengine/test10/one-or-more-2.summary index 5a9e7d50f35..27fb13a2f9e 100644 --- a/pengine/test10/one-or-more-2.summary +++ b/pengine/test10/one-or-more-2.summary @@ -1,10 +1,11 @@ +1 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped - B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + B (ocf::pacemaker:Dummy): Stopped ( disabled ) C (ocf::pacemaker:Dummy): Stopped D (ocf::pacemaker:Dummy): Stopped @@ -28,7 +29,7 @@ Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder - B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + B (ocf::pacemaker:Dummy): Stopped ( disabled ) C (ocf::pacemaker:Dummy): Started fc16-builder D (ocf::pacemaker:Dummy): Started fc16-builder diff --git a/pengine/test10/one-or-more-3.summary b/pengine/test10/one-or-more-3.summary index 541388f1031..f0ee0841090 100644 --- a/pengine/test10/one-or-more-3.summary +++ b/pengine/test10/one-or-more-3.summary @@ -1,11 +1,12 @@ +2 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped - B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + B (ocf::pacemaker:Dummy): Stopped ( disabled ) + C (ocf::pacemaker:Dummy): Stopped ( disabled ) D (ocf::pacemaker:Dummy): Stopped Transition Summary: @@ -24,7 +25,7 @@ Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder - B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + B (ocf::pacemaker:Dummy): Stopped ( disabled ) + C (ocf::pacemaker:Dummy): Stopped ( disabled ) D (ocf::pacemaker:Dummy): Stopped diff --git a/pengine/test10/one-or-more-4.summary b/pengine/test10/one-or-more-4.summary index 4fff13b62ab..9f84ba0483f 100644 --- a/pengine/test10/one-or-more-4.summary +++ b/pengine/test10/one-or-more-4.summary @@ -1,3 +1,4 @@ +1 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -6,7 +7,7 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped B (ocf::pacemaker:Dummy): Stopped C (ocf::pacemaker:Dummy): Stopped - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + D (ocf::pacemaker:Dummy): Stopped ( disabled ) Transition Summary: * Start A (fc16-builder) @@ -30,5 +31,5 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder C (ocf::pacemaker:Dummy): Started fc16-builder - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + D (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/one-or-more-5.summary b/pengine/test10/one-or-more-5.summary index 050128bbf8f..59f76579a05 100644 --- a/pengine/test10/one-or-more-5.summary +++ b/pengine/test10/one-or-more-5.summary @@ -1,3 +1,4 @@ +2 of 6 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -5,8 +6,8 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped B (ocf::pacemaker:Dummy): Stopped - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) + D (ocf::pacemaker:Dummy): Stopped ( disabled ) E (ocf::pacemaker:Dummy): Stopped F (ocf::pacemaker:Dummy): Stopped @@ -36,8 +37,8 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) + D (ocf::pacemaker:Dummy): Stopped ( disabled ) E (ocf::pacemaker:Dummy): Started fc16-builder F (ocf::pacemaker:Dummy): Started fc16-builder diff --git a/pengine/test10/one-or-more-6.summary b/pengine/test10/one-or-more-6.summary index dfdc8c0af24..18cab2e13a2 100644 --- a/pengine/test10/one-or-more-6.summary +++ b/pengine/test10/one-or-more-6.summary @@ -1,10 +1,11 @@ +1 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder - B (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + B (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) C (ocf::pacemaker:Dummy): Started fc16-builder Transition Summary: @@ -19,6 +20,6 @@ Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder - B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + B (ocf::pacemaker:Dummy): Stopped ( disabled ) C (ocf::pacemaker:Dummy): Started fc16-builder diff --git a/pengine/test10/one-or-more-7.summary b/pengine/test10/one-or-more-7.summary index b980cc1f887..4322db36c2a 100644 --- a/pengine/test10/one-or-more-7.summary +++ b/pengine/test10/one-or-more-7.summary @@ -1,3 +1,4 @@ +1 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -5,7 +6,7 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + C (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) Transition Summary: * Stop C (fc16-builder) @@ -20,5 +21,5 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Started fc16-builder B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/order-clone.summary b/pengine/test10/order-clone.summary index cb61fb045fe..f231edb04c0 100644 --- a/pengine/test10/order-clone.summary +++ b/pengine/test10/order-clone.summary @@ -1,3 +1,4 @@ +4 of 25 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-0 hex-7 hex-8 hex-9 ] @@ -12,7 +13,7 @@ Online: [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: fs1-clone [ocfs2-1] Stopped: [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: dlm-clone [dlm] - Stopped: [ hex-0 hex-7 hex-8 hex-9 ] + Stopped (disabled): [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: clvm-clone [clvm] Stopped: [ hex-0 hex-7 hex-8 hex-9 ] @@ -35,7 +36,7 @@ Online: [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: fs1-clone [ocfs2-1] Stopped: [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: dlm-clone [dlm] - Stopped: [ hex-0 hex-7 hex-8 hex-9 ] + Stopped (disabled): [ hex-0 hex-7 hex-8 hex-9 ] Clone Set: clvm-clone [clvm] Stopped: [ hex-0 hex-7 hex-8 hex-9 ] diff --git a/pengine/test10/order7.summary b/pengine/test10/order7.summary index fb398325a03..74c4b606d7f 100644 --- a/pengine/test10/order7.summary +++ b/pengine/test10/order7.summary @@ -5,7 +5,7 @@ Online: [ node1 ] rsc1 (heartbeat:apache): Started node1 rsc2 (heartbeat:apache): Stopped rsc3 (heartbeat:apache): Stopped - rscA (heartbeat:apache): FAILED node1 (unmanaged) + rscA (heartbeat:apache): FAILED node1 ( blocked ) rscB (heartbeat:apache): Stopped rscC (heartbeat:apache): Stopped @@ -30,7 +30,7 @@ Online: [ node1 ] rsc1 (heartbeat:apache): Started node1 rsc2 (heartbeat:apache): Started node1 rsc3 (heartbeat:apache): Started node1 - rscA (heartbeat:apache): FAILED node1 (unmanaged) + rscA (heartbeat:apache): FAILED node1 ( blocked ) rscB (heartbeat:apache): Started node1 rscC (heartbeat:apache): Stopped diff --git a/pengine/test10/order_constraint_stops_master.summary b/pengine/test10/order_constraint_stops_master.summary index 8b5d7922aad..abf1e216876 100644 --- a/pengine/test10/order_constraint_stops_master.summary +++ b/pengine/test10/order_constraint_stops_master.summary @@ -1,10 +1,11 @@ +3 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] Masters: [ fc16-builder ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder2 + NATIVE_RSC_B (ocf::pacemaker:Dummy): Started fc16-builder2 ( disabled ) Transition Summary: * Stop NATIVE_RSC_A:0 (Master fc16-builder) @@ -37,5 +38,5 @@ Online: [ fc16-builder fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] Stopped: [ fc16-builder fc16-builder2 ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + NATIVE_RSC_B (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/order_constraint_stops_slave.summary b/pengine/test10/order_constraint_stops_slave.summary index dac04d16525..a84c8632da4 100644 --- a/pengine/test10/order_constraint_stops_slave.summary +++ b/pengine/test10/order_constraint_stops_slave.summary @@ -1,11 +1,12 @@ +2 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] OFFLINE: [ fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] - Slaves: [ fc16-builder ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Started fc16-builder + Slaves (target-role): [ fc16-builder ] + NATIVE_RSC_B (ocf::pacemaker:Dummy): Started fc16-builder ( disabled ) Transition Summary: * Stop NATIVE_RSC_A:0 (Slave fc16-builder) @@ -29,5 +30,5 @@ OFFLINE: [ fc16-builder2 ] Master/Slave Set: MASTER_RSC_A [NATIVE_RSC_A] Stopped: [ fc16-builder fc16-builder2 ] - NATIVE_RSC_B (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + NATIVE_RSC_B (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/ordered-set-basic-startup.summary b/pengine/test10/ordered-set-basic-startup.summary index 117e2def183..182dd086164 100644 --- a/pengine/test10/ordered-set-basic-startup.summary +++ b/pengine/test10/ordered-set-basic-startup.summary @@ -1,3 +1,4 @@ +2 of 6 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ fc16-builder ] @@ -5,8 +6,8 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped B (ocf::pacemaker:Dummy): Stopped - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) + D (ocf::pacemaker:Dummy): Stopped ( disabled ) E (ocf::pacemaker:Dummy): Stopped F (ocf::pacemaker:Dummy): Stopped @@ -31,8 +32,8 @@ OFFLINE: [ fc16-builder2 ] A (ocf::pacemaker:Dummy): Stopped B (ocf::pacemaker:Dummy): Started fc16-builder - C (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped - D (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + C (ocf::pacemaker:Dummy): Stopped ( disabled ) + D (ocf::pacemaker:Dummy): Stopped ( disabled ) E (ocf::pacemaker:Dummy): Stopped F (ocf::pacemaker:Dummy): Stopped diff --git a/pengine/test10/ordered-set-natural.summary b/pengine/test10/ordered-set-natural.summary index 30f83b7c743..a3ba4530c94 100644 --- a/pengine/test10/ordered-set-natural.summary +++ b/pengine/test10/ordered-set-natural.summary @@ -1,3 +1,4 @@ +4 of 15 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] @@ -5,15 +6,15 @@ Online: [ node1 node2 ] Resource Group: rgroup dummy1-1 (ocf::heartbeat:Dummy): Stopped dummy1-2 (ocf::heartbeat:Dummy): Stopped - dummy1-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy1-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy1-4 (ocf::heartbeat:Dummy): Stopped dummy1-5 (ocf::heartbeat:Dummy): Stopped dummy2-1 (ocf::heartbeat:Dummy): Stopped dummy2-2 (ocf::heartbeat:Dummy): Stopped - dummy2-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy2-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy3-1 (ocf::heartbeat:Dummy): Stopped dummy3-2 (ocf::heartbeat:Dummy): Stopped - dummy3-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy3-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy3-4 (ocf::heartbeat:Dummy): Stopped dummy3-5 (ocf::heartbeat:Dummy): Stopped dummy2-4 (ocf::heartbeat:Dummy): Stopped @@ -35,15 +36,15 @@ Online: [ node1 node2 ] Resource Group: rgroup dummy1-1 (ocf::heartbeat:Dummy): Stopped dummy1-2 (ocf::heartbeat:Dummy): Stopped - dummy1-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy1-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy1-4 (ocf::heartbeat:Dummy): Stopped dummy1-5 (ocf::heartbeat:Dummy): Stopped dummy2-1 (ocf::heartbeat:Dummy): Stopped dummy2-2 (ocf::heartbeat:Dummy): Stopped - dummy2-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy2-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy3-1 (ocf::heartbeat:Dummy): Stopped dummy3-2 (ocf::heartbeat:Dummy): Stopped - dummy3-3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + dummy3-3 (ocf::heartbeat:Dummy): Stopped ( disabled ) dummy3-4 (ocf::heartbeat:Dummy): Stopped dummy3-5 (ocf::heartbeat:Dummy): Stopped dummy2-4 (ocf::heartbeat:Dummy): Stopped diff --git a/pengine/test10/params-2.exp b/pengine/test10/params-2.exp index ed1b5ea5f58..bd55ea2810b 100644 --- a/pengine/test10/params-2.exp +++ b/pengine/test10/params-2.exp @@ -149,6 +149,9 @@ + + + diff --git a/pengine/test10/params-4.exp b/pengine/test10/params-4.exp index 66d46410336..aadc5acbf25 100644 --- a/pengine/test10/params-4.exp +++ b/pengine/test10/params-4.exp @@ -96,7 +96,7 @@ - + diff --git a/pengine/test10/params-6.dot b/pengine/test10/params-6.dot index 9cd51c9ae06..241fde7e512 100644 --- a/pengine/test10/params-6.dot +++ b/pengine/test10/params-6.dot @@ -3,7 +3,6 @@ digraph "g" { "c5-x64-devel.vds-ok.com-vm_reload_0 v03-a" -> "c5-x64-devel.vds-ok.com-vm_monitor_10000 v03-a" [ style = bold] "c5-x64-devel.vds-ok.com-vm_reload_0 v03-a" [ style=bold color="green" fontcolor="black"] "load_stopped_mgmt01 mgmt01" [ style=bold color="green" fontcolor="orange"] -"load_stopped_v03-a v03-a" -> "c5-x64-devel.vds-ok.com-vm_reload_0 v03-a" [ style = bold] "load_stopped_v03-a v03-a" [ style=bold color="green" fontcolor="orange"] "load_stopped_v03-b v03-b" [ style=bold color="green" fontcolor="orange"] "vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm_monitor_10000 v03-b" [ style=bold color="green" fontcolor="black"] diff --git a/pengine/test10/params-6.exp b/pengine/test10/params-6.exp index e32f24591dd..307dbf30e8f 100644 --- a/pengine/test10/params-6.exp +++ b/pengine/test10/params-6.exp @@ -21,14 +21,10 @@ - + - - - - - + diff --git a/pengine/test10/params-6.summary b/pengine/test10/params-6.summary index 49f9787d17a..b7c9ff433b4 100644 --- a/pengine/test10/params-6.summary +++ b/pengine/test10/params-6.summary @@ -1,17 +1,18 @@ +90 of 337 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ mgmt01 v03-a v03-b ] - stonith-v02-a (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-b (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v02-a (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-b (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-c (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-d (stonith:fence_ipmilan): Stopped ( disabled ) stonith-mgmt01 (stonith:fence_xvm): Started v03-a stonith-mgmt02 (stonith:meatware): Started v03-a - stonith-v03-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-c (stonith:fence_ipmilan): Stopped ( disabled ) stonith-v03-a (stonith:fence_ipmilan): Started v03-b stonith-v03-b (stonith:fence_ipmilan): Started mgmt01 - stonith-v03-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-d (stonith:fence_ipmilan): Stopped ( disabled ) Clone Set: cl-clvmd [clvmd] Started: [ mgmt01 v03-a v03-b ] Clone Set: cl-dlm [dlm] @@ -77,7 +78,7 @@ Online: [ mgmt01 v03-a v03-b ] Clone Set: cl-vds-ok-pool-1-pool [vds-ok-pool-1-pool] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-libvirt-qpid [libvirt-qpid] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] @@ -85,100 +86,100 @@ Online: [ mgmt01 v03-a v03-b ] vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b vd01-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) f13-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-vlan200-if [vlan200-if] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - anbriz-gw-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - anbriz-work-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + anbriz-gw-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + anbriz-work-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) lenny-x32-devel-vm (ocf::vds-ok:VirtualDomain): Started v03-a - vptest1.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest2.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest3.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest4.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest5.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest6.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest7.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest8.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest9.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest10.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest11.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest12.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest13.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest14.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest15.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest16.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest17.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest18.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest19.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest20.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest21.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest22.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest23.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest24.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest25.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest26.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest27.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest28.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest29.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest30.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest31.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest32.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest33.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest34.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest35.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest36.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest37.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest38.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest39.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest40.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest41.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest42.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest43.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest44.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest45.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest46.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest47.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest48.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest49.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest50.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest51.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest52.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest53.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest54.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest55.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest56.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest57.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest58.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest59.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest60.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vptest1.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest2.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest3.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest4.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest5.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest6.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest7.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest8.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest9.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest10.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest11.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest12.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest13.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest14.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest15.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest16.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest17.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest18.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest19.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest20.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest21.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest22.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest23.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest24.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest25.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest26.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest27.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest28.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest29.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest30.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest31.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest32.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest33.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest34.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest35.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest36.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest37.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest38.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest39.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest40.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest41.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest42.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest43.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest44.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest45.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest46.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest47.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest48.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest49.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest50.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest51.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest52.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest53.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest54.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest55.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest56.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest57.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest58.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest59.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest60.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) sl6-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gotin-bbb-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - maxb-c55-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - metae.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gotin-bbb-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + maxb-c55-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + metae.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) c5-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a Clone Set: cl-mcast-test-net [mcast-test-net] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Transition Summary: * Reload c5-x64-devel.vds-ok.com-vm (Started v03-a) @@ -186,25 +187,25 @@ Transition Summary: Executing cluster transition: * Resource action: vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm monitor=10000 on v03-b * Resource action: vd01-d.cdev.ttc.prague.cz.vds-ok.com-vm monitor=10000 on v03-b + * Resource action: c5-x64-devel.vds-ok.com-vm reload on v03-a + * Resource action: c5-x64-devel.vds-ok.com-vm monitor=10000 on v03-a * Pseudo action: load_stopped_mgmt01 * Pseudo action: load_stopped_v03-b * Pseudo action: load_stopped_v03-a - * Resource action: c5-x64-devel.vds-ok.com-vm reload on v03-a - * Resource action: c5-x64-devel.vds-ok.com-vm monitor=10000 on v03-a Revised cluster status: Online: [ mgmt01 v03-a v03-b ] - stonith-v02-a (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-b (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped - stonith-v02-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v02-a (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-b (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-c (stonith:fence_ipmilan): Stopped ( disabled ) + stonith-v02-d (stonith:fence_ipmilan): Stopped ( disabled ) stonith-mgmt01 (stonith:fence_xvm): Started v03-a stonith-mgmt02 (stonith:meatware): Started v03-a - stonith-v03-c (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-c (stonith:fence_ipmilan): Stopped ( disabled ) stonith-v03-a (stonith:fence_ipmilan): Started v03-b stonith-v03-b (stonith:fence_ipmilan): Started mgmt01 - stonith-v03-d (stonith:fence_ipmilan): (target-role:Stopped) Stopped + stonith-v03-d (stonith:fence_ipmilan): Stopped ( disabled ) Clone Set: cl-clvmd [clvmd] Started: [ mgmt01 v03-a v03-b ] Clone Set: cl-dlm [dlm] @@ -270,7 +271,7 @@ Online: [ mgmt01 v03-a v03-b ] Clone Set: cl-vds-ok-pool-1-pool [vds-ok-pool-1-pool] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + git.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-libvirt-qpid [libvirt-qpid] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] @@ -278,98 +279,98 @@ Online: [ mgmt01 v03-a v03-b ] vd01-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b vd01-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a vd01-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vd02-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd02-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd03-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-a.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-b.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-c.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vd04-d.cdev.ttc.prague.cz.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) f13-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a eu2.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + zakaz.transferrus.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) Clone Set: cl-vlan200-if [vlan200-if] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - anbriz-gw-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - anbriz-work-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + anbriz-gw-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + anbriz-work-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) lenny-x32-devel-vm (ocf::vds-ok:VirtualDomain): Started v03-a - vptest1.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest2.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest3.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest4.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest5.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest6.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest7.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest8.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest9.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest10.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest11.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest12.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest13.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest14.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest15.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest16.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest17.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest18.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest19.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest20.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest21.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest22.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest23.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest24.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest25.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest26.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest27.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest28.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest29.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest30.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest31.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest32.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest33.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest34.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest35.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest36.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest37.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest38.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest39.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest40.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest41.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest42.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest43.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest44.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest45.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest46.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest47.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest48.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest49.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest50.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest51.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest52.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest53.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest54.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest55.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest56.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest57.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest58.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest59.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - vptest60.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + vptest1.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest2.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest3.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest4.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest5.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest6.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest7.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest8.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest9.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest10.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest11.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest12.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest13.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest14.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest15.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest16.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest17.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest18.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest19.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest20.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest21.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest22.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest23.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest24.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest25.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest26.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest27.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest28.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest29.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest30.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest31.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest32.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest33.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest34.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest35.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest36.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest37.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest38.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest39.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest40.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest41.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest42.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest43.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest44.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest45.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest46.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest47.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest48.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest49.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest50.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest51.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest52.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest53.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest54.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest55.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest56.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest57.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest58.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest59.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + vptest60.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) sl6-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-b - dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - gotin-bbb-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - maxb-c55-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - metae.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped - ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.express-consult.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + eu1.ca-pages.com-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + gotin-bbb-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + maxb-c55-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + metae.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + rodovoepomestie.ru-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) + ubuntu9.10-gotin-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) c5-x64-devel.vds-ok.com-vm (ocf::vds-ok:VirtualDomain): Started v03-a Clone Set: cl-mcast-test-net [mcast-test-net] Started: [ v03-a v03-b ] Stopped: [ mgmt01 ] - dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): (target-role:Stopped) Stopped + dist.fly-uni.org-vm (ocf::vds-ok:VirtualDomain): Stopped ( disabled ) diff --git a/pengine/test10/probe-2.summary b/pengine/test10/probe-2.summary index e8a2269ed48..7bd44d2da41 100644 --- a/pengine/test10/probe-2.summary +++ b/pengine/test10/probe-2.summary @@ -1,3 +1,4 @@ +4 of 22 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Node wc02 (f36760d8-d84a-46b2-b452-4c8cac8b3396): standby @@ -9,14 +10,14 @@ Online: [ wc01 ] intip_nfs (ocf::heartbeat:IPaddr2): Started wc01 Master/Slave Set: ms_drbd_mysql [drbd_mysql] Masters: [ wc02 ] - Slaves: [ wc01 ] + Slaves (target-role): [ wc01 ] Resource Group: group_mysql fs_mysql (ocf::heartbeat:Filesystem): Started wc02 intip_sql (ocf::heartbeat:IPaddr2): Started wc02 mysql-server (ocf::heartbeat:mysql): Started wc02 Master/Slave Set: ms_drbd_www [drbd_www] Masters: [ wc01 ] - Slaves: [ wc02 ] + Slaves (target-role): [ wc02 ] Clone Set: clone_nfs-common [group_nfs-common] Started: [ wc01 wc02 ] Clone Set: clone_mysql-proxy [group_mysql-proxy] diff --git a/pengine/test10/rec-node-11.exp b/pengine/test10/rec-node-11.exp index 0f3da7381ff..40b59af9604 100644 --- a/pengine/test10/rec-node-11.exp +++ b/pengine/test10/rec-node-11.exp @@ -224,6 +224,9 @@ + + + diff --git a/pengine/test10/rec-node-12.exp b/pengine/test10/rec-node-12.exp index 1c6bc5bae02..9204f665b26 100644 --- a/pengine/test10/rec-node-12.exp +++ b/pengine/test10/rec-node-12.exp @@ -565,6 +565,9 @@ + + + diff --git a/pengine/test10/rec-node-13.exp b/pengine/test10/rec-node-13.exp index 58929fd427c..3b25e9f3492 100644 --- a/pengine/test10/rec-node-13.exp +++ b/pengine/test10/rec-node-13.exp @@ -45,6 +45,9 @@ + + + diff --git a/pengine/test10/rec-node-14.exp b/pengine/test10/rec-node-14.exp index 0e5e1632194..30dbcdb4cb4 100644 --- a/pengine/test10/rec-node-14.exp +++ b/pengine/test10/rec-node-14.exp @@ -3,6 +3,9 @@ + + + @@ -15,6 +18,9 @@ + + + @@ -27,6 +33,9 @@ + + + diff --git a/pengine/test10/rec-node-15.exp b/pengine/test10/rec-node-15.exp index feab664d16e..c01afff824d 100644 --- a/pengine/test10/rec-node-15.exp +++ b/pengine/test10/rec-node-15.exp @@ -441,6 +441,9 @@ + + + diff --git a/pengine/test10/rec-node-2.exp b/pengine/test10/rec-node-2.exp index 8f28a79adb8..d96ade77027 100644 --- a/pengine/test10/rec-node-2.exp +++ b/pengine/test10/rec-node-2.exp @@ -248,6 +248,9 @@ + + + diff --git a/pengine/test10/rec-node-4.exp b/pengine/test10/rec-node-4.exp index 5de51a24f29..f3d14d9a82b 100644 --- a/pengine/test10/rec-node-4.exp +++ b/pengine/test10/rec-node-4.exp @@ -114,6 +114,9 @@ + + + diff --git a/pengine/test10/rec-node-6.exp b/pengine/test10/rec-node-6.exp index 5de51a24f29..f3d14d9a82b 100644 --- a/pengine/test10/rec-node-6.exp +++ b/pengine/test10/rec-node-6.exp @@ -114,6 +114,9 @@ + + + diff --git a/pengine/test10/rec-node-7.exp b/pengine/test10/rec-node-7.exp index 5de51a24f29..f3d14d9a82b 100644 --- a/pengine/test10/rec-node-7.exp +++ b/pengine/test10/rec-node-7.exp @@ -114,6 +114,9 @@ + + + diff --git a/pengine/test10/rec-rsc-4.summary b/pengine/test10/rec-rsc-4.summary index e20270dbd8a..bff1febdf17 100644 --- a/pengine/test10/rec-rsc-4.summary +++ b/pengine/test10/rec-rsc-4.summary @@ -2,7 +2,7 @@ Current cluster status: Online: [ node1 node2 ] - rsc1 (heartbeat:apache): FAILED node2 (unmanaged) + rsc1 (heartbeat:apache): FAILED node2 ( blocked ) Transition Summary: @@ -12,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (heartbeat:apache): FAILED node2 (unmanaged) + rsc1 (heartbeat:apache): FAILED node2 ( blocked ) diff --git a/pengine/test10/rec-rsc-5.exp b/pengine/test10/rec-rsc-5.exp index f5b3520edf2..bf03d7900bb 100644 --- a/pengine/test10/rec-rsc-5.exp +++ b/pengine/test10/rec-rsc-5.exp @@ -114,6 +114,9 @@ + + + diff --git a/pengine/test10/rec-rsc-8.summary b/pengine/test10/rec-rsc-8.summary index 35510e8f18c..715974fc4f9 100644 --- a/pengine/test10/rec-rsc-8.summary +++ b/pengine/test10/rec-rsc-8.summary @@ -2,7 +2,7 @@ Current cluster status: Online: [ node1 node2 ] - rsc1 (heartbeat:apache): Started (unmanaged) [ node1 node2 ] + rsc1 (heartbeat:apache): Started ( blocked ) [ node1 node2 ] Transition Summary: @@ -11,5 +11,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (heartbeat:apache): Started (unmanaged) [ node1 node2 ] + rsc1 (heartbeat:apache): Started ( blocked ) [ node1 node2 ] diff --git a/pengine/test10/remote-disable.exp b/pengine/test10/remote-disable.exp index f949c56049e..b2a9afcfb4b 100644 --- a/pengine/test10/remote-disable.exp +++ b/pengine/test10/remote-disable.exp @@ -4,6 +4,9 @@ + + + diff --git a/pengine/test10/remote-disable.summary b/pengine/test10/remote-disable.summary index c7e3a18ad46..69b4b62ede6 100644 --- a/pengine/test10/remote-disable.summary +++ b/pengine/test10/remote-disable.summary @@ -1,10 +1,11 @@ +2 of 6 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ 18builder 18node1 18node2 ] RemoteOnline: [ remote1 ] shooter (stonith:fence_xvm): Started 18node1 - remote1 (ocf::pacemaker:remote): (target-role:Stopped) Started 18builder + remote1 (ocf::pacemaker:remote): Started 18builder ( disabled ) FAKE1 (ocf::heartbeat:Dummy): Started 18node2 FAKE2 (ocf::heartbeat:Dummy): Started remote1 FAKE3 (ocf::heartbeat:Dummy): Started 18builder @@ -24,7 +25,7 @@ Online: [ 18builder 18node1 18node2 ] RemoteOFFLINE: [ remote1 ] shooter (stonith:fence_xvm): Started 18node1 - remote1 (ocf::pacemaker:remote): (target-role:Stopped) Stopped + remote1 (ocf::pacemaker:remote): Stopped ( disabled ) FAKE1 (ocf::heartbeat:Dummy): Started 18node2 FAKE2 (ocf::heartbeat:Dummy): Stopped FAKE3 (ocf::heartbeat:Dummy): Started 18builder diff --git a/pengine/test10/remote-fence-before-reconnect.exp b/pengine/test10/remote-fence-before-reconnect.exp index 107ed656e76..3217e085085 100644 --- a/pengine/test10/remote-fence-before-reconnect.exp +++ b/pengine/test10/remote-fence-before-reconnect.exp @@ -4,6 +4,9 @@ + + + @@ -53,6 +56,9 @@ + + + diff --git a/pengine/test10/remote-fence-unclean.exp b/pengine/test10/remote-fence-unclean.exp index 37fdf85417d..fad2a9305d1 100644 --- a/pengine/test10/remote-fence-unclean.exp +++ b/pengine/test10/remote-fence-unclean.exp @@ -20,6 +20,9 @@ + + + @@ -158,6 +161,9 @@ + + + diff --git a/pengine/test10/remote-fence-unclean2.exp b/pengine/test10/remote-fence-unclean2.exp index 9285e755f2f..c28832b39e9 100644 --- a/pengine/test10/remote-fence-unclean2.exp +++ b/pengine/test10/remote-fence-unclean2.exp @@ -15,6 +15,9 @@ + + + diff --git a/pengine/test10/remote-orphaned.exp b/pengine/test10/remote-orphaned.exp index 40acf11a158..9b6e5ce9bf6 100644 --- a/pengine/test10/remote-orphaned.exp +++ b/pengine/test10/remote-orphaned.exp @@ -75,6 +75,9 @@ + + + diff --git a/pengine/test10/remote-partial-migrate2.exp b/pengine/test10/remote-partial-migrate2.exp index f362479cecd..e2afeaeae50 100644 --- a/pengine/test10/remote-partial-migrate2.exp +++ b/pengine/test10/remote-partial-migrate2.exp @@ -784,6 +784,9 @@ + + + diff --git a/pengine/test10/remote-recover-fail.exp b/pengine/test10/remote-recover-fail.exp index 543974cf995..95a3fd20a51 100644 --- a/pengine/test10/remote-recover-fail.exp +++ b/pengine/test10/remote-recover-fail.exp @@ -33,6 +33,9 @@ + + + @@ -167,6 +170,9 @@ + + + diff --git a/pengine/test10/remote-start-fail.exp b/pengine/test10/remote-start-fail.exp index e3e875799b9..0874c17ef13 100644 --- a/pengine/test10/remote-start-fail.exp +++ b/pengine/test10/remote-start-fail.exp @@ -30,6 +30,9 @@ + + + diff --git a/pengine/test10/remote-unclean2.exp b/pengine/test10/remote-unclean2.exp index d364443e1b0..c8c2fccdb15 100644 --- a/pengine/test10/remote-unclean2.exp +++ b/pengine/test10/remote-unclean2.exp @@ -20,6 +20,9 @@ + + + @@ -41,6 +44,9 @@ + + + diff --git a/pengine/test10/rsc-maintenance.summary b/pengine/test10/rsc-maintenance.summary index f143e24290a..956afe8274b 100644 --- a/pengine/test10/rsc-maintenance.summary +++ b/pengine/test10/rsc-maintenance.summary @@ -1,10 +1,11 @@ +4 of 4 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) - rsc2 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) + rsc2 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) Resource Group: group2 rsc3 (ocf::pacemaker:Dummy): Started node2 rsc4 (ocf::pacemaker:Dummy): Started node2 @@ -19,8 +20,8 @@ Revised cluster status: Online: [ node1 node2 ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) - rsc2 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) + rsc2 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) Resource Group: group2 rsc3 (ocf::pacemaker:Dummy): Started node2 rsc4 (ocf::pacemaker:Dummy): Started node2 diff --git a/pengine/test10/rsc-sets-clone-1.summary b/pengine/test10/rsc-sets-clone-1.summary index 1bcb5482b6d..afafc555ca9 100644 --- a/pengine/test10/rsc-sets-clone-1.summary +++ b/pengine/test10/rsc-sets-clone-1.summary @@ -1,18 +1,19 @@ +5 of 24 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ sys2 sys3 ] vm1 (ocf::heartbeat:Xen): Started sys2 - vm2 (ocf::heartbeat:Xen): (target-role:stopped) Stopped - vm3 (ocf::heartbeat:Xen): (target-role:stopped) Stopped - vm4 (ocf::heartbeat:Xen): (target-role:stopped) Stopped + vm2 (ocf::heartbeat:Xen): Stopped ( disabled ) + vm3 (ocf::heartbeat:Xen): Stopped ( disabled ) + vm4 (ocf::heartbeat:Xen): Stopped ( disabled ) stonithsys2 (stonith:external/ipmi): Stopped stonithsys3 (stonith:external/ipmi): Started sys2 Clone Set: baseclone [basegrp] Started: [ sys2 ] Stopped: [ sys3 ] Clone Set: fs1 [nfs1] - Stopped: [ sys2 sys3 ] + Stopped (disabled): [ sys2 sys3 ] Transition Summary: * Restart stonithsys3 (Started sys2) @@ -71,13 +72,13 @@ Revised cluster status: Online: [ sys2 sys3 ] vm1 (ocf::heartbeat:Xen): Started sys2 - vm2 (ocf::heartbeat:Xen): (target-role:stopped) Stopped - vm3 (ocf::heartbeat:Xen): (target-role:stopped) Stopped - vm4 (ocf::heartbeat:Xen): (target-role:stopped) Stopped + vm2 (ocf::heartbeat:Xen): Stopped ( disabled ) + vm3 (ocf::heartbeat:Xen): Stopped ( disabled ) + vm4 (ocf::heartbeat:Xen): Stopped ( disabled ) stonithsys2 (stonith:external/ipmi): Started sys3 stonithsys3 (stonith:external/ipmi): Started sys2 Clone Set: baseclone [basegrp] Started: [ sys2 sys3 ] Clone Set: fs1 [nfs1] - Stopped: [ sys2 sys3 ] + Stopped (disabled): [ sys2 sys3 ] diff --git a/pengine/test10/simple7.exp b/pengine/test10/simple7.exp index 6893f422a00..34546c4bc13 100644 --- a/pengine/test10/simple7.exp +++ b/pengine/test10/simple7.exp @@ -12,6 +12,9 @@ + + + diff --git a/pengine/test10/stonith-0.exp b/pengine/test10/stonith-0.exp index a02d6687374..2acce0454b2 100644 --- a/pengine/test10/stonith-0.exp +++ b/pengine/test10/stonith-0.exp @@ -370,6 +370,9 @@ + + + @@ -378,6 +381,9 @@ + + + diff --git a/pengine/test10/stonith-1.exp b/pengine/test10/stonith-1.exp index 176d6ffdd85..cb4f8b26281 100644 --- a/pengine/test10/stonith-1.exp +++ b/pengine/test10/stonith-1.exp @@ -548,6 +548,9 @@ + + + diff --git a/pengine/test10/stonith-2.exp b/pengine/test10/stonith-2.exp index 938463e06ce..77fd9d87139 100644 --- a/pengine/test10/stonith-2.exp +++ b/pengine/test10/stonith-2.exp @@ -29,6 +29,9 @@ + + + diff --git a/pengine/test10/stonith-3.exp b/pengine/test10/stonith-3.exp index 3de0bd9c847..0ed288b890a 100644 --- a/pengine/test10/stonith-3.exp +++ b/pengine/test10/stonith-3.exp @@ -120,6 +120,9 @@ + + + diff --git a/pengine/test10/stonith-4.exp b/pengine/test10/stonith-4.exp index d5203fd8594..298a6369888 100644 --- a/pengine/test10/stonith-4.exp +++ b/pengine/test10/stonith-4.exp @@ -3,6 +3,9 @@ + + + @@ -15,6 +18,9 @@ + + + @@ -27,6 +33,9 @@ + + + @@ -39,6 +48,9 @@ + + + diff --git a/pengine/test10/stop-failure-no-fencing.summary b/pengine/test10/stop-failure-no-fencing.summary index 1148f8291f2..da09ccece03 100644 --- a/pengine/test10/stop-failure-no-fencing.summary +++ b/pengine/test10/stop-failure-no-fencing.summary @@ -7,7 +7,7 @@ Online: [ pcmk-1 pcmk-2 ] Clone Set: dlm-clone [dlm] Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] Clone Set: clvm-clone [clvm] - clvm (lsb:clvmd): FAILED pcmk-3 (UNCLEAN) (unmanaged) + clvm (lsb:clvmd): FAILED pcmk-3 ( UNCLEAN, blocked ) Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped @@ -23,7 +23,7 @@ Online: [ pcmk-1 pcmk-2 ] Clone Set: dlm-clone [dlm] Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] Clone Set: clvm-clone [clvm] - clvm (lsb:clvmd): FAILED pcmk-3 (UNCLEAN) (unmanaged) + clvm (lsb:clvmd): FAILED pcmk-3 ( UNCLEAN, blocked ) Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped diff --git a/pengine/test10/stop-failure-no-quorum.exp b/pengine/test10/stop-failure-no-quorum.exp index bfa5ab441a5..cf284bdc1bb 100644 --- a/pengine/test10/stop-failure-no-quorum.exp +++ b/pengine/test10/stop-failure-no-quorum.exp @@ -45,6 +45,9 @@ + + + diff --git a/pengine/test10/stop-failure-no-quorum.summary b/pengine/test10/stop-failure-no-quorum.summary index a5a0949e847..7c14ce238d3 100644 --- a/pengine/test10/stop-failure-no-quorum.summary +++ b/pengine/test10/stop-failure-no-quorum.summary @@ -9,7 +9,7 @@ Online: [ pcmk-1 ] Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] Clone Set: clvm-clone [clvm] clvm (lsb:clvmd): FAILED pcmk-2 - clvm (lsb:clvmd): FAILED pcmk-3 (UNCLEAN) (unmanaged) + clvm (lsb:clvmd): FAILED pcmk-3 ( UNCLEAN, blocked ) Stopped: [ pcmk-1 pcmk-3 pcmk-4 ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped Fencing (stonith:fence_xvm): Stopped @@ -38,7 +38,7 @@ OFFLINE: [ pcmk-2 ] Clone Set: dlm-clone [dlm] Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] Clone Set: clvm-clone [clvm] - clvm (lsb:clvmd): FAILED pcmk-3 (UNCLEAN) (unmanaged) + clvm (lsb:clvmd): FAILED pcmk-3 ( UNCLEAN, blocked ) Stopped: [ pcmk-1 pcmk-2 pcmk-3 pcmk-4 ] ClusterIP (ocf::heartbeat:IPaddr2): Stopped Fencing (stonith:fence_xvm): Stopped diff --git a/pengine/test10/stop-failure-with-fencing.exp b/pengine/test10/stop-failure-with-fencing.exp index ea0fd90e611..1556a1e4ea5 100644 --- a/pengine/test10/stop-failure-with-fencing.exp +++ b/pengine/test10/stop-failure-with-fencing.exp @@ -54,6 +54,9 @@ + + + diff --git a/pengine/test10/stopped-monitor-03.summary b/pengine/test10/stopped-monitor-03.summary index 76cf56c3cac..521dc2fea2c 100644 --- a/pengine/test10/stopped-monitor-03.summary +++ b/pengine/test10/stopped-monitor-03.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 + rsc1 (ocf::pacemaker:Dummy): Started node1 ( disabled ) Transition Summary: * Stop rsc1 (node1) @@ -15,5 +16,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/stopped-monitor-04.summary b/pengine/test10/stopped-monitor-04.summary index f5fafafa488..fd1aeed5fc5 100644 --- a/pengine/test10/stopped-monitor-04.summary +++ b/pengine/test10/stopped-monitor-04.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node1 ( disabled, blocked ) Transition Summary: @@ -11,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node1 ( disabled, blocked ) diff --git a/pengine/test10/stopped-monitor-05.summary b/pengine/test10/stopped-monitor-05.summary index f5fafafa488..db595fe738a 100644 --- a/pengine/test10/stopped-monitor-05.summary +++ b/pengine/test10/stopped-monitor-05.summary @@ -2,7 +2,7 @@ Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node1 ( blocked ) Transition Summary: @@ -11,5 +11,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): FAILED node1 ( blocked ) diff --git a/pengine/test10/stopped-monitor-06.summary b/pengine/test10/stopped-monitor-06.summary index 1f6d440fe91..c45cf99e0dc 100644 --- a/pengine/test10/stopped-monitor-06.summary +++ b/pengine/test10/stopped-monitor-06.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, blocked ) [ node1 node2 ] Transition Summary: @@ -11,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, blocked ) [ node1 node2 ] diff --git a/pengine/test10/stopped-monitor-07.summary b/pengine/test10/stopped-monitor-07.summary index 1f6d440fe91..50c4ce76678 100644 --- a/pengine/test10/stopped-monitor-07.summary +++ b/pengine/test10/stopped-monitor-07.summary @@ -2,7 +2,7 @@ Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( blocked ) [ node1 node2 ] Transition Summary: @@ -11,5 +11,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( blocked ) [ node1 node2 ] diff --git a/pengine/test10/stopped-monitor-11.summary b/pengine/test10/stopped-monitor-11.summary index 1cdf2f0c6b0..27573b8c677 100644 --- a/pengine/test10/stopped-monitor-11.summary +++ b/pengine/test10/stopped-monitor-11.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) Transition Summary: @@ -11,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started node1 (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started node1 ( disabled, unmanaged ) diff --git a/pengine/test10/stopped-monitor-12.summary b/pengine/test10/stopped-monitor-12.summary index 1f6d440fe91..8dafb593026 100644 --- a/pengine/test10/stopped-monitor-12.summary +++ b/pengine/test10/stopped-monitor-12.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, unmanaged ) [ node1 node2 ] Transition Summary: @@ -11,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, unmanaged ) [ node1 node2 ] diff --git a/pengine/test10/stopped-monitor-20.summary b/pengine/test10/stopped-monitor-20.summary index 921cf2255f2..cef026dc3f5 100644 --- a/pengine/test10/stopped-monitor-20.summary +++ b/pengine/test10/stopped-monitor-20.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) Transition Summary: @@ -15,5 +16,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/stopped-monitor-21.summary b/pengine/test10/stopped-monitor-21.summary index 49a450aaa37..058cde33bce 100644 --- a/pengine/test10/stopped-monitor-21.summary +++ b/pengine/test10/stopped-monitor-21.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED node1 + rsc1 (ocf::pacemaker:Dummy): FAILED node1 ( disabled ) Transition Summary: * Stop rsc1 (node1) @@ -15,5 +16,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/stopped-monitor-22.summary b/pengine/test10/stopped-monitor-22.summary index d464a2c6548..cb2d449184c 100644 --- a/pengine/test10/stopped-monitor-22.summary +++ b/pengine/test10/stopped-monitor-22.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled ) [ node1 node2 ] Transition Summary: * Stop rsc1 (node1) @@ -18,5 +19,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/stopped-monitor-24.summary b/pengine/test10/stopped-monitor-24.summary index 92fdceb1354..d3130a60544 100644 --- a/pengine/test10/stopped-monitor-24.summary +++ b/pengine/test10/stopped-monitor-24.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled, unmanaged ) Transition Summary: @@ -11,5 +12,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled, unmanaged ) diff --git a/pengine/test10/stopped-monitor-25.summary b/pengine/test10/stopped-monitor-25.summary index 8473c6943f5..b0f0c52765b 100644 --- a/pengine/test10/stopped-monitor-25.summary +++ b/pengine/test10/stopped-monitor-25.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, unmanaged ) [ node1 node2 ] Transition Summary: @@ -13,5 +14,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): FAILED (unmanaged) [ node1 node2 ] + rsc1 (ocf::pacemaker:Dummy): FAILED ( disabled, unmanaged ) [ node1 node2 ] diff --git a/pengine/test10/stopped-monitor-31.summary b/pengine/test10/stopped-monitor-31.summary index fee324317ad..364d29002d1 100644 --- a/pengine/test10/stopped-monitor-31.summary +++ b/pengine/test10/stopped-monitor-31.summary @@ -1,8 +1,9 @@ +1 of 1 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 node3 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) Transition Summary: @@ -13,5 +14,5 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 node3 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/systemhealth1.exp b/pengine/test10/systemhealth1.exp index aa2afe1ec87..4cfe4c206ba 100644 --- a/pengine/test10/systemhealth1.exp +++ b/pengine/test10/systemhealth1.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/systemhealth2.exp b/pengine/test10/systemhealth2.exp index b096b39c936..b9452108cae 100644 --- a/pengine/test10/systemhealth2.exp +++ b/pengine/test10/systemhealth2.exp @@ -104,6 +104,9 @@ + + + diff --git a/pengine/test10/systemhealth3.exp b/pengine/test10/systemhealth3.exp index b096b39c936..b9452108cae 100644 --- a/pengine/test10/systemhealth3.exp +++ b/pengine/test10/systemhealth3.exp @@ -104,6 +104,9 @@ + + + diff --git a/pengine/test10/systemhealthm1.exp b/pengine/test10/systemhealthm1.exp index aa2afe1ec87..4cfe4c206ba 100644 --- a/pengine/test10/systemhealthm1.exp +++ b/pengine/test10/systemhealthm1.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/systemhealthm2.exp b/pengine/test10/systemhealthm2.exp index b096b39c936..b9452108cae 100644 --- a/pengine/test10/systemhealthm2.exp +++ b/pengine/test10/systemhealthm2.exp @@ -104,6 +104,9 @@ + + + diff --git a/pengine/test10/systemhealthm3.exp b/pengine/test10/systemhealthm3.exp index d1f5655419c..fefc587e326 100644 --- a/pengine/test10/systemhealthm3.exp +++ b/pengine/test10/systemhealthm3.exp @@ -30,6 +30,9 @@ + + + diff --git a/pengine/test10/systemhealthn1.exp b/pengine/test10/systemhealthn1.exp index aa2afe1ec87..4cfe4c206ba 100644 --- a/pengine/test10/systemhealthn1.exp +++ b/pengine/test10/systemhealthn1.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/systemhealthn2.exp b/pengine/test10/systemhealthn2.exp index b096b39c936..b9452108cae 100644 --- a/pengine/test10/systemhealthn2.exp +++ b/pengine/test10/systemhealthn2.exp @@ -104,6 +104,9 @@ + + + diff --git a/pengine/test10/systemhealthn3.exp b/pengine/test10/systemhealthn3.exp index b096b39c936..b9452108cae 100644 --- a/pengine/test10/systemhealthn3.exp +++ b/pengine/test10/systemhealthn3.exp @@ -104,6 +104,9 @@ + + + diff --git a/pengine/test10/systemhealtho1.exp b/pengine/test10/systemhealtho1.exp index aa2afe1ec87..4cfe4c206ba 100644 --- a/pengine/test10/systemhealtho1.exp +++ b/pengine/test10/systemhealtho1.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/systemhealtho2.exp b/pengine/test10/systemhealtho2.exp index d1f5655419c..fefc587e326 100644 --- a/pengine/test10/systemhealtho2.exp +++ b/pengine/test10/systemhealtho2.exp @@ -30,6 +30,9 @@ + + + diff --git a/pengine/test10/systemhealtho3.exp b/pengine/test10/systemhealtho3.exp index d1f5655419c..fefc587e326 100644 --- a/pengine/test10/systemhealtho3.exp +++ b/pengine/test10/systemhealtho3.exp @@ -30,6 +30,9 @@ + + + diff --git a/pengine/test10/systemhealthp1.exp b/pengine/test10/systemhealthp1.exp index aa2afe1ec87..4cfe4c206ba 100644 --- a/pengine/test10/systemhealthp1.exp +++ b/pengine/test10/systemhealthp1.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/systemhealthp2.exp b/pengine/test10/systemhealthp2.exp index 97d2212a446..4784e5dcdb4 100644 --- a/pengine/test10/systemhealthp2.exp +++ b/pengine/test10/systemhealthp2.exp @@ -88,6 +88,9 @@ + + + diff --git a/pengine/test10/systemhealthp3.exp b/pengine/test10/systemhealthp3.exp index d1f5655419c..fefc587e326 100644 --- a/pengine/test10/systemhealthp3.exp +++ b/pengine/test10/systemhealthp3.exp @@ -30,6 +30,9 @@ + + + diff --git a/pengine/test10/target-1.summary b/pengine/test10/target-1.summary index 2d9147026bb..a94241eec6b 100644 --- a/pengine/test10/target-1.summary +++ b/pengine/test10/target-1.summary @@ -1,10 +1,11 @@ +1 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ c001n01 c001n02 c001n03 c001n08 ] DcIPaddr (ocf::heartbeat:IPaddr): Started c001n02 - rsc_c001n08 (ocf::heartbeat:IPaddr): (target-role:Stopped) Started c001n08 - rsc_c001n02 (ocf::heartbeat:IPaddr): (target-role:Slave) Started c001n02 + rsc_c001n08 (ocf::heartbeat:IPaddr): Started c001n08 ( disabled ) + rsc_c001n02 (ocf::heartbeat:IPaddr): Started c001n02 Master/Slave Set: promoteme [rsc_c001n03] Slaves: [ c001n03 ] rsc_c001n01 (ocf::heartbeat:IPaddr): Started c001n01 @@ -32,8 +33,8 @@ Revised cluster status: Online: [ c001n01 c001n02 c001n03 c001n08 ] DcIPaddr (ocf::heartbeat:IPaddr): Started c001n02 - rsc_c001n08 (ocf::heartbeat:IPaddr): (target-role:Stopped) Stopped - rsc_c001n02 (ocf::heartbeat:IPaddr): (target-role:Slave) Started c001n02 + rsc_c001n08 (ocf::heartbeat:IPaddr): Stopped ( disabled ) + rsc_c001n02 (ocf::heartbeat:IPaddr): Started c001n02 Master/Slave Set: promoteme [rsc_c001n03] Slaves: [ c001n03 ] rsc_c001n01 (ocf::heartbeat:IPaddr): Started c001n01 diff --git a/pengine/test10/target-2.summary b/pengine/test10/target-2.summary index 886d5b1302a..bcefbef37e3 100644 --- a/pengine/test10/target-2.summary +++ b/pengine/test10/target-2.summary @@ -1,11 +1,12 @@ +1 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ c001n01 c001n02 c001n03 c001n08 ] DcIPaddr (ocf::heartbeat:IPaddr): Started c001n02 - rsc_c001n08 (ocf::heartbeat:IPaddr): (target-role:Stopped) Started c001n08 - rsc_c001n02 (ocf::heartbeat:IPaddr): (target-role:Slave) Started c001n02 - rsc_c001n03 (ocf::heartbeat:IPaddr): (target-role:Master) Started c001n03 + rsc_c001n08 (ocf::heartbeat:IPaddr): Started c001n08 ( disabled ) + rsc_c001n02 (ocf::heartbeat:IPaddr): Started c001n02 + rsc_c001n03 (ocf::heartbeat:IPaddr): Started c001n03 rsc_c001n01 (ocf::heartbeat:IPaddr): Started c001n01 Transition Summary: @@ -34,8 +35,8 @@ Revised cluster status: Online: [ c001n01 c001n02 c001n03 c001n08 ] DcIPaddr (ocf::heartbeat:IPaddr): Started c001n02 - rsc_c001n08 (ocf::heartbeat:IPaddr): (target-role:Stopped) Stopped - rsc_c001n02 (ocf::heartbeat:IPaddr): (target-role:Slave) Started c001n02 - rsc_c001n03 (ocf::heartbeat:IPaddr): (target-role:Master) Started c001n03 + rsc_c001n08 (ocf::heartbeat:IPaddr): Stopped ( disabled ) + rsc_c001n02 (ocf::heartbeat:IPaddr): Started c001n02 + rsc_c001n03 (ocf::heartbeat:IPaddr): Started c001n03 rsc_c001n01 (ocf::heartbeat:IPaddr): Started c001n01 diff --git a/pengine/test10/template-1.summary b/pengine/test10/template-1.summary index 78cc3f872b1..9ed11983b35 100644 --- a/pengine/test10/template-1.summary +++ b/pengine/test10/template-1.summary @@ -1,8 +1,9 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) rsc2 (ocf::pacemaker:Dummy): Stopped Transition Summary: @@ -21,6 +22,6 @@ Executing cluster transition: Revised cluster status: Online: [ node1 node2 ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped ( disabled ) rsc2 (ocf::pacemaker:Dummy): Started node1 diff --git a/pengine/test10/ticket-clone-21.exp b/pengine/test10/ticket-clone-21.exp index a2cf450de0c..23266d43860 100644 --- a/pengine/test10/ticket-clone-21.exp +++ b/pengine/test10/ticket-clone-21.exp @@ -78,6 +78,9 @@ + + + @@ -90,6 +93,9 @@ + + + diff --git a/pengine/test10/ticket-clone-9.exp b/pengine/test10/ticket-clone-9.exp index a2cf450de0c..23266d43860 100644 --- a/pengine/test10/ticket-clone-9.exp +++ b/pengine/test10/ticket-clone-9.exp @@ -78,6 +78,9 @@ + + + @@ -90,6 +93,9 @@ + + + diff --git a/pengine/test10/ticket-group-21.exp b/pengine/test10/ticket-group-21.exp index 704e3b21f87..82b3fdb5bd0 100644 --- a/pengine/test10/ticket-group-21.exp +++ b/pengine/test10/ticket-group-21.exp @@ -66,6 +66,9 @@ + + + diff --git a/pengine/test10/ticket-group-9.exp b/pengine/test10/ticket-group-9.exp index 704e3b21f87..82b3fdb5bd0 100644 --- a/pengine/test10/ticket-group-9.exp +++ b/pengine/test10/ticket-group-9.exp @@ -66,6 +66,9 @@ + + + diff --git a/pengine/test10/ticket-master-21.exp b/pengine/test10/ticket-master-21.exp index b85326db469..bab7e5466eb 100644 --- a/pengine/test10/ticket-master-21.exp +++ b/pengine/test10/ticket-master-21.exp @@ -110,6 +110,9 @@ + + + diff --git a/pengine/test10/ticket-master-9.exp b/pengine/test10/ticket-master-9.exp index b85326db469..bab7e5466eb 100644 --- a/pengine/test10/ticket-master-9.exp +++ b/pengine/test10/ticket-master-9.exp @@ -110,6 +110,9 @@ + + + diff --git a/pengine/test10/ticket-primitive-21.exp b/pengine/test10/ticket-primitive-21.exp index fe7d1a1cd97..bbd949fab7c 100644 --- a/pengine/test10/ticket-primitive-21.exp +++ b/pengine/test10/ticket-primitive-21.exp @@ -15,6 +15,9 @@ + + + diff --git a/pengine/test10/ticket-primitive-9.exp b/pengine/test10/ticket-primitive-9.exp index fe7d1a1cd97..bbd949fab7c 100644 --- a/pengine/test10/ticket-primitive-9.exp +++ b/pengine/test10/ticket-primitive-9.exp @@ -15,6 +15,9 @@ + + + diff --git a/pengine/test10/unfence-definition.exp b/pengine/test10/unfence-definition.exp index 418a6923578..9d23a2a3f13 100644 --- a/pengine/test10/unfence-definition.exp +++ b/pengine/test10/unfence-definition.exp @@ -355,6 +355,9 @@ + + + diff --git a/pengine/test10/unfence-parameters.exp b/pengine/test10/unfence-parameters.exp index 8f03a4d9f2e..48ef3bcf375 100644 --- a/pengine/test10/unfence-parameters.exp +++ b/pengine/test10/unfence-parameters.exp @@ -395,6 +395,9 @@ + + + diff --git a/pengine/test10/unfence-startup.exp b/pengine/test10/unfence-startup.exp index 2eeb1633b84..7595cf3632c 100644 --- a/pengine/test10/unfence-startup.exp +++ b/pengine/test10/unfence-startup.exp @@ -166,6 +166,9 @@ + + + diff --git a/pengine/test10/unmanaged-block-restart.summary b/pengine/test10/unmanaged-block-restart.summary index a245bc8614d..0b704818450 100644 --- a/pengine/test10/unmanaged-block-restart.summary +++ b/pengine/test10/unmanaged-block-restart.summary @@ -6,7 +6,7 @@ Online: [ yingying.site ] rsc1 (ocf::pacemaker:Dummy): Stopped rsc2 (ocf::pacemaker:Dummy): Started yingying.site rsc3 (ocf::pacemaker:Dummy): Started yingying.site - rsc4 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc4 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) Transition Summary: * Start rsc1 (yingying.site) @@ -26,5 +26,5 @@ Online: [ yingying.site ] rsc1 (ocf::pacemaker:Dummy): Started yingying.site rsc2 (ocf::pacemaker:Dummy): Started yingying.site rsc3 (ocf::pacemaker:Dummy): Started yingying.site - rsc4 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc4 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) diff --git a/pengine/test10/unmanaged-master.exp b/pengine/test10/unmanaged-master.exp index d5a4225aa10..ed078c2d82a 100644 --- a/pengine/test10/unmanaged-master.exp +++ b/pengine/test10/unmanaged-master.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + diff --git a/pengine/test10/unmanaged-stop-1.summary b/pengine/test10/unmanaged-stop-1.summary index 6d1481325aa..978ddc1681d 100644 --- a/pengine/test10/unmanaged-stop-1.summary +++ b/pengine/test10/unmanaged-stop-1.summary @@ -1,9 +1,10 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ yingying.site ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) Transition Summary: * Stop rsc1 (yingying.site - blocked) @@ -13,6 +14,6 @@ Executing cluster transition: Revised cluster status: Online: [ yingying.site ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) diff --git a/pengine/test10/unmanaged-stop-2.summary b/pengine/test10/unmanaged-stop-2.summary index 6d1481325aa..978ddc1681d 100644 --- a/pengine/test10/unmanaged-stop-2.summary +++ b/pengine/test10/unmanaged-stop-2.summary @@ -1,9 +1,10 @@ +1 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ yingying.site ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) Transition Summary: * Stop rsc1 (yingying.site - blocked) @@ -13,6 +14,6 @@ Executing cluster transition: Revised cluster status: Online: [ yingying.site ] - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( blocked ) diff --git a/pengine/test10/unmanaged-stop-3.summary b/pengine/test10/unmanaged-stop-3.summary index 643e93f5b3e..74829a17462 100644 --- a/pengine/test10/unmanaged-stop-3.summary +++ b/pengine/test10/unmanaged-stop-3.summary @@ -1,10 +1,11 @@ +4 of 2 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ yingying.site ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( disabled, blocked ) Transition Summary: * Stop rsc1 (yingying.site - blocked) @@ -16,6 +17,6 @@ Revised cluster status: Online: [ yingying.site ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( disabled, blocked ) diff --git a/pengine/test10/unmanaged-stop-4.summary b/pengine/test10/unmanaged-stop-4.summary index cd81e392237..457e41f34a6 100644 --- a/pengine/test10/unmanaged-stop-4.summary +++ b/pengine/test10/unmanaged-stop-4.summary @@ -1,11 +1,12 @@ +6 of 3 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ yingying.site ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) - rsc3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( disabled, blocked ) + rsc3 (ocf::heartbeat:Dummy): Stopped ( disabled ) Transition Summary: * Stop rsc1 (yingying.site - blocked) @@ -17,7 +18,7 @@ Revised cluster status: Online: [ yingying.site ] Resource Group: group1 - rsc1 (ocf::pacemaker:Dummy): (target-role:Stopped) Started yingying.site - rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site (unmanaged) - rsc3 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + rsc1 (ocf::pacemaker:Dummy): Started yingying.site ( disabled ) + rsc2 (ocf::pacemaker:Dummy): FAILED yingying.site ( disabled, blocked ) + rsc3 (ocf::heartbeat:Dummy): Stopped ( disabled ) diff --git a/pengine/test10/use-after-free-merge.summary b/pengine/test10/use-after-free-merge.summary index 1e6cfd3bb60..dea0ae40ed5 100644 --- a/pengine/test10/use-after-free-merge.summary +++ b/pengine/test10/use-after-free-merge.summary @@ -1,11 +1,12 @@ +6 of 5 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ hex-13 hex-14 ] fencing-sbd (stonith:external/sbd): Stopped Resource Group: g0 - d0 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped - d1 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + d0 (ocf::heartbeat:Dummy): Stopped ( disabled ) + d1 (ocf::heartbeat:Dummy): Stopped ( disabled ) Master/Slave Set: ms0 [s0] Stopped: [ hex-13 hex-14 ] @@ -34,8 +35,8 @@ Online: [ hex-13 hex-14 ] fencing-sbd (stonith:external/sbd): Started hex-14 Resource Group: g0 - d0 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped - d1 (ocf::heartbeat:Dummy): (target-role:Stopped) Stopped + d0 (ocf::heartbeat:Dummy): Stopped ( disabled ) + d1 (ocf::heartbeat:Dummy): Stopped ( disabled ) Master/Slave Set: ms0 [s0] - Slaves: [ hex-13 hex-14 ] + Slaves (target-role): [ hex-13 hex-14 ] diff --git a/pengine/test10/utilization-order4.summary b/pengine/test10/utilization-order4.summary index 931546a11e8..efb59582c89 100644 --- a/pengine/test10/utilization-order4.summary +++ b/pengine/test10/utilization-order4.summary @@ -1,12 +1,13 @@ +2 of 13 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Node deglxen002: standby Online: [ deglxen001 ] degllx62-vm (ocf::heartbeat:Xen): Started deglxen002 - degllx63-vm (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + degllx63-vm (ocf::heartbeat:Xen): Stopped ( disabled ) degllx61-vm (ocf::heartbeat:Xen): Started deglxen001 - degllx64-vm (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + degllx64-vm (ocf::heartbeat:Xen): Stopped ( disabled ) stonith_sbd (stonith:external/sbd): Started deglxen001 Clone Set: clone-nfs [grp-nfs] Started: [ deglxen001 deglxen002 ] @@ -47,9 +48,9 @@ Node deglxen002: standby Online: [ deglxen001 ] degllx62-vm (ocf::heartbeat:Xen): Started deglxen001 - degllx63-vm (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + degllx63-vm (ocf::heartbeat:Xen): Stopped ( disabled ) degllx61-vm (ocf::heartbeat:Xen): Stopped deglxen002 - degllx64-vm (ocf::heartbeat:Xen): (target-role:Stopped) Stopped + degllx64-vm (ocf::heartbeat:Xen): Stopped ( disabled ) stonith_sbd (stonith:external/sbd): Started deglxen001 Clone Set: clone-nfs [grp-nfs] Started: [ deglxen001 ] diff --git a/pengine/test10/whitebox-asymmetric.summary b/pengine/test10/whitebox-asymmetric.summary index 6a562a48554..1c5011de9fd 100644 --- a/pengine/test10/whitebox-asymmetric.summary +++ b/pengine/test10/whitebox-asymmetric.summary @@ -1,3 +1,4 @@ +2 of 7 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ 18builder ] @@ -7,7 +8,7 @@ Online: [ 18builder ] webserver (ocf::pacemaker:Dummy): Stopped nfs_mount (ocf::pacemaker:Dummy): Stopped Resource Group: mygroup - vg_tags (ocf::heartbeat:LVM): (target-role:Stopped) Stopped + vg_tags (ocf::heartbeat:LVM): Stopped ( disabled ) vg_tags_dup (ocf::heartbeat:LVM): Stopped Transition Summary: @@ -29,6 +30,6 @@ Containers: [ 18node2:container2 ] webserver (ocf::pacemaker:Dummy): Stopped nfs_mount (ocf::pacemaker:Dummy): Started 18node2 Resource Group: mygroup - vg_tags (ocf::heartbeat:LVM): (target-role:Stopped) Stopped + vg_tags (ocf::heartbeat:LVM): Stopped ( disabled ) vg_tags_dup (ocf::heartbeat:LVM): Stopped diff --git a/pengine/test10/whitebox-fail1.exp b/pengine/test10/whitebox-fail1.exp index 32cdfe72fd2..9629a76afe6 100644 --- a/pengine/test10/whitebox-fail1.exp +++ b/pengine/test10/whitebox-fail1.exp @@ -194,6 +194,9 @@ + + + diff --git a/pengine/test10/whitebox-fail2.exp b/pengine/test10/whitebox-fail2.exp index 32cdfe72fd2..9629a76afe6 100644 --- a/pengine/test10/whitebox-fail2.exp +++ b/pengine/test10/whitebox-fail2.exp @@ -194,6 +194,9 @@ + + + diff --git a/pengine/test10/whitebox-imply-stop-on-fence.exp b/pengine/test10/whitebox-imply-stop-on-fence.exp index a777c6c238c..0bd42b76275 100644 --- a/pengine/test10/whitebox-imply-stop-on-fence.exp +++ b/pengine/test10/whitebox-imply-stop-on-fence.exp @@ -404,6 +404,11 @@ + + + + + diff --git a/pengine/test10/whitebox-move.exp b/pengine/test10/whitebox-move.exp index b0b06199465..a3c5aa872db 100644 --- a/pengine/test10/whitebox-move.exp +++ b/pengine/test10/whitebox-move.exp @@ -198,6 +198,9 @@ + + + diff --git a/pengine/test10/whitebox-ms-ordering-move.dot b/pengine/test10/whitebox-ms-ordering-move.dot new file mode 100644 index 00000000000..0e4df3c96bf --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.dot @@ -0,0 +1,52 @@ +digraph "g" { +"all_stopped" [ style=bold color="green" fontcolor="orange"] +"container1_start_0 rhel7-2" -> "lxc1_start_0 rhel7-2" [ style = bold] +"container1_start_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +"container1_stop_0 rhel7-1" -> "all_stopped" [ style = bold] +"container1_stop_0 rhel7-1" -> "container1_start_0 rhel7-2" [ style = bold] +"container1_stop_0 rhel7-1" [ style=bold color="green" fontcolor="black"] +"lxc-ms-master_demote_0" -> "lxc-ms-master_demoted_0" [ style = bold] +"lxc-ms-master_demote_0" -> "lxc-ms_demote_0 lxc1" [ style = bold] +"lxc-ms-master_demote_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_demoted_0" -> "lxc-ms-master_promote_0" [ style = bold] +"lxc-ms-master_demoted_0" -> "lxc-ms-master_start_0" [ style = bold] +"lxc-ms-master_demoted_0" -> "lxc-ms-master_stop_0" [ style = bold] +"lxc-ms-master_demoted_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_promote_0" -> "lxc-ms_promote_0 lxc1" [ style = bold] +"lxc-ms-master_promote_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_promoted_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_running_0" -> "lxc-ms-master_promote_0" [ style = bold] +"lxc-ms-master_running_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_start_0" -> "lxc-ms-master_running_0" [ style = bold] +"lxc-ms-master_start_0" -> "lxc-ms_start_0 lxc1" [ style = bold] +"lxc-ms-master_start_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_stop_0" -> "lxc-ms-master_stopped_0" [ style = bold] +"lxc-ms-master_stop_0" -> "lxc-ms_stop_0 lxc1" [ style = bold] +"lxc-ms-master_stop_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms-master_stopped_0" -> "lxc-ms-master_promote_0" [ style = bold] +"lxc-ms-master_stopped_0" -> "lxc-ms-master_start_0" [ style = bold] +"lxc-ms-master_stopped_0" [ style=bold color="green" fontcolor="orange"] +"lxc-ms_demote_0 lxc1" -> "lxc-ms-master_demoted_0" [ style = bold] +"lxc-ms_demote_0 lxc1" -> "lxc-ms_promote_0 lxc1" [ style = bold] +"lxc-ms_demote_0 lxc1" -> "lxc-ms_stop_0 lxc1" [ style = bold] +"lxc-ms_demote_0 lxc1" [ style=bold color="green" fontcolor="black"] +"lxc-ms_promote_0 lxc1" -> "lxc-ms-master_promoted_0" [ style = bold] +"lxc-ms_promote_0 lxc1" [ style=bold color="green" fontcolor="black"] +"lxc-ms_start_0 lxc1" -> "lxc-ms-master_running_0" [ style = bold] +"lxc-ms_start_0 lxc1" -> "lxc-ms_promote_0 lxc1" [ style = bold] +"lxc-ms_start_0 lxc1" [ style=bold color="green" fontcolor="black"] +"lxc-ms_stop_0 lxc1" -> "all_stopped" [ style = bold] +"lxc-ms_stop_0 lxc1" -> "lxc-ms-master_stopped_0" [ style = bold] +"lxc-ms_stop_0 lxc1" -> "lxc-ms_start_0 lxc1" [ style = bold] +"lxc-ms_stop_0 lxc1" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc-ms_stop_0 lxc1" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_30000 rhel7-2" [ style=bold color="green" fontcolor="black"] +"lxc1_start_0 rhel7-2" -> "lxc-ms_promote_0 lxc1" [ style = bold] +"lxc1_start_0 rhel7-2" -> "lxc-ms_start_0 lxc1" [ style = bold] +"lxc1_start_0 rhel7-2" -> "lxc1_monitor_30000 rhel7-2" [ style = bold] +"lxc1_start_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +"lxc1_stop_0 rhel7-1" -> "all_stopped" [ style = bold] +"lxc1_stop_0 rhel7-1" -> "container1_stop_0 rhel7-1" [ style = bold] +"lxc1_stop_0 rhel7-1" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_stop_0 rhel7-1" [ style=bold color="green" fontcolor="black"] +} diff --git a/pengine/test10/whitebox-ms-ordering-move.exp b/pengine/test10/whitebox-ms-ordering-move.exp new file mode 100644 index 00000000000..c2a4f543b17 --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.exp @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/whitebox-ms-ordering-move.scores b/pengine/test10/whitebox-ms-ordering-move.scores new file mode 100644 index 00000000000..290d160996d --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.scores @@ -0,0 +1,372 @@ +Allocation scores: +clone_color: Connectivity allocation score on lxc1: -INFINITY +clone_color: Connectivity allocation score on lxc2: -INFINITY +clone_color: Connectivity allocation score on rhel7-1: 0 +clone_color: Connectivity allocation score on rhel7-2: 0 +clone_color: Connectivity allocation score on rhel7-3: 0 +clone_color: Connectivity allocation score on rhel7-4: 0 +clone_color: Connectivity allocation score on rhel7-5: 0 +clone_color: lxc-ms-master allocation score on lxc1: INFINITY +clone_color: lxc-ms-master allocation score on lxc2: INFINITY +clone_color: lxc-ms-master allocation score on rhel7-1: 0 +clone_color: lxc-ms-master allocation score on rhel7-2: 0 +clone_color: lxc-ms-master allocation score on rhel7-3: 0 +clone_color: lxc-ms-master allocation score on rhel7-4: 0 +clone_color: lxc-ms-master allocation score on rhel7-5: 0 +clone_color: lxc-ms:0 allocation score on lxc1: INFINITY +clone_color: lxc-ms:0 allocation score on lxc2: INFINITY +clone_color: lxc-ms:0 allocation score on rhel7-1: 0 +clone_color: lxc-ms:0 allocation score on rhel7-2: 0 +clone_color: lxc-ms:0 allocation score on rhel7-3: 0 +clone_color: lxc-ms:0 allocation score on rhel7-4: 0 +clone_color: lxc-ms:0 allocation score on rhel7-5: 0 +clone_color: lxc-ms:1 allocation score on lxc1: INFINITY +clone_color: lxc-ms:1 allocation score on lxc2: INFINITY +clone_color: lxc-ms:1 allocation score on rhel7-1: 0 +clone_color: lxc-ms:1 allocation score on rhel7-2: 0 +clone_color: lxc-ms:1 allocation score on rhel7-3: 0 +clone_color: lxc-ms:1 allocation score on rhel7-4: 0 +clone_color: lxc-ms:1 allocation score on rhel7-5: 0 +clone_color: master-1 allocation score on lxc1: -INFINITY +clone_color: master-1 allocation score on lxc2: -INFINITY +clone_color: master-1 allocation score on rhel7-1: 0 +clone_color: master-1 allocation score on rhel7-2: 0 +clone_color: master-1 allocation score on rhel7-3: 0 +clone_color: master-1 allocation score on rhel7-4: 0 +clone_color: master-1 allocation score on rhel7-5: 0 +clone_color: ping-1:0 allocation score on lxc1: -INFINITY +clone_color: ping-1:0 allocation score on lxc2: -INFINITY +clone_color: ping-1:0 allocation score on rhel7-1: 0 +clone_color: ping-1:0 allocation score on rhel7-2: 0 +clone_color: ping-1:0 allocation score on rhel7-3: 1 +clone_color: ping-1:0 allocation score on rhel7-4: 0 +clone_color: ping-1:0 allocation score on rhel7-5: 0 +clone_color: ping-1:1 allocation score on lxc1: -INFINITY +clone_color: ping-1:1 allocation score on lxc2: -INFINITY +clone_color: ping-1:1 allocation score on rhel7-1: 1 +clone_color: ping-1:1 allocation score on rhel7-2: 0 +clone_color: ping-1:1 allocation score on rhel7-3: 0 +clone_color: ping-1:1 allocation score on rhel7-4: 0 +clone_color: ping-1:1 allocation score on rhel7-5: 0 +clone_color: ping-1:2 allocation score on lxc1: -INFINITY +clone_color: ping-1:2 allocation score on lxc2: -INFINITY +clone_color: ping-1:2 allocation score on rhel7-1: 0 +clone_color: ping-1:2 allocation score on rhel7-2: 1 +clone_color: ping-1:2 allocation score on rhel7-3: 0 +clone_color: ping-1:2 allocation score on rhel7-4: 0 +clone_color: ping-1:2 allocation score on rhel7-5: 0 +clone_color: ping-1:3 allocation score on lxc1: -INFINITY +clone_color: ping-1:3 allocation score on lxc2: -INFINITY +clone_color: ping-1:3 allocation score on rhel7-1: 0 +clone_color: ping-1:3 allocation score on rhel7-2: 0 +clone_color: ping-1:3 allocation score on rhel7-3: 0 +clone_color: ping-1:3 allocation score on rhel7-4: 1 +clone_color: ping-1:3 allocation score on rhel7-5: 0 +clone_color: ping-1:4 allocation score on lxc1: -INFINITY +clone_color: ping-1:4 allocation score on lxc2: -INFINITY +clone_color: ping-1:4 allocation score on rhel7-1: 0 +clone_color: ping-1:4 allocation score on rhel7-2: 0 +clone_color: ping-1:4 allocation score on rhel7-3: 0 +clone_color: ping-1:4 allocation score on rhel7-4: 0 +clone_color: ping-1:4 allocation score on rhel7-5: 1 +clone_color: ping-1:5 allocation score on lxc1: -INFINITY +clone_color: ping-1:5 allocation score on lxc2: -INFINITY +clone_color: ping-1:5 allocation score on rhel7-1: 0 +clone_color: ping-1:5 allocation score on rhel7-2: 0 +clone_color: ping-1:5 allocation score on rhel7-3: 0 +clone_color: ping-1:5 allocation score on rhel7-4: 0 +clone_color: ping-1:5 allocation score on rhel7-5: 0 +clone_color: ping-1:6 allocation score on lxc1: -INFINITY +clone_color: ping-1:6 allocation score on lxc2: -INFINITY +clone_color: ping-1:6 allocation score on rhel7-1: 0 +clone_color: ping-1:6 allocation score on rhel7-2: 0 +clone_color: ping-1:6 allocation score on rhel7-3: 0 +clone_color: ping-1:6 allocation score on rhel7-4: 0 +clone_color: ping-1:6 allocation score on rhel7-5: 0 +clone_color: stateful-1:0 allocation score on lxc1: -INFINITY +clone_color: stateful-1:0 allocation score on lxc2: -INFINITY +clone_color: stateful-1:0 allocation score on rhel7-1: 0 +clone_color: stateful-1:0 allocation score on rhel7-2: 0 +clone_color: stateful-1:0 allocation score on rhel7-3: 11 +clone_color: stateful-1:0 allocation score on rhel7-4: 0 +clone_color: stateful-1:0 allocation score on rhel7-5: 0 +clone_color: stateful-1:1 allocation score on lxc1: -INFINITY +clone_color: stateful-1:1 allocation score on lxc2: -INFINITY +clone_color: stateful-1:1 allocation score on rhel7-1: 6 +clone_color: stateful-1:1 allocation score on rhel7-2: 0 +clone_color: stateful-1:1 allocation score on rhel7-3: 0 +clone_color: stateful-1:1 allocation score on rhel7-4: 0 +clone_color: stateful-1:1 allocation score on rhel7-5: 0 +clone_color: stateful-1:2 allocation score on lxc1: -INFINITY +clone_color: stateful-1:2 allocation score on lxc2: -INFINITY +clone_color: stateful-1:2 allocation score on rhel7-1: 0 +clone_color: stateful-1:2 allocation score on rhel7-2: 6 +clone_color: stateful-1:2 allocation score on rhel7-3: 0 +clone_color: stateful-1:2 allocation score on rhel7-4: 0 +clone_color: stateful-1:2 allocation score on rhel7-5: 0 +clone_color: stateful-1:3 allocation score on lxc1: -INFINITY +clone_color: stateful-1:3 allocation score on lxc2: -INFINITY +clone_color: stateful-1:3 allocation score on rhel7-1: 0 +clone_color: stateful-1:3 allocation score on rhel7-2: 0 +clone_color: stateful-1:3 allocation score on rhel7-3: 0 +clone_color: stateful-1:3 allocation score on rhel7-4: 6 +clone_color: stateful-1:3 allocation score on rhel7-5: 0 +clone_color: stateful-1:4 allocation score on lxc1: -INFINITY +clone_color: stateful-1:4 allocation score on lxc2: -INFINITY +clone_color: stateful-1:4 allocation score on rhel7-1: 0 +clone_color: stateful-1:4 allocation score on rhel7-2: 0 +clone_color: stateful-1:4 allocation score on rhel7-3: 0 +clone_color: stateful-1:4 allocation score on rhel7-4: 0 +clone_color: stateful-1:4 allocation score on rhel7-5: 6 +group_color: group-1 allocation score on lxc1: 0 +group_color: group-1 allocation score on lxc2: 0 +group_color: group-1 allocation score on rhel7-1: 0 +group_color: group-1 allocation score on rhel7-2: 0 +group_color: group-1 allocation score on rhel7-3: 0 +group_color: group-1 allocation score on rhel7-4: 0 +group_color: group-1 allocation score on rhel7-5: 0 +group_color: petulant allocation score on lxc1: 0 +group_color: petulant allocation score on lxc2: 0 +group_color: petulant allocation score on rhel7-1: 0 +group_color: petulant allocation score on rhel7-2: 0 +group_color: petulant allocation score on rhel7-3: 0 +group_color: petulant allocation score on rhel7-4: 0 +group_color: petulant allocation score on rhel7-5: 0 +group_color: r192.168.122.207 allocation score on lxc1: 0 +group_color: r192.168.122.207 allocation score on lxc2: 0 +group_color: r192.168.122.207 allocation score on rhel7-1: 0 +group_color: r192.168.122.207 allocation score on rhel7-2: 0 +group_color: r192.168.122.207 allocation score on rhel7-3: 0 +group_color: r192.168.122.207 allocation score on rhel7-4: 0 +group_color: r192.168.122.207 allocation score on rhel7-5: 0 +group_color: r192.168.122.208 allocation score on lxc1: 0 +group_color: r192.168.122.208 allocation score on lxc2: 0 +group_color: r192.168.122.208 allocation score on rhel7-1: 0 +group_color: r192.168.122.208 allocation score on rhel7-2: 0 +group_color: r192.168.122.208 allocation score on rhel7-3: 0 +group_color: r192.168.122.208 allocation score on rhel7-4: 0 +group_color: r192.168.122.208 allocation score on rhel7-5: 0 +lxc-ms:0 promotion score on lxc1: INFINITY +lxc-ms:1 promotion score on lxc2: INFINITY +native_color: Fencing allocation score on lxc1: -INFINITY +native_color: Fencing allocation score on lxc2: -INFINITY +native_color: Fencing allocation score on rhel7-1: 0 +native_color: Fencing allocation score on rhel7-2: 0 +native_color: Fencing allocation score on rhel7-3: 0 +native_color: Fencing allocation score on rhel7-4: 0 +native_color: Fencing allocation score on rhel7-5: 0 +native_color: FencingFail allocation score on lxc1: -INFINITY +native_color: FencingFail allocation score on lxc2: -INFINITY +native_color: FencingFail allocation score on rhel7-1: 0 +native_color: FencingFail allocation score on rhel7-2: 0 +native_color: FencingFail allocation score on rhel7-3: 0 +native_color: FencingFail allocation score on rhel7-4: 0 +native_color: FencingFail allocation score on rhel7-5: 0 +native_color: FencingPass allocation score on lxc1: -INFINITY +native_color: FencingPass allocation score on lxc2: -INFINITY +native_color: FencingPass allocation score on rhel7-1: 0 +native_color: FencingPass allocation score on rhel7-2: 0 +native_color: FencingPass allocation score on rhel7-3: 0 +native_color: FencingPass allocation score on rhel7-4: 0 +native_color: FencingPass allocation score on rhel7-5: 0 +native_color: container1 allocation score on lxc1: -INFINITY +native_color: container1 allocation score on lxc2: -INFINITY +native_color: container1 allocation score on rhel7-1: 0 +native_color: container1 allocation score on rhel7-2: INFINITY +native_color: container1 allocation score on rhel7-3: 0 +native_color: container1 allocation score on rhel7-4: 0 +native_color: container1 allocation score on rhel7-5: 0 +native_color: container2 allocation score on lxc1: -INFINITY +native_color: container2 allocation score on lxc2: -INFINITY +native_color: container2 allocation score on rhel7-1: INFINITY +native_color: container2 allocation score on rhel7-2: 0 +native_color: container2 allocation score on rhel7-3: 0 +native_color: container2 allocation score on rhel7-4: 0 +native_color: container2 allocation score on rhel7-5: 0 +native_color: lsb-dummy allocation score on lxc1: -INFINITY +native_color: lsb-dummy allocation score on lxc2: -INFINITY +native_color: lsb-dummy allocation score on rhel7-1: -INFINITY +native_color: lsb-dummy allocation score on rhel7-2: -INFINITY +native_color: lsb-dummy allocation score on rhel7-3: 0 +native_color: lsb-dummy allocation score on rhel7-4: -INFINITY +native_color: lsb-dummy allocation score on rhel7-5: -INFINITY +native_color: lxc-ms:0 allocation score on lxc1: INFINITY +native_color: lxc-ms:0 allocation score on lxc2: INFINITY +native_color: lxc-ms:0 allocation score on rhel7-1: 0 +native_color: lxc-ms:0 allocation score on rhel7-2: 0 +native_color: lxc-ms:0 allocation score on rhel7-3: 0 +native_color: lxc-ms:0 allocation score on rhel7-4: 0 +native_color: lxc-ms:0 allocation score on rhel7-5: 0 +native_color: lxc-ms:1 allocation score on lxc1: -INFINITY +native_color: lxc-ms:1 allocation score on lxc2: INFINITY +native_color: lxc-ms:1 allocation score on rhel7-1: 0 +native_color: lxc-ms:1 allocation score on rhel7-2: 0 +native_color: lxc-ms:1 allocation score on rhel7-3: 0 +native_color: lxc-ms:1 allocation score on rhel7-4: 0 +native_color: lxc-ms:1 allocation score on rhel7-5: 0 +native_color: lxc1 allocation score on lxc1: -INFINITY +native_color: lxc1 allocation score on lxc2: -INFINITY +native_color: lxc1 allocation score on rhel7-1: -INFINITY +native_color: lxc1 allocation score on rhel7-2: 0 +native_color: lxc1 allocation score on rhel7-3: -INFINITY +native_color: lxc1 allocation score on rhel7-4: -INFINITY +native_color: lxc1 allocation score on rhel7-5: -INFINITY +native_color: lxc2 allocation score on lxc1: -INFINITY +native_color: lxc2 allocation score on lxc2: -INFINITY +native_color: lxc2 allocation score on rhel7-1: 0 +native_color: lxc2 allocation score on rhel7-2: -INFINITY +native_color: lxc2 allocation score on rhel7-3: -INFINITY +native_color: lxc2 allocation score on rhel7-4: -INFINITY +native_color: lxc2 allocation score on rhel7-5: -INFINITY +native_color: migrator allocation score on lxc1: 0 +native_color: migrator allocation score on lxc2: 0 +native_color: migrator allocation score on rhel7-1: 0 +native_color: migrator allocation score on rhel7-2: 0 +native_color: migrator allocation score on rhel7-3: 0 +native_color: migrator allocation score on rhel7-4: 1 +native_color: migrator allocation score on rhel7-5: 0 +native_color: petulant allocation score on lxc1: -INFINITY +native_color: petulant allocation score on lxc2: -INFINITY +native_color: petulant allocation score on rhel7-1: -INFINITY +native_color: petulant allocation score on rhel7-2: -INFINITY +native_color: petulant allocation score on rhel7-3: 0 +native_color: petulant allocation score on rhel7-4: -INFINITY +native_color: petulant allocation score on rhel7-5: -INFINITY +native_color: ping-1:0 allocation score on lxc1: -INFINITY +native_color: ping-1:0 allocation score on lxc2: -INFINITY +native_color: ping-1:0 allocation score on rhel7-1: 0 +native_color: ping-1:0 allocation score on rhel7-2: 0 +native_color: ping-1:0 allocation score on rhel7-3: 1 +native_color: ping-1:0 allocation score on rhel7-4: 0 +native_color: ping-1:0 allocation score on rhel7-5: 0 +native_color: ping-1:1 allocation score on lxc1: -INFINITY +native_color: ping-1:1 allocation score on lxc2: -INFINITY +native_color: ping-1:1 allocation score on rhel7-1: 1 +native_color: ping-1:1 allocation score on rhel7-2: 0 +native_color: ping-1:1 allocation score on rhel7-3: -INFINITY +native_color: ping-1:1 allocation score on rhel7-4: 0 +native_color: ping-1:1 allocation score on rhel7-5: -INFINITY +native_color: ping-1:2 allocation score on lxc1: -INFINITY +native_color: ping-1:2 allocation score on lxc2: -INFINITY +native_color: ping-1:2 allocation score on rhel7-1: -INFINITY +native_color: ping-1:2 allocation score on rhel7-2: 1 +native_color: ping-1:2 allocation score on rhel7-3: -INFINITY +native_color: ping-1:2 allocation score on rhel7-4: 0 +native_color: ping-1:2 allocation score on rhel7-5: -INFINITY +native_color: ping-1:3 allocation score on lxc1: -INFINITY +native_color: ping-1:3 allocation score on lxc2: -INFINITY +native_color: ping-1:3 allocation score on rhel7-1: -INFINITY +native_color: ping-1:3 allocation score on rhel7-2: -INFINITY +native_color: ping-1:3 allocation score on rhel7-3: -INFINITY +native_color: ping-1:3 allocation score on rhel7-4: 1 +native_color: ping-1:3 allocation score on rhel7-5: -INFINITY +native_color: ping-1:4 allocation score on lxc1: -INFINITY +native_color: ping-1:4 allocation score on lxc2: -INFINITY +native_color: ping-1:4 allocation score on rhel7-1: 0 +native_color: ping-1:4 allocation score on rhel7-2: 0 +native_color: ping-1:4 allocation score on rhel7-3: -INFINITY +native_color: ping-1:4 allocation score on rhel7-4: 0 +native_color: ping-1:4 allocation score on rhel7-5: 1 +native_color: ping-1:5 allocation score on lxc1: -INFINITY +native_color: ping-1:5 allocation score on lxc2: -INFINITY +native_color: ping-1:5 allocation score on rhel7-1: -INFINITY +native_color: ping-1:5 allocation score on rhel7-2: -INFINITY +native_color: ping-1:5 allocation score on rhel7-3: -INFINITY +native_color: ping-1:5 allocation score on rhel7-4: -INFINITY +native_color: ping-1:5 allocation score on rhel7-5: -INFINITY +native_color: ping-1:6 allocation score on lxc1: -INFINITY +native_color: ping-1:6 allocation score on lxc2: -INFINITY +native_color: ping-1:6 allocation score on rhel7-1: -INFINITY +native_color: ping-1:6 allocation score on rhel7-2: -INFINITY +native_color: ping-1:6 allocation score on rhel7-3: -INFINITY +native_color: ping-1:6 allocation score on rhel7-4: -INFINITY +native_color: ping-1:6 allocation score on rhel7-5: -INFINITY +native_color: r192.168.122.207 allocation score on lxc1: -INFINITY +native_color: r192.168.122.207 allocation score on lxc2: -INFINITY +native_color: r192.168.122.207 allocation score on rhel7-1: -INFINITY +native_color: r192.168.122.207 allocation score on rhel7-2: -INFINITY +native_color: r192.168.122.207 allocation score on rhel7-3: 11 +native_color: r192.168.122.207 allocation score on rhel7-4: -INFINITY +native_color: r192.168.122.207 allocation score on rhel7-5: -INFINITY +native_color: r192.168.122.208 allocation score on lxc1: -INFINITY +native_color: r192.168.122.208 allocation score on lxc2: -INFINITY +native_color: r192.168.122.208 allocation score on rhel7-1: -INFINITY +native_color: r192.168.122.208 allocation score on rhel7-2: -INFINITY +native_color: r192.168.122.208 allocation score on rhel7-3: 0 +native_color: r192.168.122.208 allocation score on rhel7-4: -INFINITY +native_color: r192.168.122.208 allocation score on rhel7-5: -INFINITY +native_color: rsc_rhel7-1 allocation score on lxc1: -INFINITY +native_color: rsc_rhel7-1 allocation score on lxc2: -INFINITY +native_color: rsc_rhel7-1 allocation score on rhel7-1: 100 +native_color: rsc_rhel7-1 allocation score on rhel7-2: 0 +native_color: rsc_rhel7-1 allocation score on rhel7-3: 0 +native_color: rsc_rhel7-1 allocation score on rhel7-4: 0 +native_color: rsc_rhel7-1 allocation score on rhel7-5: 0 +native_color: rsc_rhel7-2 allocation score on lxc1: -INFINITY +native_color: rsc_rhel7-2 allocation score on lxc2: -INFINITY +native_color: rsc_rhel7-2 allocation score on rhel7-1: 0 +native_color: rsc_rhel7-2 allocation score on rhel7-2: 100 +native_color: rsc_rhel7-2 allocation score on rhel7-3: 0 +native_color: rsc_rhel7-2 allocation score on rhel7-4: 0 +native_color: rsc_rhel7-2 allocation score on rhel7-5: 0 +native_color: rsc_rhel7-3 allocation score on lxc1: -INFINITY +native_color: rsc_rhel7-3 allocation score on lxc2: -INFINITY +native_color: rsc_rhel7-3 allocation score on rhel7-1: 0 +native_color: rsc_rhel7-3 allocation score on rhel7-2: 0 +native_color: rsc_rhel7-3 allocation score on rhel7-3: 100 +native_color: rsc_rhel7-3 allocation score on rhel7-4: 0 +native_color: rsc_rhel7-3 allocation score on rhel7-5: 0 +native_color: rsc_rhel7-4 allocation score on lxc1: -INFINITY +native_color: rsc_rhel7-4 allocation score on lxc2: -INFINITY +native_color: rsc_rhel7-4 allocation score on rhel7-1: 0 +native_color: rsc_rhel7-4 allocation score on rhel7-2: 0 +native_color: rsc_rhel7-4 allocation score on rhel7-3: 0 +native_color: rsc_rhel7-4 allocation score on rhel7-4: 100 +native_color: rsc_rhel7-4 allocation score on rhel7-5: 0 +native_color: rsc_rhel7-5 allocation score on lxc1: -INFINITY +native_color: rsc_rhel7-5 allocation score on lxc2: -INFINITY +native_color: rsc_rhel7-5 allocation score on rhel7-1: 0 +native_color: rsc_rhel7-5 allocation score on rhel7-2: 0 +native_color: rsc_rhel7-5 allocation score on rhel7-3: 0 +native_color: rsc_rhel7-5 allocation score on rhel7-4: 0 +native_color: rsc_rhel7-5 allocation score on rhel7-5: 100 +native_color: stateful-1:0 allocation score on lxc1: -INFINITY +native_color: stateful-1:0 allocation score on lxc2: -INFINITY +native_color: stateful-1:0 allocation score on rhel7-1: 0 +native_color: stateful-1:0 allocation score on rhel7-2: 0 +native_color: stateful-1:0 allocation score on rhel7-3: 11 +native_color: stateful-1:0 allocation score on rhel7-4: 0 +native_color: stateful-1:0 allocation score on rhel7-5: 0 +native_color: stateful-1:1 allocation score on lxc1: -INFINITY +native_color: stateful-1:1 allocation score on lxc2: -INFINITY +native_color: stateful-1:1 allocation score on rhel7-1: 6 +native_color: stateful-1:1 allocation score on rhel7-2: 0 +native_color: stateful-1:1 allocation score on rhel7-3: -INFINITY +native_color: stateful-1:1 allocation score on rhel7-4: 0 +native_color: stateful-1:1 allocation score on rhel7-5: -INFINITY +native_color: stateful-1:2 allocation score on lxc1: -INFINITY +native_color: stateful-1:2 allocation score on lxc2: -INFINITY +native_color: stateful-1:2 allocation score on rhel7-1: -INFINITY +native_color: stateful-1:2 allocation score on rhel7-2: 6 +native_color: stateful-1:2 allocation score on rhel7-3: -INFINITY +native_color: stateful-1:2 allocation score on rhel7-4: 0 +native_color: stateful-1:2 allocation score on rhel7-5: -INFINITY +native_color: stateful-1:3 allocation score on lxc1: -INFINITY +native_color: stateful-1:3 allocation score on lxc2: -INFINITY +native_color: stateful-1:3 allocation score on rhel7-1: -INFINITY +native_color: stateful-1:3 allocation score on rhel7-2: -INFINITY +native_color: stateful-1:3 allocation score on rhel7-3: -INFINITY +native_color: stateful-1:3 allocation score on rhel7-4: 6 +native_color: stateful-1:3 allocation score on rhel7-5: -INFINITY +native_color: stateful-1:4 allocation score on lxc1: -INFINITY +native_color: stateful-1:4 allocation score on lxc2: -INFINITY +native_color: stateful-1:4 allocation score on rhel7-1: 0 +native_color: stateful-1:4 allocation score on rhel7-2: 0 +native_color: stateful-1:4 allocation score on rhel7-3: -INFINITY +native_color: stateful-1:4 allocation score on rhel7-4: 0 +native_color: stateful-1:4 allocation score on rhel7-5: 6 +stateful-1:0 promotion score on rhel7-3: 10 +stateful-1:1 promotion score on rhel7-1: 5 +stateful-1:2 promotion score on rhel7-2: 5 +stateful-1:3 promotion score on rhel7-4: 5 +stateful-1:4 promotion score on rhel7-5: 5 diff --git a/pengine/test10/whitebox-ms-ordering-move.summary b/pengine/test10/whitebox-ms-ordering-move.summary new file mode 100644 index 00000000000..5777b84f0fa --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.summary @@ -0,0 +1,86 @@ + +Current cluster status: +Online: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] +Containers: [ lxc1:container1 lxc2:container2 ] + + Fencing (stonith:fence_xvm): Started rhel7-3 + FencingPass (stonith:fence_dummy): Started rhel7-4 + FencingFail (stonith:fence_dummy): Started rhel7-5 + rsc_rhel7-1 (ocf::heartbeat:IPaddr2): Started rhel7-1 + rsc_rhel7-2 (ocf::heartbeat:IPaddr2): Started rhel7-2 + rsc_rhel7-3 (ocf::heartbeat:IPaddr2): Started rhel7-3 + rsc_rhel7-4 (ocf::heartbeat:IPaddr2): Started rhel7-4 + rsc_rhel7-5 (ocf::heartbeat:IPaddr2): Started rhel7-5 + migrator (ocf::pacemaker:Dummy): Started rhel7-4 + Clone Set: Connectivity [ping-1] + Started: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] + Stopped: [ lxc1 lxc2 ] + Master/Slave Set: master-1 [stateful-1] + Masters: [ rhel7-3 ] + Slaves: [ rhel7-1 rhel7-2 rhel7-4 rhel7-5 ] + Resource Group: group-1 + r192.168.122.207 (ocf::heartbeat:IPaddr2): Started rhel7-3 + petulant (service:DummySD): Started rhel7-3 + r192.168.122.208 (ocf::heartbeat:IPaddr2): Started rhel7-3 + lsb-dummy (lsb:/usr/share/pacemaker/tests/cts/LSBDummy): Started rhel7-3 + container1 (ocf::heartbeat:VirtualDomain): Started rhel7-1 + container2 (ocf::heartbeat:VirtualDomain): Started rhel7-1 + Master/Slave Set: lxc-ms-master [lxc-ms] + Masters: [ lxc1 ] + Slaves: [ lxc2 ] + +Transition Summary: + * Move container1 (Started rhel7-1 -> rhel7-2) + * Restart lxc-ms:0 (Master lxc1) + * Move lxc1 (Started rhel7-1 -> rhel7-2) + +Executing cluster transition: + * Pseudo action: lxc-ms-master_demote_0 + * Resource action: lxc-ms demote on lxc1 + * Pseudo action: lxc-ms-master_demoted_0 + * Pseudo action: lxc-ms-master_stop_0 + * Resource action: lxc-ms stop on lxc1 + * Pseudo action: lxc-ms-master_stopped_0 + * Pseudo action: lxc-ms-master_start_0 + * Resource action: lxc1 stop on rhel7-1 + * Resource action: container1 stop on rhel7-1 + * Pseudo action: all_stopped + * Resource action: container1 start on rhel7-2 + * Resource action: lxc1 start on rhel7-2 + * Resource action: lxc-ms start on lxc1 + * Pseudo action: lxc-ms-master_running_0 + * Resource action: lxc1 monitor=30000 on rhel7-2 + * Pseudo action: lxc-ms-master_promote_0 + * Resource action: lxc-ms promote on lxc1 + * Pseudo action: lxc-ms-master_promoted_0 + +Revised cluster status: +Online: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] +Containers: [ lxc1:container1 lxc2:container2 ] + + Fencing (stonith:fence_xvm): Started rhel7-3 + FencingPass (stonith:fence_dummy): Started rhel7-4 + FencingFail (stonith:fence_dummy): Started rhel7-5 + rsc_rhel7-1 (ocf::heartbeat:IPaddr2): Started rhel7-1 + rsc_rhel7-2 (ocf::heartbeat:IPaddr2): Started rhel7-2 + rsc_rhel7-3 (ocf::heartbeat:IPaddr2): Started rhel7-3 + rsc_rhel7-4 (ocf::heartbeat:IPaddr2): Started rhel7-4 + rsc_rhel7-5 (ocf::heartbeat:IPaddr2): Started rhel7-5 + migrator (ocf::pacemaker:Dummy): Started rhel7-4 + Clone Set: Connectivity [ping-1] + Started: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] + Stopped: [ lxc1 lxc2 ] + Master/Slave Set: master-1 [stateful-1] + Masters: [ rhel7-3 ] + Slaves: [ rhel7-1 rhel7-2 rhel7-4 rhel7-5 ] + Resource Group: group-1 + r192.168.122.207 (ocf::heartbeat:IPaddr2): Started rhel7-3 + petulant (service:DummySD): Started rhel7-3 + r192.168.122.208 (ocf::heartbeat:IPaddr2): Started rhel7-3 + lsb-dummy (lsb:/usr/share/pacemaker/tests/cts/LSBDummy): Started rhel7-3 + container1 (ocf::heartbeat:VirtualDomain): Started rhel7-2 + container2 (ocf::heartbeat:VirtualDomain): Started rhel7-1 + Master/Slave Set: lxc-ms-master [lxc-ms] + Masters: [ lxc1 ] + Slaves: [ lxc2 ] + diff --git a/pengine/test10/whitebox-ms-ordering-move.xml b/pengine/test10/whitebox-ms-ordering-move.xml new file mode 100644 index 00000000000..d4ea46cc9e0 --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.xml @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/whitebox-ms-ordering.dot b/pengine/test10/whitebox-ms-ordering.dot index a830841dcd3..7f03a657fd5 100644 --- a/pengine/test10/whitebox-ms-ordering.dot +++ b/pengine/test10/whitebox-ms-ordering.dot @@ -42,7 +42,7 @@ "lxc-ms_demote_0 lxc1" -> "lxc-ms-master_demoted_0" [ style = bold] "lxc-ms_demote_0 lxc1" -> "lxc-ms_promote_0 lxc1" [ style = bold] "lxc-ms_demote_0 lxc1" -> "lxc-ms_stop_0 lxc1" [ style = bold] -"lxc-ms_demote_0 lxc1" [ style=bold color="green" fontcolor="black"] +"lxc-ms_demote_0 lxc1" [ style=bold color="green" fontcolor="orange"] "lxc-ms_monitor_0 18node1" -> "lxc-ms-master_start_0" [ style = bold] "lxc-ms_monitor_0 18node1" -> "lxc-ms_stop_0 lxc1" [ style = bold] "lxc-ms_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] @@ -70,7 +70,6 @@ "lxc-ms_stop_0 lxc2" -> "lxc-ms_start_0 lxc2" [ style = bold] "lxc-ms_stop_0 lxc2" [ style=bold color="green" fontcolor="orange"] "lxc1_monitor_30000 18node1" [ style=bold color="green" fontcolor="black"] -"lxc1_start_0 18node1" -> "lxc-ms_demote_0 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "lxc-ms_promote_0 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "lxc-ms_start_0 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "lxc1_monitor_30000 18node1" [ style = bold] diff --git a/pengine/test10/whitebox-ms-ordering.exp b/pengine/test10/whitebox-ms-ordering.exp index f92932653b9..0566f413bcf 100644 --- a/pengine/test10/whitebox-ms-ordering.exp +++ b/pengine/test10/whitebox-ms-ordering.exp @@ -100,7 +100,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -158,18 +158,14 @@ - - + - + - - - @@ -254,7 +250,7 @@ - + diff --git a/pengine/test10/whitebox-ms-ordering.summary b/pengine/test10/whitebox-ms-ordering.summary index c3b7a8334a2..d6bbaafb10b 100644 --- a/pengine/test10/whitebox-ms-ordering.summary +++ b/pengine/test10/whitebox-ms-ordering.summary @@ -29,17 +29,17 @@ Executing cluster transition: * Pseudo action: lxc-ms-master_demote_0 * Resource action: container1 start on 18node1 * Resource action: container2 start on 18node1 - * Resource action: lxc1 start on 18node1 - * Resource action: lxc2 start on 18node1 - * Resource action: lxc-ms demote on lxc1 + * Pseudo action: lxc-ms_demote_0 * Pseudo action: lxc-ms-master_demoted_0 * Pseudo action: lxc-ms-master_stop_0 - * Resource action: lxc1 monitor=30000 on 18node1 - * Resource action: lxc2 monitor=30000 on 18node1 + * Resource action: lxc1 start on 18node1 + * Resource action: lxc2 start on 18node1 * Pseudo action: lxc-ms_stop_0 * Pseudo action: lxc-ms_stop_0 * Pseudo action: lxc-ms-master_stopped_0 * Pseudo action: lxc-ms-master_start_0 + * Resource action: lxc1 monitor=30000 on 18node1 + * Resource action: lxc2 monitor=30000 on 18node1 * Pseudo action: all_stopped * Resource action: lxc-ms start on lxc1 * Resource action: lxc-ms start on lxc2 diff --git a/pengine/test10/whitebox-orphan-ms.exp b/pengine/test10/whitebox-orphan-ms.exp index 39cf5109faf..00accd7c2f2 100644 --- a/pengine/test10/whitebox-orphan-ms.exp +++ b/pengine/test10/whitebox-orphan-ms.exp @@ -78,6 +78,9 @@ + + + @@ -231,6 +234,9 @@ + + + diff --git a/pengine/test10/whitebox-orphaned.exp b/pengine/test10/whitebox-orphaned.exp index 8b2fed328ed..ccb85b34e24 100644 --- a/pengine/test10/whitebox-orphaned.exp +++ b/pengine/test10/whitebox-orphaned.exp @@ -139,6 +139,9 @@ + + + diff --git a/pengine/test10/whitebox-stop.exp b/pengine/test10/whitebox-stop.exp index 1df11cbf84f..66bc03b155c 100644 --- a/pengine/test10/whitebox-stop.exp +++ b/pengine/test10/whitebox-stop.exp @@ -88,6 +88,9 @@ + + + diff --git a/pengine/test10/whitebox-stop.summary b/pengine/test10/whitebox-stop.summary index 7925de1bf9e..b6a2954ffe0 100644 --- a/pengine/test10/whitebox-stop.summary +++ b/pengine/test10/whitebox-stop.summary @@ -1,9 +1,10 @@ +1 of 14 resources DISABLED and 0 BLOCKED from being started due to failures Current cluster status: Online: [ 18node1 18node2 18node3 ] Containers: [ lxc1:container1 lxc2:container2 ] - container1 (ocf::heartbeat:VirtualDomain): (target-role:Stopped) Started 18node2 + container1 (ocf::heartbeat:VirtualDomain): Started 18node2 ( disabled ) container2 (ocf::heartbeat:VirtualDomain): Started 18node2 shoot1 (stonith:fence_xvm): Started 18node3 Clone Set: M-clone [M] @@ -34,7 +35,7 @@ Revised cluster status: Online: [ 18node1 18node2 18node3 ] Containers: [ lxc2:container2 ] - container1 (ocf::heartbeat:VirtualDomain): (target-role:Stopped) Stopped + container1 (ocf::heartbeat:VirtualDomain): Stopped ( disabled ) container2 (ocf::heartbeat:VirtualDomain): Started 18node2 shoot1 (stonith:fence_xvm): Started 18node3 Clone Set: M-clone [M] diff --git a/pengine/utils.h b/pengine/utils.h index f579aa247cd..fc503be663a 100644 --- a/pengine/utils.h +++ b/pengine/utils.h @@ -2,7 +2,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/rpmlintrc b/rpmlintrc index 75b27879717..e762c6d4986 100644 --- a/rpmlintrc +++ b/rpmlintrc @@ -27,3 +27,12 @@ addFilter("W: hidden-file-or-dir /var/lib/pacemaker/gcov") addFilter("E: changelog-time-in-future") addFilter("pacemaker.src: W: strange-permission .* 0600") addFilter("enchant-dictionary-not-found en_US") + +# Isolation agents are hidden so they don't show up in agent list +addFilter("W: hidden-file-or-dir /usr/lib/ocf/resource.d/.isolation") + +# rpmlint doesn't like logrotate script being in pacemaker-cli package +addFilter("E: incoherent-logrotate-file /etc/logrotate.d/pacemaker") + +# buildbot builds the not-yet-released version +addFilter("W: incoherent-version-in-changelog") diff --git a/tools/attrd_updater.c b/tools/attrd_updater.c index 11462ee5d76..664e5b871d9 100644 --- a/tools/attrd_updater.c +++ b/tools/attrd_updater.c @@ -45,6 +45,8 @@ static struct crm_option long_options[] = { {"-spacer-",1, 0, '-', "\nCommands:"}, {"update", 1, 0, 'U', "Update the attribute's value in attrd. If this causes the value to change, it will also be updated in the cluster configuration"}, #ifdef HAVE_ATOMIC_ATTRD + {"update-both", 1, 0, 'B', "Update the attribute's value and time to wait (dampening) in attrd. If this causes the value or dampening to change, the attribute will also be written to the cluster configuration, so be aware that repeatedly changing the dampening reduces its effectiveness."}, + {"update-delay", 0, 0, 'Y', "Update the attribute's dampening in attrd (requires -d/--delay). If this causes the dampening to change, the attribute will also be written to the cluster configuration, so be aware that repeatedly changing the dampening reduces its effectiveness."}, {"query", 0, 0, 'Q', "\tQuery the attribute's value from attrd"}, #endif {"delete", 0, 0, 'D', "\tDelete the attribute in attrd. If a value was previously set, it will also be removed from the cluster configuration"}, @@ -142,6 +144,11 @@ main(int argc, char **argv) case 'q': break; #ifdef HAVE_ATOMIC_ATTRD + case 'Y': + command = flag; + crm_log_args(argc, argv); /* Too much? */ + break; + case 'B': case 'Q': #endif case 'R': diff --git a/tools/cib_shadow.c b/tools/cib_shadow.c index 000b0b05d37..2fe66f13027 100644 --- a/tools/cib_shadow.c +++ b/tools/cib_shadow.c @@ -78,7 +78,7 @@ shadow_setup(char *name, gboolean do_switch) if (strstr(shell, "bash")) { execl(shell, shell, "--norc", "--noprofile", NULL); } else { - execl(shell, shell, "--noprofile", NULL); + execl(shell, shell, NULL); } } else if (do_switch) { @@ -409,7 +409,7 @@ main(int argc, char **argv) rc = 0; goto done; - } else if (command == 'P') { + } else if (command == 'p') { /* display the current contents */ char *output_s = NULL; xmlNode *output = filename2xml(shadow_file); diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c index 159959a50ce..b977b91865d 100644 --- a/tools/crm_attribute.c +++ b/tools/crm_attribute.c @@ -260,6 +260,10 @@ main(int argc, char **argv) } if ((command == 'v' || command == 'D') +#if !HAVE_ATOMIC_ATTRD + /* Always send remote node attr directly to cib if it's legacy attrd */ + && is_remote_node == FALSE +#endif && safe_str_eq(type, XML_CIB_TAG_STATUS) && pcmk_ok == attrd_update_delegate(NULL, command, dest_uname, attr_name, attr_value, type, set_name, NULL, NULL, is_remote_node)) { diff --git a/tools/crm_mon.c b/tools/crm_mon.c index 46a59d6d907..1fee3913a1f 100644 --- a/tools/crm_mon.c +++ b/tools/crm_mon.c @@ -2277,13 +2277,27 @@ print_cluster_counts(FILE *stream, pe_working_set_t *data_set, const char *stack switch (output_format) { case mon_output_plain: case mon_output_console: - print_as("%d node%s and %d resource%s configured", - nnodes, s_if_plural(nnodes), - nresources, s_if_plural(nresources)); + if (stack_s && strstr(stack_s, "classic openais") != NULL) { print_as(", %s expected votes", quorum_votes); } + + if(is_set(data_set->flags, pe_flag_maintenance_mode)) { + print_as("\n *** Resource management is DISABLED ***"); + print_as("\n The cluster will not attempt to start, stop or recover services"); + print_as("\n"); + } + + print_as("\n%d node%s and %d resource%s configured", + nnodes, s_if_plural(nnodes), + nresources, s_if_plural(nresources)); + if(data_set->disabled_resources || data_set->blocked_resources) { + print_as(": %d resource%s DISABLED and %d BLOCKED from being started due to failures", + data_set->disabled_resources, s_if_plural(data_set->disabled_resources), + data_set->blocked_resources); + } print_as("\n\n"); + break; case mon_output_html: @@ -2412,32 +2426,35 @@ print_cluster_summary(FILE *stream, pe_working_set_t *data_set) const char *stack_s = get_cluster_stack(data_set); gboolean header_printed = FALSE; - if (show & mon_show_times) { + if (show & mon_show_stack) { if (header_printed == FALSE) { print_cluster_summary_header(stream); header_printed = TRUE; } - print_cluster_times(stream, data_set); + print_cluster_stack(stream, stack_s); } - if (show & mon_show_stack) { + /* Always print DC if none, even if not requested */ + if ((data_set->dc_node == NULL) || (show & mon_show_dc)) { if (header_printed == FALSE) { print_cluster_summary_header(stream); header_printed = TRUE; } - print_cluster_stack(stream, stack_s); + print_cluster_dc(stream, data_set); } - /* Always print DC if none, even if not requested */ - if ((data_set->dc_node == NULL) || (show & mon_show_dc)) { + if (show & mon_show_times) { if (header_printed == FALSE) { print_cluster_summary_header(stream); header_printed = TRUE; } - print_cluster_dc(stream, data_set); + print_cluster_times(stream, data_set); } - if (show & mon_show_count) { + if (is_set(data_set->flags, pe_flag_maintenance_mode) + || data_set->disabled_resources + || data_set->blocked_resources + || is_set(show, mon_show_count)) { if (header_printed == FALSE) { print_cluster_summary_header(stream); header_printed = TRUE; diff --git a/tools/crm_node.c b/tools/crm_node.c index 48ee7c44420..f685176f41d 100644 --- a/tools/crm_node.c +++ b/tools/crm_node.c @@ -344,7 +344,7 @@ try_pacemaker(int command, enum cluster_type_e stack) case 'p': /* Go to pacemakerd */ { - GMainLoop *amainloop = g_main_new(FALSE); + GMainLoop *amainloop = g_main_loop_new(NULL, FALSE); mainloop_io_t *ipc = mainloop_add_ipc_client(CRM_SYSTEM_MCP, G_PRIORITY_DEFAULT, 0, NULL, &node_callbacks); if (ipc != NULL) { diff --git a/tools/crm_report.in b/tools/crm_report.in index 6ad8656f908..c2a1b5e585a 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -20,11 +20,12 @@ # Note the quotes around `$TEMP': they are essential! TEMP=`getopt \ - -o hv?xl:f:t:n:T:Lp:c:dSACHu:D:MVse: \ - --long help,cts:,cts-log:,dest:,node:,nodes:,from:,to:logfile:,as-directory,single-node,cluster:,user:,max-depth:,version,features,rsh: \ + -o hv?xl:f:t:n:T:L:p:c:dSACHu:D:MVse: \ + --long help,cts:,cts-log:,dest:,node:,nodes:,from:,to:,sos-mode,logfile:,as-directory,single-node,cluster:,user:,max-depth:,version,features,rsh: \ -n 'crm_report' -- "$@"` eval set -- "$TEMP" +progname=$(basename "$0") rsh="ssh -T" times="" tests="" @@ -34,19 +35,18 @@ cluster="any" ssh_user="root" search_logs=1 report_data=`dirname $0` - +maxdepth=5 extra_logs="" sanitize_patterns="passw.*" log_patterns="CRIT: ERROR:" usage() { - cat<$l_base/.env + cat <$l_base/.env LABEL="$label" REPORT_HOME="$r_base" REPORT_MASTER="$host" @@ -179,7 +188,7 @@ maxdepth=$maxdepth EOF if [ $host = $node ]; then - cat<>$l_base/.env + cat <>$l_base/.env REPORT_HOME="$l_base" EOF cat $l_base/.env $report_data/report.common $report_data/report.collector > $l_base/collector @@ -365,69 +374,84 @@ do_cts() { done } -getnodes() { - if [ -z $1 ]; then - cluster=`get_cluster_type` - elif [ $1 = any ]; then - cluster=`get_cluster_type` - else - cluster=$1 - fi +node_names_from_xml() { + awk ' + /uname/ { + for( i=1; i<=NF; i++ ) + if( $i~/^uname=/ ) { + sub("uname=.","",$i); + sub("\".*","",$i); + print $i; + next; + } + } + ' | tr '\n' ' ' +} - if [ -z $HA_STATE_DIR ]; then - HA_STATE_DIR=/var/lib/heartbeat +getnodes() { + cluster="$1" + + # 1. Live (cluster nodes or Pacemaker Remote nodes) + # TODO: This will not detect Pacemaker Remote nodes unless they + # have ever had a permanent node attribute set, because it only + # searches the nodes section. It should also search the config + # for resources that create Pacemaker Remote nodes. + cib_nodes=$(cibadmin -Ql -o nodes 2>/dev/null) + if [ $? -eq 0 ]; then + debug "Querying CIB for nodes" + echo "$cib_nodes" | node_names_from_xml + return fi - cluster_cf=`find_cluster_cf $cluster` - # 1. Live - if - ps -ef | egrep -qs "[c]ib" - then - debug "Querying CIB for nodes" - cibadmin -Ql -o nodes | awk ' - /uname/ { - for( i=1; i<=NF; i++ ) - if( $i~/^uname=/ ) { - sub("uname=.","",$i); - sub("\".*","",$i); - print $i; - next; - } - } - ' | tr '\n' ' ' # 2. Saved - elif [ -f @CRM_CONFIG_DIR@/cib.xml ]; then + if [ -f "@CRM_CONFIG_DIR@/cib.xml" ]; then debug "Querying on-disk CIB for nodes" - grep "node " @CRM_CONFIG_DIR@/cib.xml | awk ' - /uname/ { - for( i=1; i<=NF; i++ ) - if( $i~/^uname=/ ) { - sub("uname=.","",$i); - sub("\".*","",$i); - print $i; - next; - } - } - ' | tr '\n' ' ' + grep "node " "@CRM_CONFIG_DIR@/cib.xml" | node_names_from_xml + return + fi # 3. hostcache - elif [ -f $HA_STATE_DIR/hostcache ]; then + if [ -z "$HA_STATE_DIR" ]; then + HA_STATE_DIR=/var/lib/heartbeat + fi + if [ -f "$HA_STATE_DIR/hostcache" ]; then debug "Reading nodes from $HA_STATE_DIR/hostcache" - awk '{print $1}' $HA_STATE_DIR/hostcache + awk '{print $1}' "$HA_STATE_DIR/hostcache" + return + fi # 4. ha.cf - elif [ "x$cluster" = "xheartbeat" ]; then + if [ "x$cluster" = "xheartbeat" ]; then + cluster_cf=$(find_cluster_cf $cluster) debug "Reading nodes from $cluster_cf" - getcfvar $cluster node $cluster_cf + getcfvar $cluster node "$cluster_cf" + return + fi # 5. logs - else - # Look in the logs... - logfile=`findmsg 1 "crm_update_peer"` - debug "Reading nodes from $logfile" - if [ ! -z "$logfile" ]; then - grep crm_update_peer: $logfile | sed s/.*crm_update_peer// | sed s/://g | awk '{print $2}' | grep -v "(null)" | sort -u | tr '\n' ' ' - fi + # TODO: This has multiple issues: + # * It looks for messages from crm_update_peer(), which is used only by + # heartbeat and legacy plugin clusters; it should work with CMAN and + # corosync2 clusters as well. + # * It does a findmsg for "crm_update_peer" (which will hit + # "crm_update_peer_proc" etc.), but then greps for "crm_update_peer:". + # * It always uses grep, even though $logfile might be compressed. + # For this reason and efficiency, it would nice if findmsg could + # optionally print the matches instead of the file names. + # * It would be nice to skip this step for Pacemaker Remote nodes since their + # logs will not have node names, but it is nontrivial to know that. + # Cluster nodes generally won't get here, but stopped Pacemaker Remote + # nodes will. + logfile=$(findmsg 1 "crm_update_peer") + debug "Looking for nodes in $logfile" + if [ ! -z "$logfile" ]; then + grep crm_update_peer: "$logfile" \ + | sed s/.*crm_update_peer// \ + | sed s/://g \ + | awk '{print $2}' \ + | grep -v "(null)" \ + | sort -u \ + | tr '\n' ' ' fi } @@ -451,13 +475,19 @@ elif [ "x$start_time" != "x" ]; then log "" fi - if [ -z "$nodes" ]; then - nodes=`getnodes $cluster` - log "Calculated node list: $nodes" + # If user didn't specify a cluster stack, make a best guess if possible. + if [ -z "$cluster" ] || [ "$cluster" = "any" ]; then + cluster=$(get_cluster_type) fi + # If user didn't specify node(s), make a best guess if possible. if [ -z "$nodes" ]; then - fatal "Cannot determine node list, please specify manually with --nodes" + nodes=`getnodes $cluster` + if [ -n "$nodes" ]; then + log "Calculated node list: $nodes" + else + fatal "Cannot determine nodes; specify --nodes or --single-node" + fi fi if @@ -479,3 +509,5 @@ elif [ "x$start_time" != "x" ]; then else fatal "Not sure what to do, no tests or time ranges to extract" fi + +# vim: set expandtab tabstop=8 softtabstop=4 shiftwidth=4 textwidth=80: diff --git a/tools/crm_resource.c b/tools/crm_resource.c index f5b63d4c553..52eb8d20b1f 100644 --- a/tools/crm_resource.c +++ b/tools/crm_resource.c @@ -659,7 +659,21 @@ main(int argc, char **argv) } } else if (rsc_cmd == 0 && rsc_long_cmd && safe_str_eq(rsc_long_cmd, "restart")) { - resource_t *rsc = pe_find_resource(data_set.resources, rsc_id); + resource_t *rsc = NULL; + + rc = -ENXIO; + if (rsc_id == NULL) { + CMD_ERR("Must supply a resource id with -r"); + goto bail; + } + + rsc = pe_find_resource(data_set.resources, rsc_id); + + rc = -EINVAL; + if (rsc == NULL) { + CMD_ERR("Resource '%s' not restarted: unknown", rsc_id); + goto bail; + } rc = cli_resource_restart(rsc, host_uname, timeout_ms, cib_conn); diff --git a/tools/crm_resource.h b/tools/crm_resource.h index d4c3b051272..385b13ec970 100644 --- a/tools/crm_resource.h +++ b/tools/crm_resource.h @@ -3,7 +3,7 @@ * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * @@ -12,7 +12,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c index 5440fe9f712..6d8a94d5354 100644 --- a/tools/crm_resource_runtime.c +++ b/tools/crm_resource_runtime.c @@ -584,6 +584,28 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op, return rc; } +static int +cli_delete_attr(cib_t * cib_conn, const char * host_uname, const char * attr_name, + pe_working_set_t * data_set) +{ + node_t *node = pe_find_node(data_set->nodes, host_uname); + + if (node == NULL) { + CMD_ERR("Error deleting attribute '%s': node '%s' is unknown", attr_name, host_uname); + return -ENXIO; + } + +#if !HAVE_ATOMIC_ATTRD + if (is_remote_node(node)) { + /* Talk directly to cib for remote nodes if it's legacy attrd */ + return delete_attr_delegate(cib_conn, cib_sync_call, XML_CIB_TAG_STATUS, node->details->id, NULL, NULL, + NULL, attr_name, NULL, FALSE, NULL); + } +#endif + return attrd_update_delegate(NULL, 'D', node->details->uname, attr_name, NULL, XML_CIB_TAG_STATUS, NULL, + NULL, NULL, node ? is_remote_node(node) : FALSE); +} + int cli_resource_delete(cib_t *cib_conn, crm_ipc_t * crmd_channel, const char *host_uname, resource_t * rsc, pe_working_set_t * data_set) @@ -652,8 +674,7 @@ cli_resource_delete(cib_t *cib_conn, crm_ipc_t * crmd_channel, const char *host_ } printf(", removing %s\n", attr_name); - rc = attrd_update_delegate(NULL, 'D', host_uname, attr_name, NULL, XML_CIB_TAG_STATUS, NULL, - NULL, NULL, node ? is_remote_node(node) : FALSE); + rc = cli_delete_attr(cib_conn, host_uname, attr_name, data_set); free(attr_name); } else if(rc != -EOPNOTSUPP) { @@ -838,7 +859,7 @@ static void dump_list(GList *items, const char *tag) GList *item = NULL; for (item = items; item != NULL; item = item->next) { - crm_trace("%s[%d]: %s", tag, lpc, item->data); + crm_trace("%s[%d]: %s", tag, lpc, (char*)item->data); lpc++; } } diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c index 7d0a8eb3466..e870688805c 100644 --- a/tools/crm_simulate.c +++ b/tools/crm_simulate.c @@ -583,6 +583,26 @@ profile_all(const char *dir) return lpc; } +static int +count_resources(pe_working_set_t * data_set, resource_t * rsc) +{ + int count = 0; + GListPtr gIter = NULL; + + if (rsc == NULL) { + gIter = data_set->resources; + } else if (rsc->children) { + gIter = rsc->children; + } else { + return is_not_set(rsc->flags, pe_rsc_orphan); + } + + for (; gIter != NULL; gIter = gIter->next) { + count += count_resources(data_set, gIter->data); + } + return count; +} + int main(int argc, char **argv) { @@ -798,6 +818,17 @@ main(int argc, char **argv) if (quiet == FALSE) { int options = print_pending ? pe_print_pending : 0; + if(is_set(data_set.flags, pe_flag_maintenance_mode)) { + quiet_log("\n *** Resource management is DISABLED ***"); + quiet_log("\n The cluster will not attempt to start, stop or recover services"); + quiet_log("\n"); + } + + if(data_set.disabled_resources || data_set.blocked_resources) { + quiet_log("%d of %d resources DISABLED and %d BLOCKED from being started due to failures\n", + data_set.disabled_resources, count_resources(&data_set, NULL), data_set.blocked_resources); + } + quiet_log("\nCurrent cluster status:\n"); print_cluster_status(&data_set, options); } diff --git a/tools/report.collector b/tools/report.collector index 6c0ca4070db..8386f6bdac8 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -133,10 +133,13 @@ chk_id() { check_perms() { while read type f p uid gid; do - [ -$type $f ] || { - echo "$f wrong type or doesn't exist" - continue - } + if [ ! -e "$f" ]; then + echo "$f doesn't exist" + continue + elif [ ! -$type "$f" ]; then + echo "$f has wrong type" + continue + fi n_uid=`num_id passwd $uid` chk_id "$uid" "$n_uid" || continue n_gid=`num_id group $gid` @@ -210,6 +213,11 @@ getbt() { done } +dump_status_and_config() { + crm_mon -1 2>&1 | grep -v '^Last upd' > $target/$CRM_MON_F + cibadmin -Ql 2>/dev/null > $target/${CIB_F}.live +} + getconfig() { cluster=$1; shift; target=$1; shift; @@ -220,13 +228,12 @@ getconfig() { fi done - crm_uuid -r > $target/$HB_UUID_F 2>&1 + if which crm_uuid >/dev/null 2>&1; then + crm_uuid -r > $target/$HB_UUID_F 2>&1 + fi - if - ps -ef | egrep -qs [c]rmd - then - crm_mon -1 2>&1 | grep -v '^Last upd' > $target/$CRM_MON_F - cibadmin -Ql 2>/dev/null > $target/${CIB_F}.live + if is_running crmd; then + dump_status_and_config case $cluster in cman) crm_node -p --cman > $target/$MEMBERSHIP_F 2>&1;; corosync|openais) crm_node -p --openais > $target/$MEMBERSHIP_F 2>&1;; @@ -234,13 +241,22 @@ getconfig() { *) crm_node -p > $target/$MEMBERSHIP_F 2>&1;; esac echo "$host" > $target/RUNNING + + elif is_running pacemaker_remoted; then + dump_status_and_config + echo "$host" > $target/RUNNING + else echo "$host" > $target/STOPPED fi if [ -f "$target/$CIB_F" ]; then crm_verify -V -x $target/$CIB_F >$target/$CRM_VERIFY_F 2>&1 - CIB_file=$target/$CIB_F crm configure show >$target/$CIB_TXT_F 2>&1 + if which crm >/dev/null 2>&1 ; then + CIB_file=$target/$CIB_F crm configure show >$target/$CIB_TXT_F 2>&1 + elif which pcs >/dev/null 2>&1 ; then + pcs config -f $target/$CIB_F >$target/$CIB_TXT_F 2>&1 + fi fi } @@ -314,7 +330,7 @@ distro() { if which lsb_release >/dev/null 2>&1 then - lsb_release -d + lsb_release -d | sed -e 's/^Description:\s*//' debug "Using lsb_release for distribution info" return fi @@ -349,10 +365,11 @@ pkg_ver() { debug "The package manager is: $pkg_mgr" echo "The package manager is: $pkg_mgr" - # for Linux .deb based systems + echo "Installed packages:" case $pkg_mgr in deb) dpkg-query -f '${Package} ${Version} ${Architecture}\n' -W | sort + echo for pkg in $*; do if dpkg-query -W $pkg 2>/dev/null ; then debug "Verifying installation of: $pkg" @@ -363,6 +380,7 @@ pkg_ver() { ;; rpm) rpm -qa --qf '%{name} %{version}-%{release} - %{distribution} %{arch}\n' | sort + echo for pkg in $*; do if rpm -q $pkg >/dev/null 2>&1 ; then debug "Verifying installation of: $pkg" @@ -395,7 +413,7 @@ getbacktraces() { # Make a copy of them in case we need more data later # Luckily they compress well - mkdir cores &> /dev/null + mkdir cores >/dev/null 2>&1 cp -a $flist cores/ shrink cores rm -rf cores @@ -408,12 +426,14 @@ getbacktraces() { } getpeinputs() { - flist=$( - find_files $PE_STATE_DIR $1 $2 | sed "s,`dirname $PE_STATE_DIR`/,,g" - ) - if [ "$flist" ]; then - (cd `dirname $PE_STATE_DIR` && tar cf - $flist) | (cd $3 && tar xf -) - debug "found `echo $flist | wc -w` pengine input files in $PE_STATE_DIR" + if [ -n "$PE_STATE_DIR" ]; then + flist=$( + find_files "$PE_STATE_DIR" "$1" "$2" | sed "s,`dirname $PE_STATE_DIR`/,,g" + ) + if [ "$flist" ]; then + (cd $(dirname "$PE_STATE_DIR") && tar cf - $flist) | (cd "$3" && tar xf -) + debug "found `echo $flist | wc -w` pengine input files in $PE_STATE_DIR" + fi fi } @@ -424,7 +444,7 @@ getblackboxes() { for bb in $flist; do bb_short=`basename $bb` - qb-blackbox $bb &> $3/${bb_short}.blackbox + qb-blackbox $bb > $3/${bb_short}.blackbox 2>&1 info "Extracting contents of blackbox: $bb_short" done } @@ -441,21 +461,22 @@ sys_info() { echo "Distribution: `distro`" fi - cibadmin --version 2>&1 + echo + cibadmin --version 2>&1 | head -1 cibadmin -! 2>&1 - case $1 in + case $cluster in openais) - : echo "openais version: how?" + echo openais # version: how? ;; cman) - cman_tool -V - /usr/sbin/corosync -v 2>&1 + cman_tool -V 2>&1 | head -1 + /usr/sbin/corosync -v 2>&1 | head -1 ;; corosync) - /usr/sbin/corosync -v 2>&1 + /usr/sbin/corosync -v 2>&1 | head -1 ;; heartbeat) - heartbeat version: `$CRM_DAEMON_DIR/heartbeat -V` 2>&1 + echo heartbeat $($CRM_DAEMON_DIR/heartbeat -V 2>&1) ;; esac @@ -465,6 +486,7 @@ sys_info() { # Resource agents version hash echo "resource-agents: `grep 'Build version:' /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs`" + echo pkg_ver $* } @@ -491,9 +513,7 @@ sys_stats() { dlm_dump() { if which dlm_tool >/dev/null 2>&1 ; then - if - ps -ef | egrep -qs '[d]lm_controld' - then + if is_running dlm_controld; then echo "--- Lockspace overview:" dlm_tool ls -n @@ -551,48 +571,49 @@ get_logfiles() { facility_var="logfacility" if [ -f "$cf_logd" ]; then + # TODO: this call is broken, it expects args if uselogd; then cf_file="$cf_logd" cf_type="logd" fi fi - debug "Reading $cf_type log settings" case $cf_type in cman|openais|corosync) - debug "Reading log settings from $cf_file" - if iscfvartrue $cf_type to_syslog $cf_file; then - facility_var=syslog_facility - fi - if iscfvartrue $cf_type to_logfile $cf_file; then - logfile=`getcfvar $cf_type logfile $cf_file` - fi + if [ -f "$cf_file" ]; then + debug "Reading $cf_type log settings from $cf_file" + if iscfvartrue $cf_type to_syslog "$cf_file"; then + facility_var=syslog_facility + fi + if iscfvartrue $cf_type to_logfile "$cf_file"; then + logfile=$(getcfvar $cf_type logfile "$cf_file") + fi + fi ;; heartbeat|logd) - debug "Reading log settings from $cf_file" - if - iscfvartrue $cf_type debug $cf_file - then - logfile=`getcfvar $cf_type debugfile $cf_file` - else - logfile=`getcfvar $cf_type logfile $cf_file` - fi + if [ -f "$cf_file" ]; then + debug "Reading $cf_type log settings from $cf_file" + if iscfvartrue $cf_type debug "$cf_file"; then + logfile=$(getcfvar $cf_type debugfile "$cf_file") + else + logfile=$(getcfvar $cf_type logfile "$cf_file") + fi + fi ;; - *) debug "Unknown cluster type: $cf_type" - echo "/var/log/messages" - ;; esac - if [ "x$logfile" != "x" -a -f "$logfile" ]; then + if [ -z "$logfile" ]; then + logfile="/var/log/pacemaker.log" + debug "Log settings not found for cluster type $cf_type, assuming $logfile" + fi + if [ -f "$logfile" ]; then echo $logfile fi + if [ "x$facility" = x ]; then facility=`getcfvar $cf_type $facility_var $cf_file` [ "" = "$facility" ] && facility="daemon" fi - if [ "x$facility" = x ]; then - facility="daemon" - fi # Always include system logs (if we can find them) msg="Mark:pcmk:`perl -e 'print time()'`" @@ -600,17 +621,21 @@ get_logfiles() { sleep 2 # Give syslog time to catch up in case its busy findmsg 1 "$msg" - # Initial pacemakerd logs and tracing might also go to a file (other than the syslog log file) - findmsg 3 "Starting Pacemaker" + # Look for detail logs: - # Make sure we get something from the Policy Engine - findmsg 3 "Calculated Transition" + # - initial pacemakerd logs and tracing might go to a different file + pattern="Starting Pacemaker" - # These patterns look for cib and lrmd updates - # Helpful on non-DC nodes or when the cluster has been up for a long time - findmsg 3 cib_perform_op - findmsg 3 process_lrm_event + # - make sure we get something from the Policy Engine + pattern="$pattern\\|Calculated Transition" + # - cib and lrmd updates (helpful on non-DC nodes or when the cluster has been up for a long time) + pattern="$pattern\\|cib_perform_op\\|process_lrm_event" + + # - pacemaker_remote might use a different file + pattern="$pattern\\|pacemaker_remoted:" + + findmsg 3 "$pattern" } essential_files() { @@ -649,7 +674,10 @@ esac logd_cf=`findlogdcf` cluster_cf=`find_cluster_cf $cluster` -if [ -z $cluster_cf ]; then + +# If cluster stack is still "any", this might be a Pacemaker Remote node, +# so don't complain in that case. +if [ -z "$cluster_cf" ] && [ $cluster != "any" ]; then warning "Could not determine the location of your cluster configuration" fi @@ -659,14 +687,14 @@ if [ $SEARCH_LOGS = 1 ]; then fatal "Logfile discovery disabled, try specifying --logfile /some/path" fi -elif [ -z "$extra_logs" ]; then +elif [ -z "$EXTRA_LOGS" ]; then fatal "Could not determine the location of your cluster logs, try specifying --logfile /some/path" else - logfiles="$extra_logs" + logfiles="$EXTRA_LOGS" fi -debug "Config: $cluster $cluster_cf $logd_cf $logfiles" +debug "Config: $cluster ($cluster_cf $logd_cf) $logfiles" sys_info $cluster $PACKAGES > $SYSINFO_F essential_files $cluster | check_perms > $PERMISSIONS_F 2>&1 @@ -678,19 +706,16 @@ getblackboxes $LOG_START $LOG_END $REPORT_HOME/$REPORT_TARGET case $cluster in cman|corosync) - if - ps -ef | egrep -qs '[c]orosync' - then - corosync-blackbox &> corosync-blackbox-live.txt + if is_running corosync; then + corosync-blackbox >corosync-blackbox-live.txt 2>&1 +# corosync-fplay > corosync-blackbox.txt + tool=`pickfirst corosync-objctl corosync-cmapctl` + case $tool in + *objctl) $tool -a > corosync.dump 2>/dev/null;; + *cmapctl) $tool > corosync.dump 2>/dev/null;; + esac + corosync-quorumtool -s -i > corosync.quorum 2>&1 fi -# corosync-fplay > corosync-blackbox.txt - - tool=`pickfirst corosync-objctl corosync-cmapctl` - case $tool in - *objctl) $tool -a > corosync.dump 2>/dev/null;; - *cmapctl) $tool > corosync.dump 2>/dev/null;; - esac - corosync-quorumtool -s -i > corosync.quorum 2>&1 ;; esac @@ -728,7 +753,8 @@ for p in $LOG_PATTERNS; do done > $pattfile for l in $logfiles $EXTRA_LOGS; do - b=`basename $l` + b="$(basename $l).extract.txt" + if [ ! -f "$l" ]; then # Not a file continue @@ -737,9 +763,12 @@ for l in $logfiles $EXTRA_LOGS; do # We already have it continue fi + dumplogset "$l" $LOG_START $LOG_END > "$b" + sanitize "$b" + echo "Log patterns $REPORT_TARGET:" > $ANALYSIS_F - cat $b | grep -f $pattfile >> $ANALYSIS_F + grep -f "$pattfile" "$b" >> $ANALYSIS_F done which journalctl > /dev/null 2>&1 @@ -768,12 +797,12 @@ done # Parse for events for l in $logfiles $EXTRA_LOGS; do - node_events `basename $l` > $EVENTS_F + b="$(basename $l).extract.txt" + node_events "$b" > $EVENTS_F # Link the first logfile to a standard name if it doesn't yet exist - f=`basename $l` - if [ -e $f -a ! -e $HALOG_F ]; then - ln -s $f $HALOG_F + if [ -e "$b" -a ! -e "$HALOG_F" ]; then + ln -s "$b" "$HALOG_F" fi done @@ -788,3 +817,5 @@ elif [ "$REPORT_MASTER" != "$REPORT_TARGET" ]; then rm -rf $REPORT_HOME fi fi + +# vim: set expandtab tabstop=8 softtabstop=4 shiftwidth=4 textwidth=80: diff --git a/tools/report.common.in b/tools/report.common.in index 9dc57695d2d..f9ed6f5355f 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -53,8 +53,11 @@ stonith te_fence_node|stonith-ng.*log_oper.*report|stonithd.*(requests|(Succeed start_stop sutdown.decision|Starting.heartbeat|Corosync.Cluster.Engine|corosync.*Initializing.transport|Executive.Service.RELEASE|crm_shutdown:.Requesting.shutdown|pcmk_shutdown:.Shutdown.complete " -PACKAGES="pacemaker pacemaker-libs libpacemaker3 -pacemaker-pygui pacemaker-pymgmt pymgmt-client +# superset of all packages of interest on all distros +# (the package manager will be used to validate the installation +# of any of these packages that are installed) +PACKAGES="pacemaker pacemaker-libs pacemaker-cluster-libs libpacemaker3 +pacemaker-remote pacemaker-pygui pacemaker-pymgmt pymgmt-client openais libopenais2 libopenais3 corosync libcorosync4 resource-agents cluster-glue-libs cluster-glue libglue2 ldirectord heartbeat heartbeat-common heartbeat-resources libheartbeat2 @@ -69,6 +72,16 @@ kernel-default kernel-pae kernel-xen glibc " +# Potential locations of system log files +SYSLOGS=" + /var/log/* + /var/logs/* + /var/syslog/* + /var/adm/* + /var/log/ha/* + /var/log/cluster/* +" + # # keep the user posted # @@ -93,8 +106,9 @@ log() { debug() { if [ $verbose -gt 0 ]; then log "Debug: $*" + else + record "Debug: $*" fi - record "Debug: $*" } info() { @@ -110,101 +124,138 @@ fatal() { exit 1 } -detect_host() { - if [ -z "$maxdepth" ]; then - depth="-maxdepth 5" - else - depth="-maxdepth $maxdepth" +is_running() { + ps -ef | egrep -qs $(echo "$1" | sed -e 's/^\(.\)/[\1]/') +} + +has_remoted() { + # TODO: the binary might be elsewhere + if which pacemaker_remoted >/dev/null 2>&1; then + return 0 + elif [ -x "@sbindir@/pacemaker_remoted" ]; then + return 0 fi + return 1 +} - local_state_dir=@localstatedir@ +# found_dir +found_dir() { + echo "$2" + info "Pacemaker $1 found in: $2" +} - if [ -d $local_state_dir/run ]; then - CRM_STATE_DIR=$local_state_dir/run/crm +detect_daemon_dir() { + info "Searching for where Pacemaker daemons live... this may take a while" + + for d in \ + {/usr,/usr/local,/opt/local,@exec_prefix@}/{libexec,lib64,lib}/{pacemaker,heartbeat} + do + # pacemaker and pacemaker-cts packages can install to daemon directory, + # so check for a file from each + if [ -e $d/pengine ] || [ -e $d/lrmd_test ]; then + found_dir "daemons" "$d" + return + fi + done + + for f in $(find / -maxdepth $maxdepth -type f -name pengine -o -name lrmd_test); do + d=$(dirname "$f") + found_dir "daemons" "$d" + return + done + + # Pacemaker Remote nodes don't need to install daemons + if has_remoted; then + info "Not found (this appears to be a Pacemaker Remote node)" else - info "Searching for where Pacemaker keeps runtime data... this may take a while" - for d in `find / $depth -type d -name run`; do - local_state_dir=`dirname $d` - CRM_STATE_DIR=$d/crm - break - done - info "Found: $CRM_STATE_DIR" + fatal "Pacemaker daemons not found (nonstandard installation?)" fi - debug "Machine runtime directory: $local_state_dir" - debug "Pacemaker runtime data located in: $CRM_STATE_DIR" +} - CRM_DAEMON_DIR= - for p in /usr /usr/local /opt/local @exec_prefix@; do - for d in libexec lib64 lib; do - if [ -e $p/$d/pacemaker/pengine ]; then - CRM_DAEMON_DIR=$p/$d/pacemaker - break - elif [ -e $p/$d/heartbeat/pengine ]; then - CRM_DAEMON_DIR=$p/$d/heartbeat - break - fi - done +detect_cib_dir() { + for d in $local_state_dir/lib/{pacemaker/cib,heartbeat/crm}; do + if [ "-f $d/cib.xml" ]; then + found_dir "config files" "$d" + return + fi done - if [ ! -d $CRM_DAEMON_DIR ]; then - info "Searching for where Pacemaker daemons live... this may take a while" - for f in `find / $depth -type f -name pengine`; do - CRM_DAEMON_DIR=`dirname $f` - break - done - info "Found: $CRM_DAEMON_DIR" - fi + info "Searching for where Pacemaker keeps config information... this may take a while" + # TODO: What about false positives where someone copied the CIB? + for f in $(find / -maxdepth $maxdepth -type f -name cib.xml); do + d=$(dirname $f) + found_dir "config files" "$d" + return + done - if [ -z $CRM_DAEMON_DIR ]; then - fatal "Non-standard Pacemaker installation: daemons not found" + # Pacemaker Remote nodes don't need a CIB + if has_remoted; then + info "Not found (this appears to be a Pacemaker Remote node)" else - debug "Pacemaker daemons located under: $CRM_DAEMON_DIR" + warning "Pacemaker config not found (nonstandard installation?)" + fi +} + +detect_state_dir() { + if [ -n "$CRM_CONFIG_DIR" ]; then + # Assume new layout + # $local_state_dir/lib/pacemaker/(cib,pengine,blackbox,cores) + dirname "$CRM_CONFIG_DIR" + + # Pacemaker Remote nodes might not have a CRM_CONFIG_DIR + elif [ -d "$local_state_dir/lib/pacemaker" ]; then + echo $local_state_dir/lib/pacemaker fi +} - CRM_CONFIG_DIR= - for d in pacemaker/cib heartbeat/crm; do - if [ -f $local_state_dir/lib/$d/cib.xml ]; then - CRM_CONFIG_DIR=$local_state_dir/lib/$d - break - fi +detect_pe_dir() { + config_root="$1" + + d="$config_root/pengine" + if [ -d "$d" ]; then + found_dir "policy engine inputs" "$d" + return + fi + + info "Searching for where Pacemaker keeps Policy Engine inputs... this may take a while" + for d in $(find / -maxdepth $maxdepth -type d -name pengine); do + found_dir "policy engine inputs" "$d" + return done - if [ ! -d $CRM_CONFIG_DIR ]; then - info "Detecting where Pacemaker keeps config information... this may take a while" - for f in `find / $depth -type f -name cib.xml`; do - CRM_CONFIG_DIR=`dirname $f` - break - done - info "Found: $CRM_CONFIG_DIR" + if has_remoted; then + info "Not found (this appears to be a Pacemaker Remote node)" + else + fatal "Pacemaker policy engine inputs not found (nonstandard installation?)" fi - if [ -z $CRM_CONFIG_DIR ]; then - warning "Non-standard Pacemaker installation: config not found" +} + +detect_host() { + local_state_dir=@localstatedir@ + + if [ -d $local_state_dir/run ]; then + CRM_STATE_DIR=$local_state_dir/run/crm else - debug "Pacemaker config files located in: $CRM_CONFIG_DIR" + info "Searching for where Pacemaker keeps runtime data... this may take a while" + for d in `find / -maxdepth $maxdepth -type d -name run`; do + local_state_dir=`dirname $d` + CRM_STATE_DIR=$d/crm + break + done + info "Found: $CRM_STATE_DIR" fi + debug "Machine runtime directory: $local_state_dir" + debug "Pacemaker runtime data located in: $CRM_STATE_DIR" - # Assume new layout - # $local_state_dir/lib/pacemaker/(cib,pengine,blackbox,cores) - config_root=`dirname $CRM_CONFIG_DIR` + CRM_DAEMON_DIR=$(detect_daemon_dir) + CRM_CONFIG_DIR=$(detect_cib_dir) + config_root=$(detect_state_dir) # Older versions had none BLACKBOX_DIR=$config_root/blackbox debug "Pacemaker blackboxes (if any) located in: $BLACKBOX_DIR" - PE_STATE_DIR=$config_root/pengine - if [ ! -d $PE_STATE_DIR ]; then - info "Detecting where Pacemaker keeps Policy Engine inputs... this may take a while" - for d in `find / $depth -type d -name pengine`; do - PE_STATE_DIR=$d - break - done - info "Found: $PE_STATE_DIR" - fi - if [ -z $PE_STATE_DIR ]; then - fatal "Non-standard Pacemaker installation: Policy Engine directory not found" - else - debug "PE files located in: $PE_STATE_DIR" - fi + PE_STATE_DIR=$(detect_pe_dir "$config_root") HA_STATE_DIR=$local_state_dir/lib/heartbeat debug "Assuming Heartbeat state files, if any, are located in: $HA_STATE_DIR" @@ -328,34 +379,58 @@ linetime() { get_time "$t" } -# Find pattern in a logfile somewhere -# Return $max ordered results by age (newest first) +# +# findmsg +# +# Print the names of up to system logs that contain , +# ordered by most recently modified. +# findmsg() { - max=$1 - pattern=$2 - logfiles="" - syslogdirs="/var/log /var/logs /var/syslog /var/adm /var/log/ha /var/log/cluster" - - for d in $syslogdirs; do - if [ -d $d ]; then - files=`find $d -type f -maxdepth 1` - for f in $files; do - local cat=`find_decompressor $f` - $cat $f | grep -l -e "$pattern" - if [ $? = 0 ]; then - logfiles="$logfiles $f" - fi - done - fi - done 2>/dev/null + max=$1 + pattern="$2" + found=0 + + # List all potential system logs ordered by most recently modified. + candidates=$(ls -1td $SYSLOGS 2>/dev/null) + if [ -z "$candidates" ]; then + debug "No system logs found to search for pattern \'$pattern\'" + return + fi - if [ "x$logfiles" != "x" ]; then - list=`ls -t $logfiles | head -n $max | tr '\n' ' '` - echo $list - debug "Pattern \'$pattern\' found in: [ $list ]" - else - debug "Pattern \'$pattern\' not found anywhere" - fi + # Portable way to handle files with spaces in their names. + SAVE_IFS=$IFS + IFS=" +" + + # Check each log file for matches. + logfiles="" + for f in $candidates; do + local cat=$(find_decompressor "$f") + $cat "$f" 2>/dev/null | grep -q -e "$pattern" + if [ $? -eq 0 ]; then + + # Add this file to the list of hits + # (using newline as separator to handle spaces in names). + if [ -z "$logfiles" ]; then + logfiles="$f" + else + logfiles="$logfiles +$f" + fi + + # If we have enough hits, print them and return. + found=$(($found+1)) + if [ $found -ge $max ]; then + debug "Pattern \'$pattern\' found in: [ $logfiles ]" + IFS=$SAVE_IFS + echo "$logfiles" + return + fi + fi + done 2>/dev/null + IFS=$SAVE_IFS + + debug "Pattern \'$pattern\' not found in any system logs" } node_events() { @@ -481,16 +556,14 @@ dumplog() { # find_decompressor() { - if echo $1 | grep -qs 'bz2$'; then - echo "bzip2 -dc" - elif echo $1 | grep -qs 'gz$'; then - echo "gzip -dc" - elif echo $1 | grep -qs 'xz$'; then - echo "xz -dc" - else - echo "cat" - fi + case $1 in + *bz2) echo "bzip2 -dc" ;; + *gz) echo "gzip -dc" ;; + *xz) echo "xz -dc" ;; + *) echo "cat" ;; + esac } + # # check if the log contains a piece of our segment # @@ -706,13 +779,11 @@ pickfirst() { # and existence of configuration files # get_cluster_type() { - if - ps -ef | egrep -qs '[c]orosync' - then + if is_running corosync; then tool=`pickfirst corosync-objctl corosync-cmapctl` case $tool in - *objctl) quorum=`$tool -a | grep quorum.provider | sed s/.*=//`;; - *cmapctl) quorum=`$tool | grep quorum.provider | sed s/.*=//`;; + *objctl) quorum=`$tool -a | grep quorum.provider | sed 's/.*=\s*//'`;; + *cmapctl) quorum=`$tool | grep quorum.provider | sed 's/.*=\s*//'`;; esac if [ x"$quorum" = x"quorum_cman" ]; then stack="cman" @@ -720,10 +791,9 @@ get_cluster_type() { stack="corosync" fi - elif - ps -ef | egrep -qs '[a]isexec' - then + elif is_running aisexec; then stack="openais" + elif ps -ef | grep -v -e grep -e "eartbeat/[clasp]" | egrep -qs '[h]eartbeat' then @@ -741,8 +811,13 @@ get_cluster_type() { elif [ -f /etc/ais/openais.conf ]; then stack="openais" + elif [ -f /etc/ha.d/ha.cf ]; then + stack="heartbeat" + else - stack="heartbeat" + # We still don't know. This might be a Pacemaker Remote node, + # or the configuration might be in a nonstandard location. + stack="any" fi debug "Detected the '$stack' cluster stack" @@ -768,7 +843,7 @@ find_cluster_cf() { done if [ -z "$best_file" ]; then debug "Looking for corosync configuration file. This may take a while..." - for f in `find / $depth -type f -name corosync.conf`; do + for f in `find / -maxdepth $maxdepth -type f -name corosync.conf`; do best_file=$f break done @@ -789,6 +864,10 @@ find_cluster_cf() { echo "$cf" fi ;; + any) + # Cluster type is undetermined. Don't complain, because this + # might be a Pacemaker Remote node. + ;; *) warning "Unknown cluster type: $1" ;; @@ -803,3 +882,5 @@ t=`get_time "12:00"` if [ "$t" = "" ]; then fatal "please install the perl Date::Parse module (perl-DateTime-Format-DateParse on Fedora/Red Hat)" fi + +# vim: set expandtab tabstop=8 softtabstop=4 shiftwidth=4 textwidth=80: diff --git a/version.m4 b/version.m4 index 70596af4456..d5aaeb47150 100644 --- a/version.m4 +++ b/version.m4 @@ -1 +1,2 @@ m4_define([VERSION_NUMBER], [1.1.14]) +m4_define([PCMK_URL], [http://clusterlabs.org]) diff --git a/xml/Makefile.am b/xml/Makefile.am index de522c719b2..0487cc67298 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -18,10 +18,12 @@ MAINTAINERCLEANFILES = Makefile.in dtddir = $(CRM_DTD_DIRECTORY) -dtd_SCRIPTS = crm.dtd crm-transitional.dtd +dtd_DATA = crm.dtd crm-transitional.dtd xsltdir = $(dtddir) -xslt_SCRIPTS = upgrade06.xsl upgrade-*.xsl +xslt_DATA = upgrade06.xsl upgrade-*.xsl + +noinst_DATA = context-of.xsl RNGdir = $(dtddir) @@ -30,64 +32,71 @@ RNGdir = $(dtddir) # Sorted list of available numeric RNG versions, # extracted from filenames like NAME-MAJOR[.MINOR][.MINOR-MINOR].rng RNG_numeric_versions = $(shell ls -1 *.rng \ - | sed -E -n -e 's/^.*-([0-9.]+).rng$$/\1/p' \ + | sed -n -e 's/^.*-\([0-9][0-9.]*\).rng$$/\1/p' \ | sort -u -t. -k 1,1n -k 2,2n -k 3,3n) # The highest numeric version RNG_max ?= $(lastword $(RNG_numeric_versions)) -# The previous numeric version before $(RNG_max) -RNG_last ?= $(shell ls -1 *.rng \ - | sed -n -e 's/^.*-\([0-9.]\+\).rng$$/\1/p' \ - | sort -u -t. -k 1,1nr -k 2,2nr -k 3,3nr \ - | head -n 2 | tail -n 1) - # A sorted list of all RNG versions (numeric and "next") RNG_versions = next $(RNG_numeric_versions) +RNG_version_pairs = $(join \ + ${RNG_numeric_versions},$(addprefix \ + -,$(wordlist \ + 2,$(words ${RNG_numeric_versions}),${RNG_numeric_versions} \ + ) next \ + ) \ + ) +RNG_version_pairs_cnt = $(words ${RNG_version_pairs}) +RNG_version_pairs_last = $(wordlist \ + $(words \ + $(wordlist \ + 2,${RNG_version_pairs_cnt},${RNG_version_pairs} \ + ) \ + ),${RNG_version_pairs_cnt},${RNG_version_pairs} \ + ) RNG_generated = pacemaker.rng $(foreach base,$(RNG_versions),pacemaker-$(base).rng) versions.rng -RNG_cfg_base = options nodes resources constraints fencing acls tags +RNG_cfg_base = options nodes resources constraints fencing acls tags alerts RNG_base = cib $(RNG_cfg_base) status score rule nvset RNG_files = $(foreach base,$(RNG_base),$(wildcard $(base)*.rng)) # List of non-Pacemaker RNGs RNG_extra = crm_mon.rng -RNG_SCRIPTS = $(RNG_files) $(RNG_generated) $(RNG_extra) +RNG_DATA = $(RNG_files) $(RNG_generated) $(RNG_extra) EXTRA_DIST = best-match.sh -best_match = $(shell $(top_srcdir)/xml/best-match.sh $(1) $(2)) - versions: echo "Max: $(RNG_max)" echo "Available: $(RNG_versions)" versions.rng: Makefile.am echo " RNG $@" - echo "" > $@ - echo "" >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " none" >> $@ - echo " pacemaker-0.6" >> $@ - echo " transitional-0.6" >> $@ - echo " pacemaker-0.7" >> $@ - echo " pacemaker-1.1" >> $@ + echo '' > $@ + echo '' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' none' >> $@ + echo ' pacemaker-0.6' >> $@ + echo ' transitional-0.6' >> $@ + echo ' pacemaker-0.7' >> $@ + echo ' pacemaker-1.1' >> $@ for rng in $(RNG_versions); do echo " pacemaker-$$rng" >> $@; done - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo "" >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo '' >> $@ pacemaker.rng: pacemaker-$(RNG_max).rng echo " RNG $@" @@ -95,31 +104,69 @@ pacemaker.rng: pacemaker-$(RNG_max).rng pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am echo " RNG $@" - echo "" > $@ - echo "" >> $@ - echo " " >> $@ - echo " " >> $@ - $(top_srcdir)/xml/best-match.sh cib $(*) $(@) " " - echo " " >> $@ - echo " " >> $@ - for rng in $(RNG_cfg_base); do $(top_srcdir)/xml/best-match.sh $$rng $(*) $(@) " "; done - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - $(top_srcdir)/xml/best-match.sh status $(*) $(@) " " - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo "" >> $@ - -files_next = $(shell echo $(wildcard *-next.rng) | sed 's/-next.rng//g') -files_max = $(shell echo $(wildcard *-$(RNG_max).rng) | sed 's/-[0-9][0-9.]*.rng//g') - -diff: - echo "# Comparing changes in: $(RNG_max)" - -for rng in $(files_max); do echo "### $${rng}"; diff -u `$(top_srcdir)/xml/best-match.sh $${rng} $(RNG_last)` $${rng}-$(RNG_max).rng; done - echo -e "\n\n\n# Comparing changes since: $(RNG_max)" - -for rng in $(files_next); do echo "### $${rng}"; diff -u `$(top_srcdir)/xml/best-match.sh $${rng} $(RNG_max)` $${rng}-next.rng; done + echo '' > $@ + echo '' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + ./best-match.sh cib $(*) $(@) " " + echo ' ' >> $@ + echo ' ' >> $@ + for rng in $(RNG_cfg_base); do ./best-match.sh $$rng $(*) $(@) " " || :; done + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + ./best-match.sh status $(*) $(@) " " + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo '' >> $@ + +# diff fails with ec=2 if no predecessor is found; +# this uses '=' GNU extension to sed, if that's not available, +# one can use: hline=`echo "$${p}" | grep -Fn "$${hunk}" | cut -d: -f1`; +# XXX: use line information from hunk to avoid "not detected" for ambiguity +version_diff = \ + @for p in $(1); do \ + set `echo "$${p}" | tr '-' ' '`; \ + echo "\#\#\# *-$$2.rng vs. predecessor"; \ + for v in *-$$2.rng; do \ + echo "\#\#\#\# $${v} vs. predecessor"; b=`echo "$${v}" | cut -d- -f1`; \ + old=`./best-match.sh $${b} $$1`; \ + p=`diff -u "$${old}" "$${v}" 2>/dev/null`; \ + case $$? in \ + 1) echo "$${p}" | sed -n -e '/^@@ /!d;=;p' \ + -e ':l;n;/^\([- ]\|+.*<[^ />]\+\([^/>]\+="ID\|>$$\)\)/bl;s/^[+ ]\(.*\)/\1/p' \ + | while read hline; do \ + read h && read i || break; \ + iline=`grep -Fn "$${i}" "$${v}" | cut -d: -f1`; \ + ctxt="(not detected)"; \ + if test `echo "$${iline}" | wc -l` -eq 1; then \ + ctxt=`{ sed -n -e "1,$$(($${iline}-1))p" "$${v}"; \ + echo "$${i}"; \ + sed -n -e "$$(($${iline}+1)),$$ p" "$${v}"; \ + } | $(XSLTPROC) --param skip 1 context-of.xsl -`; \ + fi; \ + echo "$${p}" | sed -n -e "$$(($${hline}-2)),$${hline}!d" \ + -e '/^\(+++\|---\)/p'; \ + echo "$${h} context: $${ctxt}"; \ + echo "$${p}" | sed -n -e "1,$${hline}d" \ + -e '/^\(---\|@@ \)/be;p;d;:e;n;be'; \ + done; \ + ;; \ + 2) echo "\#\#\#\#\# $${v} has no predecessor";; \ + esac; \ + done; \ + done + +diff: best-match.sh + @echo "# Comparing changes in + since $(RNG_max)" + $(call version_diff,${RNG_version_pairs_last}) + +fulldiff: best-match.sh + @echo "# Comparing all changes across all the subsequent increments" + $(call version_diff,${RNG_version_pairs}) sync: git rm -f $(wildcard *-next.rng) diff --git a/xml/Readme.md b/xml/Readme.md index 30e7934f080..b78e13d26bc 100644 --- a/xml/Readme.md +++ b/xml/Readme.md @@ -49,3 +49,5 @@ New features will not be available until the admin From the source directory, run `make -C xml diff` to see the changes in the current schema (compared to the previous ones) and also the pending changes in `pacemaker-next`. +Alternatively, if the intention is to grok the overall historical schema +evolution, use `make -C xml fulldiff`. diff --git a/xml/acls-1.2.rng b/xml/acls-1.2.rng index 4be040509d4..378ce087bf0 100644 --- a/xml/acls-1.2.rng +++ b/xml/acls-1.2.rng @@ -10,27 +10,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -38,13 +38,13 @@ - + - + - + @@ -52,16 +52,16 @@ - - - - - - - + + + + + + + - + diff --git a/xml/acls-2.0.rng b/xml/acls-2.0.rng index 4d437886192..0fe6eed96e0 100644 --- a/xml/acls-2.0.rng +++ b/xml/acls-2.0.rng @@ -10,34 +10,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47,32 +47,32 @@ - - read - write - deny - + + read + write + deny + - - - - - - - - - - - + + + + + + + + + + + - + diff --git a/xml/alerts-2.5.rng b/xml/alerts-2.5.rng new file mode 100644 index 00000000000..15d72f27d1f --- /dev/null +++ b/xml/alerts-2.5.rng @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/best-match.sh b/xml/best-match.sh index 6d9ffb72193..2ba062532e1 100755 --- a/xml/best-match.sh +++ b/xml/best-match.sh @@ -6,41 +6,53 @@ destination=$1; shift prefix=$1; shift best="0.0" -candidates=$(ls -1 ${base}-*.rng 2>/dev/null) -for rng in $candidates; do - case $rng in - ${base}-${target}.rng) - best=${target} - break - ;; - *next*) - : skipping $rng - ;; - *) - v=$(echo $rng | sed -e "s/${base}-//" -e 's/.rng//') - : comparing $v with $target +candidates=$(ls -1 "${base}.rng" "${base}"-*.rng 2>/dev/null) +for rng in ${candidates}; do + case ${rng} in + ${base}-${target}.rng) + best=${target} + break + ;; + *next*) + : skipping ${rng} + ;; + *) + if [ "${rng}" = "${base}.rng" ]; then + # special case for nvset.rng, no -0.1 around anyway + v=0.1 + else + v=$(echo ${rng} | sed -e "s/${base}-//" -e 's/.rng//') + fi + : comparing ${v} with ${target} - echo | awk -v n1="$v" -v n2="${best}" '{if (n1>n2) printf ("true"); else printf ("false");}' | grep -q "true" - if [ $? -eq 0 ]; then - : $v beats the previous ${best} for $target - if [ ${target} = next ]; then - best=$v - else - echo | awk -v n1="$v" -v n2="${target}" '{if (n1n2) printf ("true"); else printf ("false");}' | grep -q "true" + if [ $? -eq 0 ]; then + : ${v} beats the previous ${best} for ${target} + if [ "${target}" = "next" ]; then + best=${v} + else + echo | awk -v n1="${v}" -v n2="${target}" '{if (n1" >> ${destination} + found=${base}-${best}.rng + fi + if [ "x${destination}" = "x" ]; then + echo "${found}" + else + echo "${prefix}" >> "${destination}" fi fi +ret () { return $1; }; ret ${ec} diff --git a/xml/constraints-1.0.rng b/xml/constraints-1.0.rng index e8e04e28328..ce273a3fc43 100644 --- a/xml/constraints-1.0.rng +++ b/xml/constraints-1.0.rng @@ -8,11 +8,11 @@ - - - - - + + + + + @@ -22,16 +22,16 @@ - - - - - - - + + + + + + + - + @@ -39,31 +39,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -72,36 +72,36 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -110,37 +110,37 @@ - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -174,7 +174,7 @@ - + diff --git a/xml/constraints-1.2.rng b/xml/constraints-1.2.rng index 85fcf48b205..bff62dbed9b 100644 --- a/xml/constraints-1.2.rng +++ b/xml/constraints-1.2.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -22,29 +22,29 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - + @@ -52,34 +52,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -88,36 +88,36 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -126,37 +126,37 @@ - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -165,28 +165,28 @@ - - - - - - - - - - - + + + + + + + + + + + - - - stop - demote - fence - freeze - - + + + stop + demote + fence + freeze + + @@ -220,7 +220,7 @@ - + diff --git a/xml/constraints-2.1.rng b/xml/constraints-2.1.rng index ddefd6f6af6..8bed941c925 100644 --- a/xml/constraints-2.1.rng +++ b/xml/constraints-2.1.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -22,29 +22,29 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - + @@ -52,42 +52,42 @@ - - - - - - - - - - - - - group - listed - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + group + listed + + + + + + + + + + + + + + + + + + + + + + @@ -96,36 +96,36 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -134,37 +134,37 @@ - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -173,28 +173,28 @@ - - - - - - - - - - - + + + + + + + + + + + - - - stop - demote - fence - freeze - - + + + stop + demote + fence + freeze + + @@ -228,7 +228,7 @@ - + diff --git a/xml/constraints-2.2.rng b/xml/constraints-2.2.rng index 216bf9c6849..98491acd82b 100644 --- a/xml/constraints-2.2.rng +++ b/xml/constraints-2.2.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -22,34 +22,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - + - - - + + + @@ -57,42 +57,42 @@ - - - - - - - - - - - - - group - listed - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + group + listed + + + + + + + + + + + + + + + + + + + + + + @@ -101,36 +101,36 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -139,37 +139,37 @@ - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -178,28 +178,28 @@ - - - - - - - - - - - + + + + + + + + + + + - - - stop - demote - fence - freeze - - + + + stop + demote + fence + freeze + + @@ -241,7 +241,7 @@ - + diff --git a/xml/constraints-2.3.rng b/xml/constraints-2.3.rng index d9a4701fb95..17f7afac025 100644 --- a/xml/constraints-2.3.rng +++ b/xml/constraints-2.3.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -22,34 +22,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - + - - - + + + @@ -57,42 +57,42 @@ - - - - - - - - - - - - - group - listed - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + group + listed + + + + + + + + + + + + + + + + + + + + + + @@ -101,36 +101,36 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -139,40 +139,40 @@ - + - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -181,28 +181,28 @@ - - - - - - - - - - - + + + + + + + + + + + - - - stop - demote - fence - freeze - - + + + stop + demote + fence + freeze + + @@ -244,7 +244,7 @@ - + diff --git a/xml/constraints-next.rng b/xml/constraints-next.rng index 9d110031fa8..6704b7081c4 100644 --- a/xml/constraints-next.rng +++ b/xml/constraints-next.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -22,37 +22,37 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - + - - - + + + @@ -60,42 +60,42 @@ - - - - - - - - - - - - - group - listed - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + group + listed + + + + + + + + + + + + + + + + + + + + + + @@ -104,42 +104,42 @@ - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -148,46 +148,46 @@ - + - + - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -196,28 +196,28 @@ - - - - - - - - - - - + + + + + + + + + + + - - - stop - demote - fence - freeze - - + + + stop + demote + fence + freeze + + @@ -259,7 +259,7 @@ - + diff --git a/xml/context-of.xsl b/xml/context-of.xsl new file mode 100644 index 00000000000..96b8c173329 --- /dev/null +++ b/xml/context-of.xsl @@ -0,0 +1,83 @@ + + + + + + + + + + + NOTFOUND + + + + + + + + + + + + + BADSTYLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/crm-transitional.dtd b/xml/crm-transitional.dtd index a0f1a8c3c43..63d2d12c241 100644 --- a/xml/crm-transitional.dtd +++ b/xml/crm-transitional.dtd @@ -43,7 +43,7 @@ TODO dc-uuid CDATA #IMPLIED have-quorum (true|yes|1|false|no|0) 'false' - no-quorum-panic (true|yes|1|false|no|0) 'false' + no-quorum-panic (true|yes|1|false|no|0) 'false' validate-with CDATA #IMPLIED remote-tls-port CDATA #IMPLIED diff --git a/xml/crm.xsl b/xml/crm.xsl index 5bb1b4a8424..25bfbaf1921 100644 --- a/xml/crm.xsl +++ b/xml/crm.xsl @@ -41,10 +41,10 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - - - - + + + + diff --git a/xml/fencing-1.2.rng b/xml/fencing-1.2.rng index 16c967ce0e2..4dc72d609f9 100644 --- a/xml/fencing-1.2.rng +++ b/xml/fencing-1.2.rng @@ -10,7 +10,7 @@ - + @@ -19,14 +19,14 @@ - - + + - + ([a-zA-Z0-9_\.\-]+)(,[a-zA-Z0-9_\.\-]+)* - + diff --git a/xml/fencing-2.4.rng b/xml/fencing-2.4.rng index 503c08c4ec9..e01f2f41f4f 100644 --- a/xml/fencing-2.4.rng +++ b/xml/fencing-2.4.rng @@ -10,7 +10,7 @@ - + @@ -19,18 +19,18 @@ - - - - - - + + + + + + - + ([a-zA-Z0-9_\.\-]+)(,[a-zA-Z0-9_\.\-]+)* - + diff --git a/xml/nodes-1.0.rng b/xml/nodes-1.0.rng index 29977402a59..82153ab1cf1 100644 --- a/xml/nodes-1.0.rng +++ b/xml/nodes-1.0.rng @@ -8,25 +8,25 @@ - - - - - - normal - member - ping - - - - - - - - - - - + + + + + + normal + member + ping + + + + + + + + + + + diff --git a/xml/nodes-1.2.rng b/xml/nodes-1.2.rng index 28dae6262e7..d8e93997e89 100644 --- a/xml/nodes-1.2.rng +++ b/xml/nodes-1.2.rng @@ -8,35 +8,35 @@ - - - - - - - normal - member - ping - - - - - - - - - - - - - - - - - - - - + + + + + + + normal + member + ping + + + + + + + + + + + + + + + + + + + + diff --git a/xml/nodes-1.3.rng b/xml/nodes-1.3.rng index 1ded570e6e6..9403860d0f5 100644 --- a/xml/nodes-1.3.rng +++ b/xml/nodes-1.3.rng @@ -8,36 +8,36 @@ - - - - - - - normal - member - ping - remote - - - - - - - - - - - - - - - - - - - - + + + + + + + normal + member + ping + remote + + + + + + + + + + + + + + + + + + + + diff --git a/xml/nvset-1.3.rng b/xml/nvset-1.3.rng index 8f1696cf959..9f0de23e33c 100644 --- a/xml/nvset-1.3.rng +++ b/xml/nvset-1.3.rng @@ -13,29 +13,29 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + diff --git a/xml/nvset.rng b/xml/nvset.rng index 0d7e72cdabf..62eaa473da4 100644 --- a/xml/nvset.rng +++ b/xml/nvset.rng @@ -13,19 +13,19 @@ - + - - - - - - - - - + + + + + + + + + - + diff --git a/xml/ocf-meta2man.xsl b/xml/ocf-meta2man.xsl index 8dd53912028..67f5dbbb664 100644 --- a/xml/ocf-meta2man.xsl +++ b/xml/ocf-meta2man.xsl @@ -35,9 +35,9 @@ - Andrew - Beekhof - andrew@beekhof.net + Andrew + Beekhof + andrew@beekhof.net @@ -52,12 +52,12 @@ - - - - - - + + + + + + @@ -172,37 +172,37 @@ = - [ - - ] + [ + + ] - - - - - + + + + + - - - - - - - - + + + + + + + + diff --git a/xml/options-1.0.rng b/xml/options-1.0.rng index 99d4906cbf6..3ed8051842a 100644 --- a/xml/options-1.0.rng +++ b/xml/options-1.0.rng @@ -4,29 +4,29 @@ - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + diff --git a/xml/regression.sh b/xml/regression.sh index 8f073053d3e..cc435ef7032 100755 --- a/xml/regression.sh +++ b/xml/regression.sh @@ -83,7 +83,7 @@ do_test order3 "Order stop " do_test order4 "Order (multiple) " do_test order5 "Order (move) " do_test order6 "Order (move w/ restart) " -do_test order7 "Order (manditory) " +do_test order7 "Order (mandatory) " do_test order-optional "Order (score=0) " do_test order-required "Order (score=INFINITY) " diff --git a/xml/resources-1.0.rng b/xml/resources-1.0.rng index aa456cdf914..a8aa3ac7310 100644 --- a/xml/resources-1.0.rng +++ b/xml/resources-1.0.rng @@ -8,12 +8,12 @@ - - - - - - + + + + + + @@ -21,27 +21,27 @@ - - - - ocf - - - - - lsb - heartbeat - stonith - upstart - - - - - - - - - + + + + ocf + + + + + lsb + heartbeat + stonith + upstart + + + + + + + + + @@ -50,13 +50,13 @@ - + - - - - + + + + @@ -65,14 +65,14 @@ - + - - - - - + + + + + @@ -81,97 +81,97 @@ - + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stopped - Started - Slave - Master - - - - - - - nothing - quorum - fencing - - - - - - - ignore - block - stop - restart - standby - fence - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stopped + Started + Slave + Master + + + + + + + nothing + quorum + fencing + + + + + + + ignore + block + stop + restart + standby + fence + + + + + + diff --git a/xml/resources-1.2.rng b/xml/resources-1.2.rng index 7e941399faf..e38eb7c12ec 100644 --- a/xml/resources-1.2.rng +++ b/xml/resources-1.2.rng @@ -8,13 +8,13 @@ - - - - - - - + + + + + + + @@ -22,40 +22,40 @@ - - - - - - ocf - - - - - lsb - heartbeat - stonith - upstart - service - systemd - nagios - - - - - - - - - - - - - - - - - + + + + + + ocf + + + + + lsb + heartbeat + stonith + upstart + service + systemd + nagios + + + + + + + + + + + + + + + + + @@ -63,32 +63,32 @@ - - - - ocf - - - - - lsb - heartbeat - stonith - upstart - - - - - - - - - - - - - - + + + + ocf + + + + + lsb + heartbeat + stonith + upstart + + + + + + + + + + + + + + @@ -97,13 +97,13 @@ - + - - - - + + + + @@ -112,14 +112,14 @@ - + - - - - - + + + + + @@ -128,98 +128,98 @@ - + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stopped - Started - Slave - Master - - - - - - - nothing - quorum - fencing - - - - - - - ignore - block - stop - restart - standby - fence - restart-container - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stopped + Started + Slave + Master + + + + + + + nothing + quorum + fencing + + + + + + + ignore + block + stop + restart + standby + fence + restart-container + + + + + + diff --git a/xml/resources-1.3.rng b/xml/resources-1.3.rng index 9faf9fce0ad..6dba571f0ce 100644 --- a/xml/resources-1.3.rng +++ b/xml/resources-1.3.rng @@ -8,13 +8,13 @@ - - - - - - - + + + + + + + @@ -22,40 +22,40 @@ - - - - - - ocf - - - - - lsb - heartbeat - stonith - upstart - service - systemd - nagios - - - - - - - - - - - - - - - - - + + + + + + ocf + + + + + lsb + heartbeat + stonith + upstart + service + systemd + nagios + + + + + + + + + + + + + + + + + @@ -63,32 +63,32 @@ - - - - ocf - - - - - lsb - heartbeat - stonith - upstart - - - - - - - - - - - - - - + + + + ocf + + + + + lsb + heartbeat + stonith + upstart + + + + + + + + + + + + + + @@ -97,13 +97,13 @@ - + - - - - + + + + @@ -112,14 +112,14 @@ - + - - - - - + + + + + @@ -128,99 +128,99 @@ - + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stopped - Started - Slave - Master - - - - - - - nothing - quorum - fencing - unfencing - - - - - - - ignore - block - stop - restart - standby - fence - restart-container - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stopped + Started + Slave + Master + + + + + + + nothing + quorum + fencing + unfencing + + + + + + + ignore + block + stop + restart + standby + fence + restart-container + + + + + + diff --git a/xml/rule.rng b/xml/rule.rng index 242eff88d79..8084526d210 100644 --- a/xml/rule.rng +++ b/xml/rule.rng @@ -1,6 +1,6 @@ @@ -13,90 +13,90 @@ - - + + - - - or - and - - + + + or + and + + - + - + - - - - - lt - gt - lte - gte - eq - ne - defined - not_defined - - - - - - - - - string - number - version - - - - + + + + + lt + gt + lte + gte + eq + ne + defined + not_defined + + + + + + + + + string + number + version + + + + - - - - in_range - - - - - - - - - - - - - - - - - gt - - - - lt - - - - - - date_spec - - - - - - - - + + + + in_range + + + + + + + + + + + + + + + + + gt + + + + lt + + + + + + date_spec + + + + + + + + diff --git a/xml/score.rng b/xml/score.rng index 57b10f25229..c632932de09 100644 --- a/xml/score.rng +++ b/xml/score.rng @@ -8,10 +8,10 @@ - - INFINITY - +INFINITY - -INFINITY + + INFINITY + +INFINITY + -INFINITY diff --git a/xml/tags-1.3.rng b/xml/tags-1.3.rng index 318d6ba14c1..95e3e47d645 100644 --- a/xml/tags-1.3.rng +++ b/xml/tags-1.3.rng @@ -10,14 +10,14 @@ - - - - - - - - + + + + + + + + diff --git a/xml/upgrade-1.3.xsl b/xml/upgrade-1.3.xsl index 0d41bafd0a7..86bd9d728b3 100644 --- a/xml/upgrade-1.3.xsl +++ b/xml/upgrade-1.3.xsl @@ -22,10 +22,10 @@ - - - - + + + + @@ -53,10 +53,10 @@ - - auto- - - + + auto- + + @@ -65,16 +65,16 @@ - auto- - + auto- + - - - - - - + + + + + + diff --git a/xml/upgrade06.xsl b/xml/upgrade06.xsl index 4537bb3ec98..7c8ca2c1d75 100644 --- a/xml/upgrade06.xsl +++ b/xml/upgrade06.xsl @@ -10,10 +10,10 @@ - + - + . @@ -115,10 +115,10 @@ - - - - + + + + @@ -129,10 +129,10 @@ - - - - + + + + @@ -143,11 +143,11 @@ - - - - - + + + + + @@ -185,7 +185,7 @@ - + @@ -205,15 +205,15 @@ - - - - .auto- - - + + + + .auto- + + - + @@ -238,42 +238,42 @@ - + - + - cluster-delay + cluster-delay - + - + - + - + - + - + - + - + @@ -283,17 +283,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -303,27 +303,27 @@ - - - - - .meta + + - + + .meta - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -410,25 +410,25 @@ - - - 0 + + + 0 - - - false + + + false - - - 0 + + + 0 @@ -456,16 +456,16 @@ - - - - - nvp - - stonith-enabled - false - - + + + + + nvp + + stonith-enabled + false + + @@ -495,7 +495,7 @@ - 0 + 0 @@ -507,9 +507,9 @@ - - #uname - defined + + #uname + defined @@ -583,27 +583,27 @@ - - - + + + - - - + + + - - - - - - + + + + + + @@ -621,71 +621,71 @@ - - - - - - - - - - - - - - - start - - - - - - - - - - - - - - - - start - - + + + + + + + + + + + + + + + start + + + + + + + + + + + + + + + + start + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + @@ -699,18 +699,18 @@ - - - - - - - - - + + + + + + + + +