From d9800577e91610ab372b3fa543a0a4431f56b02b Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 8 Sep 2015 16:31:06 +0200 Subject: [PATCH 001/214] Feature: pengine: Support concurrent fencing A pengine property "concurrent-fencing" can be configured to allow performing fencing operations in parallel. It defaults to "false". --- include/crm/pengine/status.h | 1 + lib/pengine/common.c | 2 ++ lib/pengine/unpack.c | 4 ++++ pengine/allocate.c | 26 +++++++++++++++++++++++--- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index b95b1e5a56b..ddcdd788c94 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -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 diff --git a/lib/pengine/common.c b/lib/pengine/common.c index e6123843aba..070adef355e 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/unpack.c b/lib/pengine/unpack.c index 2b016bcbad6..dc00641b793 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -166,6 +166,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"); diff --git a/pengine/allocate.c b/pengine/allocate.c index c2e56f914fc..c0b319af278 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -1393,6 +1393,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"); @@ -1421,11 +1422,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 && @@ -1490,8 +1495,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); + } + } } } @@ -1504,6 +1522,8 @@ stage6(pe_working_set_t * data_set) } order_actions(done, all_stopped, pe_order_implies_then); + + g_list_free(stonith_ops); return TRUE; } From c9b53ad91a5f3717a7b9b634089440606982dc3f Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 10 Sep 2015 14:19:51 +0200 Subject: [PATCH 002/214] Test: pengine: Support concurrent fencing (regression test) --- pengine/regression.sh | 2 + pengine/test10/concurrent-fencing.dot | 13 +++++ pengine/test10/concurrent-fencing.exp | 63 +++++++++++++++++++++++ pengine/test10/concurrent-fencing.scores | 7 +++ pengine/test10/concurrent-fencing.summary | 24 +++++++++ pengine/test10/concurrent-fencing.xml | 28 ++++++++++ 6 files changed, 137 insertions(+) create mode 100644 pengine/test10/concurrent-fencing.dot create mode 100644 pengine/test10/concurrent-fencing.exp create mode 100644 pengine/test10/concurrent-fencing.scores create mode 100644 pengine/test10/concurrent-fencing.summary create mode 100644 pengine/test10/concurrent-fencing.xml diff --git a/pengine/regression.sh b/pengine/regression.sh index 7f73f92e2dc..81c7900a271 100755 --- a/pengine/regression.sh +++ b/pengine/regression.sh @@ -537,6 +537,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" 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..4c09b7584cd --- /dev/null +++ b/pengine/test10/concurrent-fencing.exp @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7c63f4cb17ffe7cb1c806c3d855b5f2f3ce91cbb Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 10 Sep 2015 14:29:25 +0200 Subject: [PATCH 003/214] Feature: fencing: Support concurrent fencing actions on each device A "pcmk_action_limit" parameter can be configured for a fencing resource to specify the maximum number of actions can be performed in parallel on this device. It defaults to "1". "-1" is unlimited. --- fencing/commands.c | 38 +++++++++++++++++++++++++++------- fencing/internal.h | 2 +- fencing/main.c | 10 +++++++++ include/crm/fencing/internal.h | 1 + 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/fencing/commands.c b/fencing/commands.c index adf655b887a..6bafb83debe 100644 --- a/fencing/commands.c +++ b/fencing/commands.c @@ -252,6 +252,24 @@ 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 gboolean stonith_device_execute(stonith_device_t * device) { @@ -259,11 +277,16 @@ stonith_device_execute(stonith_device_t * device) const char *action_str = NULL; async_command_t *cmd = NULL; stonith_action_t *action = NULL; + guint active_pids = 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_pids = g_list_length(device->active_pids); + action_limit = get_action_limit(device); + if (action_limit > -1 && active_pids >= action_limit) { + crm_trace("%s is over its action limit of %d (%u active pid%s)", + device->id, action_limit, active_pids, active_pids > 1 ? "s" : ""); return TRUE; } @@ -340,7 +363,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; + device->active_pids = g_list_append(device->active_pids, GINT_TO_POINTER(exec_rc)); } else { crm_warn("Operation %s%s%s on %s failed: %s (%d)", @@ -431,6 +454,7 @@ free_device(gpointer data) free_async_command(cmd); } g_list_free(device->pending_ops); + g_list_free(device->active_pids); g_list_free_full(device->targets, free); @@ -873,7 +897,7 @@ status_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pid = 0; + dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); mainloop_set_trigger(dev->work); if (rc == 1 /* unknown */ ) { @@ -910,7 +934,7 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pid = 0; + dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); mainloop_set_trigger(dev->work); /* If we successfully got the targets earlier, don't disable. */ @@ -1771,7 +1795,7 @@ unfence_cb(GPid pid, int rc, const char *output, gpointer user_data) log_operation(cmd, rc, pid, NULL, output); if(dev) { - dev->active_pid = 0; + dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); mainloop_set_trigger(dev->work); } else { crm_trace("Device %s does not exist", cmd->device); @@ -1816,7 +1840,7 @@ st_child_done(GPid pid, int rc, const char *output, gpointer user_data) /* The device is ready to do something else now */ device = g_hash_table_lookup(device_list, cmd->device); if (device) { - device->active_pid = 0; + device->active_pids = g_list_remove(device->active_pids, GINT_TO_POINTER(pid)); if (rc == pcmk_ok && (safe_str_eq(cmd->action, "list") || safe_str_eq(cmd->action, "monitor") || safe_str_eq(cmd->action, "status"))) { diff --git a/fencing/internal.h b/fencing/internal.h index 3fc75ecb49a..d7140cb517b 100644 --- a/fencing/internal.h +++ b/fencing/internal.h @@ -34,7 +34,7 @@ typedef struct stonith_device_s { /* whether the cluster should automatically unfence nodes with the device */ gboolean automatic_unfencing; guint priority; - guint active_pid; + GListPtr active_pids; enum st_device_flags flags; diff --git a/fencing/main.c b/fencing/main.c index 43d2cb3bf38..86a36efe879 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -1405,6 +1405,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 diff --git a/include/crm/fencing/internal.h b/include/crm/fencing/internal.h index a59151b3338..73169aa0a28 100644 --- a/include/crm/fencing/internal.h +++ b/include/crm/fencing/internal.h @@ -110,6 +110,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" From 81ef956cb0004da7b55db5e393a5499b2cd30804 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Fri, 25 Sep 2015 11:40:09 +0200 Subject: [PATCH 004/214] Build: spec: Move xml schema files and PCMK-MIB.txt into pacemaker-cli package The crm_mon and crm_verify tools in pacemaker-cli require the schema files. And PCMK-MIB.txt is for crm_mon to use. --- pacemaker.spec.in | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 85c2f66c3c2..b6977d01099 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -398,8 +398,6 @@ exit 0 ########################################################### %defattr(-,root,root) -%exclude %{_datadir}/pacemaker/tests - %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker %config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %{_sbindir}/pacemakerd @@ -410,10 +408,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/* @@ -488,8 +482,10 @@ 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 + %doc %{_mandir}/man8/* %exclude %{_mandir}/man8/attrd_updater.* %exclude %{_mandir}/man8/crm_attribute.* From ce576cfb489883c777e67d72b713f38093f2dd0d Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Fri, 25 Sep 2015 12:09:46 +0200 Subject: [PATCH 005/214] Build: spec: Move logrotate configuration file into pacemaker-cli package --- pacemaker.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index b6977d01099..8a1b81d6454 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -399,7 +399,6 @@ exit 0 %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker -%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %{_sbindir}/pacemakerd %if %{defined _unitdir} @@ -458,6 +457,7 @@ exit 0 %files cli %defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %config(noreplace) %{_sysconfdir}/sysconfig/crm_mon %if %{defined _unitdir} From aff80aece3f312ef28a2e9959698aff165eaf5c8 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Fri, 16 Oct 2015 13:27:29 +0200 Subject: [PATCH 006/214] Build: spec: Move attrd_updater into pacemaker-cli package --- pacemaker.spec.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 8a1b81d6454..6f1c03346d7 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -414,13 +414,11 @@ 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}/man8/crm_attribute.* %doc %{_mandir}/man8/crm_node.* %doc %{_mandir}/man8/crm_master.* @@ -468,6 +466,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/init/crm_mon.conf %endif +%{_sbindir}/attrd_updater %{_sbindir}/cibadmin %{_sbindir}/crm_diff %{_sbindir}/crm_error @@ -487,7 +486,6 @@ exit 0 %{_datadir}/snmp/mibs/PCMK-MIB.txt %doc %{_mandir}/man8/* -%exclude %{_mandir}/man8/attrd_updater.* %exclude %{_mandir}/man8/crm_attribute.* %exclude %{_mandir}/man8/crm_node.* %exclude %{_mandir}/man8/crm_master.* From ea4f3a711486b38f51b7a52d3b39f6d7b621b8da Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 14 Dec 2015 16:04:39 -0600 Subject: [PATCH 007/214] Low: crmd: re-enable built-in notifications --- crmd/control.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crmd/control.c b/crmd/control.c index a3dd5ddefb0..240d00b0762 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -41,6 +41,13 @@ #include #include +/* Enable support for built-in notifications + * + * The interface is expected to change significantly, and this will be defined + * in the upstream master branch only until a new design is finalized. + */ +#define RHEL7_COMPAT + qb_ipcs_service_t *ipcs = NULL; extern gboolean crm_connect_corosync(crm_cluster_t * cluster); From f289115b5a3693934bb3140725e2dc9aef3a6a13 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 22 Dec 2015 12:24:14 -0600 Subject: [PATCH 008/214] Refactor: lrmd: handle shutdown a little more cleanly --- lrmd/main.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lrmd/main.c b/lrmd/main.c index a3b7929aeb9..73519e20cf4 100644 --- a/lrmd/main.c +++ b/lrmd/main.c @@ -231,9 +231,23 @@ void lrmd_shutdown(int nsig) { 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); } @@ -255,7 +269,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 +362,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_shutdown(SIGTERM); + return pcmk_ok; } From 68e7bb19d69a999443524ba79203979b35f54e83 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 22 Dec 2015 11:41:56 -0600 Subject: [PATCH 009/214] Refactor: lrmd: make proxied IPC providers/clients opaque This removes an unused extern declaration in crmd.h, makes the ipc_providers and ipc_clients tables static to ipc_proxy.c, and adds an ipc_proxy_get_provider() function for future use. --- crmd/crmd.h | 1 - lrmd/ipc_proxy.c | 48 ++++++++++++++++++++++++++++----------------- lrmd/lrmd_private.h | 1 + 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/crmd/crmd.h b/crmd/crmd.h index 031f4143363..6039c854634 100644 --- a/crmd/crmd.h +++ b/crmd/crmd.h @@ -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/lrmd/ipc_proxy.c b/lrmd/ipc_proxy.c index 84fb3ec4a46..d95a396b530 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; } diff --git a/lrmd/lrmd_private.h b/lrmd/lrmd_private.h index ddb1506d226..52f79b813a2 100644 --- a/lrmd/lrmd_private.h +++ b/lrmd/lrmd_private.h @@ -103,6 +103,7 @@ 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); #endif #endif From 6239d1dd84a50585a30175978be7e6d8ffb0b155 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 22 Dec 2015 15:59:21 -0600 Subject: [PATCH 010/214] Refactor: crmd,lrmd,liblrmd: use defined constants for lrmd IPC operations Reduces chance of typos. --- crmd/lrm_state.c | 6 +++--- include/crm/lrmd.h | 6 ++++++ lib/lrmd/proxy_common.c | 6 +++--- lrmd/ipc_proxy.c | 14 +++++++------- lrmd/remote_ctl.c | 6 +++--- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 0e52ff6b1cc..497d3f936f7 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -481,7 +481,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); @@ -490,10 +490,10 @@ 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")) { + } 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/include/crm/lrmd.h b/include/crm/lrmd.h index 5a3c6ce3c59..5c74798cd72 100644 --- a/include/crm/lrmd.h +++ b/include/crm/lrmd.h @@ -90,6 +90,12 @@ typedef struct lrmd_key_value_s { #define LRMD_OP_POKE "lrmd_rsc_poke" #define LRMD_OP_NEW_CLIENT "lrmd_rsc_new_client" +#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 F_LRMD_IPC_OP "lrmd_ipc_op" #define F_LRMD_IPC_IPC_SERVER "lrmd_ipc_server" #define F_LRMD_IPC_SESSION "lrmd_ipc_session" diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index 50c59c32a68..a0f5e6293b0 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -39,7 +39,7 @@ 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); @@ -50,7 +50,7 @@ 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 +63,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/lrmd/ipc_proxy.c b/lrmd/ipc_proxy.c index d95a396b530..164a9ff2695 100644 --- a/lrmd/ipc_proxy.c +++ b/lrmd/ipc_proxy.c @@ -101,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); @@ -157,7 +157,7 @@ ipc_proxy_forward_client(crm_client_t *ipc_proxy, xmlNode *xml) 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); @@ -176,11 +176,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); @@ -190,7 +190,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 { @@ -245,7 +245,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); @@ -275,7 +275,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/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); From 48246b5916745a56cb0ceb7b4e148b9e587708fe Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 23 Dec 2015 14:36:51 -0600 Subject: [PATCH 011/214] Test: cts: simulate pacemaker_remote failure with kill Previously, failure was simulated by stopping pacemaker_remote, but that will eventually cause a graceful stop rather than a failure, so first kill the process. This also corrects a pattern that caused false BadNews. --- cts/CTStests.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cts/CTStests.py b/cts/CTStests.py index e6f3abe1666..fb1c5f2b353 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -2764,6 +2764,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 +2863,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") @@ -3093,8 +3101,8 @@ def is_applicable(self): def errorstoignore(self): ignore_pats = [ r"Unexpected disconnect on remote-node", - r"crmd.*: error.*: Operation remote_.*_monitor", - r"pengine.*: Recover remote_.*\s*\(.*\)", + r"crmd.*:\s+error.*: Operation remote_.*_monitor", + r"pengine.*:\s+Recover remote_.*\s*\(.*\)", r"Calculated Transition .* /var/lib/pacemaker/pengine/pe-error", r"error.*: Resource .*ocf::.* is active on 2 nodes attempting recovery", ] From 29cc1018cb98b1ff864f2aed090cb6b591963275 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 23 Dec 2015 15:01:48 -0600 Subject: [PATCH 012/214] Feature: lrmd,liblrmd: add lrmd IPC operations for requesting and acknowledging shutdown This adds two new lrmd IPC operations, LRMD_IPC_OP_SHUTDOWN_REQ and LRMD_IPC_OP_SHUTDOWN_ACK, along with functions to send them. This will support the ability to stop pacemaker_remote gracefully. At this point, no code uses these new operations. --- include/crm/lrmd.h | 2 ++ include/crm_internal.h | 1 + lib/lrmd/proxy_common.c | 14 ++++++++++++++ lrmd/ipc_proxy.c | 24 ++++++++++++++++++++++++ lrmd/lrmd_private.h | 1 + 5 files changed, 42 insertions(+) diff --git a/include/crm/lrmd.h b/include/crm/lrmd.h index 5c74798cd72..6660fb96b56 100644 --- a/include/crm/lrmd.h +++ b/include/crm/lrmd.h @@ -95,6 +95,8 @@ typedef struct lrmd_key_value_s { #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_internal.h b/include/crm_internal.h index e0bbb06639f..c5fbcb71173 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -380,6 +380,7 @@ 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); diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index a0f5e6293b0..eb17e4e2679 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -45,6 +45,20 @@ remote_proxy_notify_destroy(lrmd_t *lrmd, const char *session_id) 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) { diff --git a/lrmd/ipc_proxy.c b/lrmd/ipc_proxy.c index 164a9ff2695..9633a67cae7 100644 --- a/lrmd/ipc_proxy.c +++ b/lrmd/ipc_proxy.c @@ -259,6 +259,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) { diff --git a/lrmd/lrmd_private.h b/lrmd/lrmd_private.h index 52f79b813a2..78f14c92db8 100644 --- a/lrmd/lrmd_private.h +++ b/lrmd/lrmd_private.h @@ -104,6 +104,7 @@ 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 From 8eebc8a30a55645164d3c41acaf028dd75fab275 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 23 Dec 2015 15:18:38 -0600 Subject: [PATCH 013/214] Feature: crmd: support graceful pacemaker_remote stops NOT YET IMPLEMENTED. This just is a placeholder. --- crmd/lrm_state.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 497d3f936f7..5ee5b832118 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -478,6 +478,13 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) CRM_CHECK(op != NULL, return); CRM_CHECK(session != NULL, return); + if (safe_str_eq(op, LRMD_IPC_OP_SHUTDOWN_REQ)) { + crm_warn("Graceful proxy shutdown not yet supported"); + /* TODO: uncomment this, then put node in standby: */ + /* remote_proxy_ack_shutdown(lrmd); */ + 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 */ From c83dc10b975aa70a3da85dc2e63cec99a0b729b2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 23 Dec 2015 15:19:28 -0600 Subject: [PATCH 014/214] Feature: pacemaker_remote: support graceful stops When pacemaker_remote gets an interrupt signal, if there are any connected proxy providers, it will send an lrmd IPC op for a shutdown request, and stop accepting new provider connections. If the provider acknowledges the request, pacemaker_remote will wait until all providers disconnect before exiting itself. This gives the cluster the opportunity to stop any resources running on the node that is shutting down. If the provider is an older version that does not support graceful stops, pacemaker_remote will time out waiting for the ack, then exit immediately. Since we are now waiting for resources to exit, the systemd stop timeout for pacemaker_remote has been raised to match pacemaker's. --- lrmd/ipc_proxy.c | 12 ++- lrmd/lrmd_private.h | 4 +- lrmd/main.c | 121 ++++++++++++++++++++++++++++++- lrmd/pacemaker_remote.service.in | 4 +- lrmd/tls_backend.c | 3 +- 5 files changed, 135 insertions(+), 9 deletions(-) diff --git a/lrmd/ipc_proxy.c b/lrmd/ipc_proxy.c index 9633a67cae7..07c13ab84a2 100644 --- a/lrmd/ipc_proxy.c +++ b/lrmd/ipc_proxy.c @@ -152,9 +152,19 @@ 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, LRMD_IPC_OP_DESTROY); diff --git a/lrmd/lrmd_private.h b/lrmd/lrmd_private.h index 78f14c92db8..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); diff --git a/lrmd/main.c b/lrmd/main.c index 73519e20cf4..98a14126df8 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,8 +258,17 @@ 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)); @@ -249,6 +289,79 @@ lrmd_shutdown(int nsig) 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_trace("Shutdown already in progress"); + 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* */ @@ -363,6 +476,6 @@ main(int argc, char **argv) g_main_run(mainloop); /* should never get here */ - lrmd_shutdown(SIGTERM); + lrmd_exit(NULL); return pcmk_ok; } diff --git a/lrmd/pacemaker_remote.service.in b/lrmd/pacemaker_remote.service.in index 15e61fb727b..72529760e28 100644 --- a/lrmd/pacemaker_remote.service.in +++ b/lrmd/pacemaker_remote.service.in @@ -13,7 +13,9 @@ EnvironmentFile=-/etc/sysconfig/pacemaker 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/tls_backend.c b/lrmd/tls_backend.c index df5387f3fa0..7b8ef9d8432 100644 --- a/lrmd/tls_backend.c +++ b/lrmd/tls_backend.c @@ -163,8 +163,7 @@ lrmd_remote_client_destroy(gpointer user_data) close(csock); } - crm_client_destroy(client); - + lrmd_client_destroy(client); return; } From 0edc762e63801b92b5a931c10446287f9b3d6406 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 6 Jan 2016 15:15:24 +1100 Subject: [PATCH 015/214] Feature: PE: Honor the shutdown transient attributes for remote nodes --- lib/pengine/unpack.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 6a125b0b642..75d9dd8e0a3 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -1145,6 +1145,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 +1192,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; From 0a883a90eeeee4c9b156023da693d4ff93a9d69a Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 6 Jan 2016 15:17:06 +1100 Subject: [PATCH 016/214] Feature: crmd: Set the shutdown transient attribute in response to LRMD_IPC_OP_SHUTDOWN_REQ from remote nodes --- crmd/lrm_state.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 5ee5b832118..7833ebb6e6e 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -478,17 +478,23 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) CRM_CHECK(op != NULL, return); 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, LRMD_IPC_OP_SHUTDOWN_REQ)) { - crm_warn("Graceful proxy shutdown not yet supported"); - /* TODO: uncomment this, then put node in standby: */ - /* remote_proxy_ack_shutdown(lrmd); */ - return; - } + char *now_s = NULL; + time_t now = time(NULL); - crm_element_value_int(msg, F_LRMD_IPC_MSG_ID, &msg_id); + crm_warn("Graceful proxy shutdown of %s not yet tested", lrm_state->node_name); - /* This is msg from remote ipc client going to real ipc server */ - if (safe_str_eq(op, LRMD_IPC_OP_NEW)) { + now_s = crm_itoa(now); + update_attrd(lrm_state->node_name, XML_CIB_ATTR_SHUTDOWN, now_s, NULL, FALSE); + free(now_s); + + remote_proxy_ack_shutdown(lrmd); + return; + + } else 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); From 6968a8b8c48a63af8c813ed47652662cbce837be Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 7 Jan 2016 11:28:14 +1100 Subject: [PATCH 017/214] Fix: attrd: Hook up the client name so we can track requests --- attrd/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/attrd/main.c b/attrd/main.c index 069e9faee4d..01983960ff2 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); From da17fd0265ffe3b4456c4f81141439c851504281 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 7 Jan 2016 11:33:34 +1100 Subject: [PATCH 018/214] Fix: attrd: Correctly implement mass removal of a node's attributes --- attrd/commands.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/attrd/commands.c b/attrd/commands.c index 378a4f80881..28e4a819525 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -541,8 +541,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 +590,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); + } } } From b96601712eb4a9f4310bb83db226aac067cc3c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= Date: Thu, 7 Jan 2016 12:42:51 +0100 Subject: [PATCH 019/214] Fix: header == NULL when parsing compressed message When parsing a compressed message, message header is reloaded from the uncompressed buffer. However, because remote->buffer_offset is zeroed prior that, it'll consider the buffer already processed and return NULL. Zeoring remote->buffer_offset after header retrieval should remedy this. AFAICS, the decompression branch is not used so this perhaps is not an issue in the real world. --- lib/common/remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/common/remote.c b/lib/common/remote.c index 24c94c3ab3c..2aea6ab8fca 100644 --- a/lib/common/remote.c +++ b/lib/common/remote.c @@ -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); From e2c7f8d987f090a3bb2ba3ec0e007a6dbf138ad2 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 11 Jan 2016 08:28:24 +1100 Subject: [PATCH 020/214] Log: crmd: Graceful proxy shutdown is now tested --- crmd/lrm_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 7833ebb6e6e..62e1c763fd4 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -485,7 +485,7 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) char *now_s = NULL; time_t now = time(NULL); - crm_warn("Graceful proxy shutdown of %s not yet tested", lrm_state->node_name); + 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, FALSE); From 6de9fde9c5d0254358eddf4f45d2e04b6e314f2c Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Tue, 12 Jan 2016 11:23:27 +1100 Subject: [PATCH 021/214] Fix licenses to match original intent As per http://www.gossamer-threads.com/lists/linuxha/pacemaker/75967, I never intended that people would be forced to reverse engineer the protocols or write something from scratch in order to develop against Pacemaker. --- attrd/internal.h | 4 ++-- cib/callbacks.h | 4 ++-- cib/cibio.h | 4 ++-- cib/cibmessages.h | 4 ++-- cib/common.h | 4 ++-- cib/notify.h | 4 ++-- crmd/crmd.h | 4 ++-- crmd/crmd_callbacks.h | 4 ++-- crmd/crmd_fsa.h | 4 ++-- crmd/crmd_lrm.h | 4 ++-- crmd/crmd_messages.h | 4 ++-- crmd/crmd_utils.h | 4 ++-- crmd/fsa_defines.h | 4 ++-- crmd/fsa_matrix.h | 4 ++-- crmd/fsa_proto.h | 4 ++-- crmd/notify.h | 4 ++-- crmd/te_callbacks.h | 4 ++-- crmd/tengine.h | 4 ++-- crmd/throttle.h | 4 ++-- fencing/standalone_config.h | 6 +++--- include/crm/attrd.h | 4 ++-- include/crm/cib.h | 4 ++-- include/crm/cib/internal.h | 4 ++-- include/crm/cib/util.h | 4 ++-- include/crm/cluster.h | 4 ++-- include/crm/cluster/election.h | 4 ++-- include/crm/cluster/internal.h | 4 ++-- include/crm/cluster/plugin.h | 4 ++-- include/crm/common/io.h | 6 +++--- include/crm/common/ipc.h | 4 ++-- include/crm/common/ipcs.h | 4 ++-- include/crm/common/iso8601.h | 4 ++-- include/crm/common/logging.h | 4 ++-- include/crm/common/mainloop.h | 4 ++-- include/crm/common/procfs.h | 6 +++--- include/crm/common/util.h | 4 ++-- include/crm/common/xml.h | 4 ++-- include/crm/compatibility.h | 4 ++-- include/crm/crm.h | 4 ++-- include/crm/error.h | 4 ++-- include/crm/fencing/internal.h | 4 ++-- include/crm/msg_xml.h | 4 ++-- include/crm/pengine/common.h | 4 ++-- include/crm/pengine/complex.h | 4 ++-- include/crm/pengine/internal.h | 4 ++-- include/crm/pengine/rules.h | 4 ++-- include/crm/pengine/status.h | 4 ++-- include/crm/services.h | 4 ++-- include/crm/stonith-ng.h | 4 ++-- include/crm/transition.h | 4 ++-- include/crm_internal.h | 6 +++--- include/doxygen.h | 6 +++--- include/portability.h | 2 +- lib/services/services_private.h | 4 ++-- lib/services/systemd.h | 4 ++-- lib/services/upstart.h | 4 ++-- mcp/pacemaker.h | 4 ++-- pengine/allocate.h | 4 ++-- pengine/pengine.h | 4 ++-- pengine/utils.h | 4 ++-- tools/crm_resource.h | 4 ++-- 61 files changed, 126 insertions(+), 126 deletions(-) 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/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/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/crmd/crmd.h b/crmd/crmd.h index 6039c854634..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 */ 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..ef02c40d4ea 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 */ diff --git a/crmd/crmd_messages.h b/crmd/crmd_messages.h index 732cc7acbbc..10787f0b3a9 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 */ 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/fsa_defines.h b/crmd/fsa_defines.h index 1846b072502..4a60e8f073f 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/notify.h b/crmd/notify.h index d54163f7933..131203834f8 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 */ 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/tengine.h b/crmd/tengine.h index 94a869314a2..89ca3094f8f 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 */ 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/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..2c380bf5541 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 */ 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..09ec10a3d9f 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 */ 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..8666dd85ce8 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 */ diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index a5939916a21..278b0941781 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 */ 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..88aaa5a8cad 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,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/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..30339554a95 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 */ 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 c5fbcb71173..24d7949c72c 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 */ 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/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.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/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/pengine/allocate.h b/pengine/allocate.h index 73f750e2960..a2c8fa256d6 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 */ 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/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/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 */ From 6aae8542abedc755b90c8c49aa5c429718fd12f1 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Tue, 12 Jan 2016 15:46:26 +0100 Subject: [PATCH 022/214] Fix RHBZ#1286316: Do an ordered shutdown of systemd resources have lrmd wait till systemd actually starts bringing down systemd resources instead of being confused if service is still active on first status send a reload to systemd whenever a unitfile is changed instead of doing this just with every 10th change --- lib/services/systemd.c | 11 ++++------- lrmd/lrmd.c | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) 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/lrmd/lrmd.c b/lrmd/lrmd.c index a64b430923e..518d5d17cb2 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 From 1fc728766db599513baf61aa97abe8a31f9589c1 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Mon, 18 Jan 2016 18:01:50 +0100 Subject: [PATCH 023/214] Build: spec: Move the normal resource agents into pacemaker-cli package --- pacemaker.spec.in | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 6f1c03346d7..af91f5a9960 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -418,7 +418,12 @@ exit 0 %{_sbindir}/fence_pcmk %{_sbindir}/stonith_admin -%doc %{_mandir}/man7/* +%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.* @@ -436,9 +441,9 @@ exit 0 %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" @@ -485,6 +490,21 @@ exit 0 %{_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/crm_attribute.* %exclude %{_mandir}/man8/crm_node.* From 08a617c223710a82038be9d22c45cb0b61ff7501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 18 Jan 2016 21:56:59 +0100 Subject: [PATCH 024/214] Build: printw test: no need to link with all the libs so far --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c200a68e0ee..fbb232550b0 100644 --- a/configure.ac +++ b/configure.ac @@ -943,7 +943,7 @@ 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" From 03331744d212022fd3fa51715f4273c12da10c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 18 Jan 2016 22:04:39 +0100 Subject: [PATCH 025/214] Build: printw test: prevent console mode not available in crm_mon ... due to curses library test fragility of configure script in hardened build environment (rhbz#1297985). AC_MSG_CHECKING statement moved so as not to collide with message emitted from within cc_supports_flag. --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fbb232550b0..c02f763541c 100644 --- a/configure.ac +++ b/configure.ac @@ -941,12 +941,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" 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( [ From f74c413cc6875361e8a1f4cbac27fc6a0356a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 13:58:11 +0100 Subject: [PATCH 026/214] Build: spec: fix whitespace inconsistencies --- pacemaker.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 78aece0b1e6..813ebe5b8c0 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -60,7 +60,7 @@ License: GPLv2+ and LGPLv2+ 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}-%{commit}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) AutoReqProv: on Requires: python @@ -339,7 +339,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 +348,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 From 4603882566777d1e5b52b638b461dc91bd16f580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 14:59:18 +0100 Subject: [PATCH 027/214] Build: spec: C++ compiler is not something currently needed It's not inspected in configure script either. --- README.markdown | 1 - pacemaker.spec.in | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index c0fbd7d6abf..bcc627fa6f5 100644 --- a/README.markdown +++ b/README.markdown @@ -42,7 +42,6 @@ This is not meant to be an exhaustive list: * libxml2-devel * libxslt-devel * python-devel -* gcc-c++ * bzip2-devel * gnutls-devel * pam-devel diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 813ebe5b8c0..e001965ea01 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -81,7 +81,7 @@ ExclusiveArch: i386 i686 x86_64 # Required for core functionality BuildRequires: automake autoconf libtool pkgconfig python 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: pkgconfig python-devel bzip2-devel pam-devel # Required for agent_config.h which specifies the correct scratch directory BuildRequires: resource-agents From f5782b600eb58ed99e9107beffcc7e67e054ea3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 15:02:46 +0100 Subject: [PATCH 028/214] Build: spec: fix redundant BR of pkgconfig --- pacemaker.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index e001965ea01..43f0079028b 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -81,7 +81,7 @@ ExclusiveArch: i386 i686 x86_64 # Required for core functionality BuildRequires: automake autoconf libtool pkgconfig python libtool-ltdl-devel BuildRequires: pkgconfig(glib-2.0) libxml2-devel libxslt-devel libuuid-devel -BuildRequires: pkgconfig python-devel 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 From c2ecb67bf2b7f101728ec668b4b77668baa57e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 15:04:10 +0100 Subject: [PATCH 029/214] Build: spec: fix redundant BR of python --- README.markdown | 3 +-- pacemaker.spec.in | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index bcc627fa6f5..1b596a2ec1b 100644 --- a/README.markdown +++ b/README.markdown @@ -37,11 +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 * bzip2-devel * gnutls-devel * pam-devel diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 43f0079028b..add415f3fe9 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -78,8 +78,8 @@ 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: python-devel bzip2-devel pam-devel From c525c5d0e6cb4389732e5f9566aa6b8779417115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 15:05:43 +0100 Subject: [PATCH 030/214] Build: spec: rely on system-wide RPM macros if available --- pacemaker.spec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index add415f3fe9..29250c4e6a9 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -13,7 +13,8 @@ %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))")} # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " From cdc6272a5332a9f4b20479abf139316bcfcfc2e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 15:07:08 +0100 Subject: [PATCH 031/214] Build: spec: prefer proper %license tag if available --- pacemaker.spec.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 29250c4e6a9..d88ccfae0fd 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -16,6 +16,9 @@ # 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 " # to disable or enable specific features @@ -440,7 +443,7 @@ exit 0 %doc %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/stonith_admin.* -%doc COPYING +%license COPYING %doc AUTHORS %doc ChangeLog @@ -505,7 +508,7 @@ exit 0 %exclude %{_mandir}/man8/pacemaker_remoted.* %exclude %{_mandir}/man8/stonith_admin.* -%doc COPYING +%license COPYING %doc AUTHORS %doc ChangeLog @@ -521,13 +524,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 @@ -542,7 +545,7 @@ exit 0 %{_sbindir}/pacemaker_remoted %{_mandir}/man8/pacemaker_remoted.* -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %files doc @@ -554,7 +557,7 @@ exit 0 %{py_site}/cts %{_datadir}/pacemaker/tests/cts %{_libexecdir}/pacemaker/lrmd_test -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %files -n %{name}-libs-devel @@ -567,7 +570,7 @@ exit 0 %{_var}/lib/pacemaker/gcov %endif %{_libdir}/pkgconfig/*.pc -%doc COPYING.LIB +%license COPYING.LIB %doc AUTHORS %changelog From e5210be68779529407316c5c602e4edc2c2d75c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 19 Jan 2016 18:03:28 +0100 Subject: [PATCH 032/214] Build: spec: associate subpackage with correct licenses --- pacemaker.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index d88ccfae0fd..11076c6f78c 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -545,7 +545,7 @@ exit 0 %{_sbindir}/pacemaker_remoted %{_mandir}/man8/pacemaker_remoted.* -%license COPYING.LIB +%license COPYING %doc AUTHORS %files doc @@ -557,7 +557,7 @@ exit 0 %{py_site}/cts %{_datadir}/pacemaker/tests/cts %{_libexecdir}/pacemaker/lrmd_test -%license COPYING.LIB +%license COPYING %doc AUTHORS %files -n %{name}-libs-devel From 1912d90f9ef7e188392ce30c7baf069ee736ec2f Mon Sep 17 00:00:00 2001 From: David Shane Holden Date: Tue, 19 Jan 2016 23:26:47 -0500 Subject: [PATCH 033/214] lib/services: use self-pipe sigchld handling when signalfd isn't available This allows child processes to be spawned with services_os_action_execute() on non-Linux platforms using the self-pipe trick. The only functional change this adds on Linux is to cleanup the SIGCHLD blocking when fork() fails and in the created child process. It might be better to use libevent for this but rather than start to add new dependencies this just adds a generic fix which should be supported across multiple platforms. --- lib/services/services_linux.c | 92 ++++++++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 17 deletions(-) diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index a9b09efde62..ee9bb55dbb1 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -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,9 +613,30 @@ 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"); @@ -620,13 +658,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 +703,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,6 +723,10 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) close(stderr_fd[1]); } + if (synchronous) { + sigchld_cleanup(); + } + action_launch_child(op); } @@ -677,14 +741,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); From e5964d586b43188017e7ba9dc421c750a6a1bf3b Mon Sep 17 00:00:00 2001 From: David Shane Holden Date: Tue, 19 Jan 2016 23:37:23 -0500 Subject: [PATCH 034/214] lib/ipc: allow PCMK_ipc_buffer to be smaller than default max sizes The current code for pick_ipc_buffer() only allows setting a buffer size larger than the default max values. --- lib/common/ipc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/common/ipc.c b/lib/common/ipc.c index 1ae2283376e..990a97fef34 100644 --- a/lib/common/ipc.c +++ b/lib/common/ipc.c @@ -747,22 +747,22 @@ struct crm_ipc_s { static unsigned int pick_ipc_buffer(unsigned int max) { + const char *env; static unsigned int global_max = 0; - if(global_max == 0) { - const char *env = getenv("PCMK_ipc_buffer"); + if (global_max != 0) + return global_max; - if (env) { - int env_max = crm_parse_int(env, "0"); + 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; - - } else { - global_max = MAX_MSG_SIZE; - } + global_max = QB_MAX(MIN_MSG_SIZE, env_max); + } else { + global_max = QB_MAX(MAX_MSG_SIZE, max); } - return QB_MAX(max, global_max); + return global_max; } crm_ipc_t * From d6775487ca0ed68e2ac8285606090b7341a6086e Mon Sep 17 00:00:00 2001 From: David Shane Holden Date: Wed, 20 Jan 2016 00:16:29 -0500 Subject: [PATCH 035/214] lib/common: check return value of dlsym() and not dlerror() dlsym() on FreeBSD can set dlerror() even though it sucessfully returns the address of the function. Without this change pacemaker will fail with the following error: Undefined symbol "_nss_cache_cycle_prevention_function" --- lib/common/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/common/utils.c b/lib/common/utils.c index 24933f65262..1cb8a6c67a9 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -2270,7 +2270,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); From 73bd9d50a6e1129216068077c8ada6006d5c4c34 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 20 Jan 2016 11:05:45 -0600 Subject: [PATCH 036/214] Build: rpmlintrc: update for new logrotate script location --- rpmlintrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpmlintrc b/rpmlintrc index 75b27879717..eec11e4ed7f 100644 --- a/rpmlintrc +++ b/rpmlintrc @@ -27,3 +27,9 @@ 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") From b4f06bdae68ba0cd264afdca888876987fefe3e2 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 12 Jan 2016 12:18:21 +0100 Subject: [PATCH 037/214] Fix: crm_shadow: Do not invoke shells with --noprofile option other than bash Previously, shells that don't support --noprofile option failed to be invoked. So far as I've seen, only bash supports --noprofile option. --- tools/cib_shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cib_shadow.c b/tools/cib_shadow.c index 000b0b05d37..845486c1459 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) { From 1672823db5c481712692db71bc14e7b4bceba86c Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 21 Jan 2016 11:19:20 +0100 Subject: [PATCH 038/214] Refactor: fencing: Functionize adding and removing active pids of device --- fencing/commands.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/fencing/commands.c b/fencing/commands.c index 650ec7b84a6..70168094460 100644 --- a/fencing/commands.c +++ b/fencing/commands.c @@ -270,6 +270,22 @@ get_action_limit(stonith_device_t * device) return action_limit; } +static void +device_add_active_pid(stonith_device_t * device, GPid pid) +{ + CRM_CHECK(device != NULL, return); + + device->active_pids = g_list_append(device->active_pids, GINT_TO_POINTER(pid)); +} + +static void +device_remove_active_pid(stonith_device_t * device, GPid pid) +{ + CRM_CHECK(device != NULL, return); + + device->active_pids = g_list_remove(device->active_pids, GINT_TO_POINTER(pid)); +} + static gboolean stonith_device_execute(stonith_device_t * device) { @@ -363,7 +379,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_pids = g_list_append(device->active_pids, GINT_TO_POINTER(exec_rc)); + device_add_active_pid(device, exec_rc); } else { crm_warn("Operation %s%s%s on %s failed: %s (%d)", @@ -897,7 +913,7 @@ status_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); + device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); if (rc == 1 /* unknown */ ) { @@ -934,7 +950,7 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); + device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); /* If we successfully got the targets earlier, don't disable. */ @@ -1910,7 +1926,7 @@ unfence_cb(GPid pid, int rc, const char *output, gpointer user_data) log_operation(cmd, rc, pid, NULL, output); if(dev) { - dev->active_pids = g_list_remove(dev->active_pids, GINT_TO_POINTER(pid)); + device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); } else { crm_trace("Device %s does not exist", cmd->device); @@ -1955,7 +1971,7 @@ st_child_done(GPid pid, int rc, const char *output, gpointer user_data) /* The device is ready to do something else now */ device = g_hash_table_lookup(device_list, cmd->device); if (device) { - device->active_pids = g_list_remove(device->active_pids, GINT_TO_POINTER(pid)); + device_remove_active_pid(device, pid); if (rc == pcmk_ok && (safe_str_eq(cmd->action, "list") || safe_str_eq(cmd->action, "monitor") || safe_str_eq(cmd->action, "status"))) { From 231b101154467f3f356f8b6fcd1892060bd01b8c Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 25 Jan 2016 13:15:33 +1100 Subject: [PATCH 039/214] Doc: CfS: Indicate how to pass naked options such as --ssh --- doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt b/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt index 744e734ef72..6b25b36105f 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]]+ + + If the 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` From b7d9eb92cdd07ee4d5d2d9a54136546d5966c7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 25 Jan 2016 14:13:07 +0100 Subject: [PATCH 040/214] Fix typos: [Dd]epen{(da->de),(a->da)}nc{y,ies} --- configure.ac | 2 +- doc/Clusters_from_Scratch/en-US/images/pcmk-stack.svg | 2 +- doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg | 2 +- pengine/regression.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index c02f763541c..cc9dfe75c1e 100644 --- a/configure.ac +++ b/configure.ac @@ -1075,7 +1075,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 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 Build Dependancy + sodipodi:role="line">Build Dependency Date: Fri, 22 Jan 2016 21:14:47 +0100 Subject: [PATCH 041/214] Fix: fencing: Correctly track active stonith actions When executing a stonith action, stonith_action_async_done() can re-invoke internal_stonith_action_execute(). In that case, it will introduce a new pid for the action, which can not be tracked by the invoker of stonith_action_execute_async(). This commit fixes it by adding stonith_device_t *active_on to async_command_t. --- fencing/commands.c | 49 ++++++++++++++++++++++++++-------------------- fencing/internal.h | 1 - 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/fencing/commands.c b/fencing/commands.c index 70168094460..2ea223dc0a5 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, @@ -270,20 +272,26 @@ get_action_limit(stonith_device_t * device) return action_limit; } -static void -device_add_active_pid(stonith_device_t * device, GPid pid) +static int +get_active_cmds(stonith_device_t * device) { - CRM_CHECK(device != NULL, return); + int counter = 0; + GListPtr gIter = NULL; + GListPtr gIterNext = NULL; - device->active_pids = g_list_append(device->active_pids, GINT_TO_POINTER(pid)); -} + CRM_CHECK(device != NULL, return 0); -static void -device_remove_active_pid(stonith_device_t * device, GPid pid) -{ - CRM_CHECK(device != NULL, return); + for (gIter = cmd_list; gIter != NULL; gIter = gIterNext) { + async_command_t *cmd = gIter->data; - device->active_pids = g_list_remove(device->active_pids, GINT_TO_POINTER(pid)); + gIterNext = gIter->next; + + if (cmd->active_on == device) { + counter++; + } + } + + return counter; } static gboolean @@ -293,16 +301,16 @@ stonith_device_execute(stonith_device_t * device) const char *action_str = NULL; async_command_t *cmd = NULL; stonith_action_t *action = NULL; - guint active_pids = 0; + int active_cmds = 0; int action_limit = 0; CRM_CHECK(device != NULL, return FALSE); - active_pids = g_list_length(device->active_pids); + active_cmds = get_active_cmds(device); action_limit = get_action_limit(device); - if (action_limit > -1 && active_pids >= action_limit) { - crm_trace("%s is over its action limit of %d (%u active pid%s)", - device->id, action_limit, active_pids, active_pids > 1 ? "s" : ""); + 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; } @@ -379,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_add_active_pid(device, exec_rc); + cmd->active_on = device; } else { crm_warn("Operation %s%s%s on %s failed: %s (%d)", @@ -470,7 +478,6 @@ free_device(gpointer data) free_async_command(cmd); } g_list_free(device->pending_ops); - g_list_free(device->active_pids); g_list_free_full(device->targets, free); @@ -913,7 +920,6 @@ status_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); if (rc == 1 /* unknown */ ) { @@ -950,7 +956,6 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data) return; } - device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); /* If we successfully got the targets earlier, don't disable. */ @@ -1925,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) { - device_remove_active_pid(dev, pid); mainloop_set_trigger(dev->work); } else { crm_trace("Device %s does not exist", cmd->device); @@ -1968,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_remove_active_pid(device, pid); if (rc == pcmk_ok && (safe_str_eq(cmd->action, "list") || safe_str_eq(cmd->action, "monitor") || safe_str_eq(cmd->action, "status"))) { diff --git a/fencing/internal.h b/fencing/internal.h index 1bd8e3769c5..5538a3acc17 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; - GListPtr active_pids; enum st_device_flags flags; From e862da8c7e028d121627bdc4b4032aa1814925a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 26 Jan 2016 21:03:15 +0100 Subject: [PATCH 042/214] Doc: PE: fix superfluous preposition --- doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 615b0784516933106a8446272bc3c043b0a0d50a Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 26 Jan 2016 14:04:30 -0600 Subject: [PATCH 043/214] Fix: crmd: set remote flag when gracefully shutting down remote nodes --- crmd/lrm_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 62e1c763fd4..7ea4e8a56f8 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -488,7 +488,7 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) 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, FALSE); + update_attrd(lrm_state->node_name, XML_CIB_ATTR_SHUTDOWN, now_s, NULL, TRUE); free(now_s); remote_proxy_ack_shutdown(lrmd); From 942efa4e8edcfdbdce42505c30c18cacd1d8fff0 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 26 Jan 2016 15:55:46 -0600 Subject: [PATCH 044/214] Fix: attrd: ensure remote nodes are in correct peer cache If attrd receives an update for an unknown node name, it assumes the unknown node is a cluster node, and adds it to the cluster peer cache. Previously, if the name was later used for a remote node, that would prevent its attributes from being written to the CIB. Now, when an attribute is received for a remote node, attrd will purge any inactive cluster peer cache entry before adding the node to the remote peer cache. --- attrd/commands.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/attrd/commands.c b/attrd/commands.c index 28e4a819525..b2cc83a0fad 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -634,6 +634,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)); @@ -642,11 +658,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); From ddd38b64a5b037e3167e6944c9f9a9486e3fad5b Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 29 Jan 2016 16:49:06 +1100 Subject: [PATCH 045/214] Log: PE: Fix conditions for internal sanity check --- pengine/clone.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pengine/clone.c b/pengine/clone.c index 66810eb171c..59ec5f22b2d 100644 --- a/pengine/clone.c +++ b/pengine/clone.c @@ -1280,9 +1280,10 @@ clone_update_actions_interleave(action_t * first, action_t * then, node_t * 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)); + /* We're only interested if 'then' is neither stopping nor being demoted */ 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_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); } From 9486c1ee52bb395d381375a517972b3a5bc905f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 27 Jan 2016 18:19:21 +0100 Subject: [PATCH 046/214] Typo: aferall -> afterall --- crmd/te_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmd/te_events.c b/crmd/te_events.c index 09abb131cfe..470cd061fd0 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -628,7 +628,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"; } From bdc673c6ef504c3dfc7a956676677a11b884e783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Sat, 30 Jan 2016 01:37:00 +0100 Subject: [PATCH 047/214] Typo: manditory -> mandatory --- ChangeLog | 4 ++-- include/crm/pengine/status.h | 4 ++-- lib/pengine/utils.c | 2 +- pengine/clone.c | 2 +- pengine/group.c | 6 +++--- pengine/native.c | 6 +++--- pengine/regression.sh | 2 +- xml/regression.sh | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) 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/include/crm/pengine/status.h b/include/crm/pengine/status.h index 180b97e74cf..66c1ff70657 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -393,8 +393,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/lib/pengine/utils.c b/lib/pengine/utils.c index 2f2a93a6361..5fd7a4b762e 100644 --- a/lib/pengine/utils.c +++ b/lib/pengine/utils.c @@ -398,7 +398,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); } diff --git a/pengine/clone.c b/pengine/clone.c index 59ec5f22b2d..7d2e07a9b7c 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); 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..6bcadb8b135 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -655,7 +655,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 +667,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; @@ -919,7 +919,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 { diff --git a/pengine/regression.sh b/pengine/regression.sh index c7f990c8aaa..8d7e3e8d6de 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" 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) " From 1a73967a0e98eb662651f73e50636468ecee0c3f Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 26 Oct 2015 16:37:45 -0500 Subject: [PATCH 048/214] Refactor: crmd: Do not check confirmed actions for effects on remote node state This code was ineffective due to a bug. Its intended functionality will be replaced later using cluster messages and the peer change callback. --- crmd/te_events.c | 74 ------------------------------------------------ 1 file changed, 74 deletions(-) diff --git a/crmd/te_events.c b/crmd/te_events.c index 470cd061fd0..2e94d9a744d 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 * From bf07539434f820905666f6dac7212b2f3d3c7ab3 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 8 Oct 2015 12:07:16 -0500 Subject: [PATCH 049/214] Feature: crmd: report pacemaker_remote node state in CIB status section crmd's do_update_node_cib() will now set XML_NODE_IN_CLUSTER ("in_ccm") for pacemaker_remote nodes based on the node's cached state. (Currently, the cached state is always member, but this will change later.) --- crmd/lrm.c | 15 +++++--------- crmd/membership.c | 53 ++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/crmd/lrm.c b/crmd/lrm.c index a73b2a92e07..8c0992c7c92 100644 --- a/crmd/lrm.c +++ b/crmd/lrm.c @@ -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 */ 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); From d6fee14ad9520c19495ea7874e70dabd27e94204 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 12 Oct 2015 16:26:14 -0500 Subject: [PATCH 050/214] Refactor: crmd: handle pacemaker_remote nodes in peer status callback crmd's peer_update_callback() now handles pacemaker_remote nodes. Currently, pacemaker_remote nodes never change status, so the callback isn't called yet, but it will be later. --- crmd/callbacks.c | 65 ++++++++++++++++++++++++++++++++++-------------- crmd/te_events.c | 5 ++++ 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/crmd/callbacks.c b/crmd/callbacks.c index b21232b6165..0dc987d695e 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,7 +198,7 @@ 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); + gboolean alive = is_remote? appeared : crm_is_peer_active(node); crm_action_t *down = match_down_event(0, node->uuid, NULL, appeared); crm_trace("Alive=%d, appear=%d, down=%p", alive, appeared, down); @@ -220,30 +221,56 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d /* down->confirmed = TRUE; Only stonith-ng returning should imply completion */ 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 came up, was expected %s (op %d)", + node->uname, task, down->id); } } else if (appeared == FALSE) { + /* match_down_event() doesn't match resource stop events for + * pacemaker_remote nodes, so normal pacemaker_remote node stops + * will come here and get ugly log messages, but otherwise be OK. + * We can't skip this entirely for pacemaker_remote nodes, + * because monitor failures will also end up here. + */ 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/te_events.c b/crmd/te_events.c index 2e94d9a744d..21739c44c7e 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -395,6 +395,11 @@ get_cancel_action(const char *id, const char *node) * \return Matching event if found, NULL otherwise * * \note "Down" events are CRM_OP_FENCE and CRM_OP_SHUTDOWN. + * \todo This should detect normal pacemaker_remote node stop events, + * where action->type is action_type_rsc, + * XML_LRM_ATTR_TASK is CRMD_ACTION_STOP, + * and the affected resource creates a remote node that matches target. + * Then, peer_update_callback() could ignore these. */ crm_action_t * match_down_event(int id, const char *target, const char *filter, bool quiet) From c29102d07a1e85f6d35688e88b7f85bdb44919ae Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 2 Feb 2016 13:37:25 +0100 Subject: [PATCH 051/214] Fix: liblrmd: Prevent potential use-after-free issues --- lib/lrmd/lrmd_client.c | 1 + lib/lrmd/proxy_common.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c index 8adf2c339ac..1f38794a132 100644 --- a/lib/lrmd/lrmd_client.c +++ b/lib/lrmd/lrmd_client.c @@ -1359,6 +1359,7 @@ lrmd_tls_disconnect(lrmd_t * lrmd) } else if (native->sock) { close(native->sock); + native->sock = 0; } if (native->pending_notify) { diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index eb17e4e2679..b90c3a7f20a 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -97,6 +97,7 @@ remote_proxy_end_session(const char *session) if (proxy->source) { mainloop_del_ipc_client(proxy->source); + proxy->source = NULL; } } From 5f0130fa31ed8c147f6132923e7cebf03a383c0b Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 2 Feb 2016 13:39:23 +0100 Subject: [PATCH 052/214] Fix: crmd: Prevent potential use-after-free --- crmd/lrm_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 7ea4e8a56f8..6d3cd6ab5cc 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -238,7 +238,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; } From 692fac0f33be19725a7c74f46e242ed1aa15e9e6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 5 Oct 2015 10:43:12 -0500 Subject: [PATCH 053/214] Feature: libcluster: send notifications when pacemaker_remote nodes are started This adds a new public API function crm_remote_peer_get(), which reduces code duplication in crm_remote_peer_cache_add() and remote_cache_refresh_helper(), and fixes a minor issue where a pointer was asserted to be non-NULL after it had already been dereferenced. Differences in behavior: * crm_remote_peer_get() calls crm_update_peer_uname() to set the node name, meaning that peer status callbacks will be called appropriately. The only effect is more consistent log messages for cluster and remote nodes. * crm_remote_peer_cache_add() now leaves the cache entry's state as NULL (unknown) rather than always set to member. Attrd is the only user of this function in pacemaker code, and it doesn't use state. * crm_remote_peer_cache_refresh() now calls crm_update_peer_state() to set the node state, meaning that peer status callbacks will be called appropriately. The most visible effect is that notification scripts will now be called for the initial spin-up of a pacemaker_remote node. --- include/crm/cluster.h | 1 + lib/cluster/membership.c | 104 ++++++++++++++++++++++++++++++++------- 2 files changed, 87 insertions(+), 18 deletions(-) diff --git a/include/crm/cluster.h b/include/crm/cluster.h index 2c380bf5541..f50bb3ba2f2 100644 --- a/include/crm/cluster.h +++ b/include/crm/cluster.h @@ -152,6 +152,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/lib/cluster/membership.c b/lib/cluster/membership.c index 3ec2c251f56..d8f1023eddf 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,21 +72,69 @@ 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 @@ -90,14 +163,9 @@ remote_cache_refresh_helper(xmlNode *cib, const char *xpath, const char *field) } if (remote) { - crm_trace("added %s to remote cache", remote); - node = calloc(1, sizeof(crm_node_t)); - node->flags = crm_remote_node; + node = crm_remote_peer_get(remote); 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); + crm_update_peer_state(__FUNCTION__, node, CRM_NODE_MEMBER, 0); } } freeXpathObject(xpathObj); From 364e5489317048ffa253725bb6ca8068d0140e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Sat, 30 Jan 2016 02:43:43 +0100 Subject: [PATCH 054/214] Doc: PE: be more explicit wrt. interval+enabled op properties (also add a missing tail dot) Heavily influenced by Ken's more accurate wording. --- doc/Pacemaker_Explained/en-US/Ch-Resources.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt index 80439e6a1e6..55d04992189 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt @@ -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 From af9a6be842fe6b236218e5d094b7a06dcdc915e0 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 7 Oct 2015 15:44:47 -0500 Subject: [PATCH 055/214] Feature: libcluster: set remote peer cache state based on CIB node state crm_remote_peer_cache_refresh() repopulates the remote peer cache based on the CIB. Previously, it would wipe the cache first, and always assume the node was online. Now, it updates the cache in place, and sets node state based on the value of XML_NODE_IN_CLUSTER ("in_ccm") in the CIB node state (or leaves the state unknown if the remote node is in the CIB configuration but does not have a CIB node state entry). Currently, the CIB node state is always member, so this has no real effect, but that will change later. --- include/crm/cluster.h | 3 + lib/cluster/membership.c | 142 ++++++++++++++++++++++++++++++--------- 2 files changed, 113 insertions(+), 32 deletions(-) diff --git a/include/crm/cluster.h b/include/crm/cluster.h index f50bb3ba2f2..9b623073b82 100644 --- a/include/crm/cluster.h +++ b/include/crm/cluster.h @@ -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* */ diff --git a/lib/cluster/membership.c b/lib/cluster/membership.c index d8f1023eddf..806032e250c 100644 --- a/lib/cluster/membership.c +++ b/lib/cluster/membership.c @@ -143,32 +143,89 @@ crm_remote_peer_cache_remove(const char *node_name) g_hash_table_remove(crm_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) { - node = crm_remote_peer_get(remote); - CRM_ASSERT(node); - crm_update_peer_state(__FUNCTION__, node, CRM_NODE_MEMBER, 0); + } 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 */ @@ -192,19 +249,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 From ff032c4d414b91237c4b9ed5eda73407fc0a785f Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 11 Nov 2015 18:39:06 -0600 Subject: [PATCH 056/214] Feature: crmd: add new message type for updating pacemaker_remote node state If crmd receives a CRM_OP_REMOTE_STATE message, it will update its remote peer cache with the specified remote node name and state. (Nothing sends these messages yet.) --- crmd/crmd_messages.h | 2 ++ crmd/messages.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ include/crm/crm.h | 1 + 3 files changed, 64 insertions(+) diff --git a/crmd/crmd_messages.h b/crmd/crmd_messages.h index 10787f0b3a9..44ce1d60362 100644 --- a/crmd/crmd_messages.h +++ b/crmd/crmd_messages.h @@ -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/messages.c b/crmd/messages.c index 5114519da78..c536e0fd098 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, + strcmp(remote_is_up, XML_BOOLEAN_TRUE)? + CRM_NODE_LOST : CRM_NODE_MEMBER, 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/include/crm/crm.h b/include/crm/crm.h index 09ec10a3d9f..d035d16d9df 100644 --- a/include/crm/crm.h +++ b/include/crm/crm.h @@ -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" From 438c6945a4be8ccefc8101b0addae834ee7ffc9a Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 22 Oct 2015 09:31:13 -0500 Subject: [PATCH 057/214] Feature: crmd: update node state for started pacemaker_remote nodes When a pacemaker_remote node first starts, the connection host initializes its node attributes and CIB state. Previously, these were done at two different points in the code. Now, they are both done when the remote connection result is reported, and additionally the host notifies the DC via a cluster message. This helps keep remote-specific code in remote_lrmd_ra.c, eliminates the DC needing to check operations for remote node effects, and reduces code duplication by using do_update_node_cib() instead of needing a separate simple_remote_node_status() function. This fixes one bug: Previously, if a remote connection did not have a reconnect-interval configured, and the node was stopped or lost and later rejoined, the PE would not be invoked immediately, so resource placement would not occur on the rejoined node. Now, the DC state message will cause the peer update callback to be called, which will abort the transition, triggering resource placement. --- crmd/crmd_lrm.h | 2 - crmd/lrm.c | 71 ------------------------------- crmd/remote_lrmd_ra.c | 99 +++++++++++++++++++++++++++++++++++-------- 3 files changed, 81 insertions(+), 91 deletions(-) diff --git a/crmd/crmd_lrm.h b/crmd/crmd_lrm.h index ef02c40d4ea..175eb181c3c 100644 --- a/crmd/crmd_lrm.h +++ b/crmd/crmd_lrm.h @@ -159,6 +159,4 @@ int remote_ra_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *acti 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); - gboolean process_lrm_event(lrm_state_t * lrm_state, lrmd_event_data_t * op, struct recurring_op_s *pending); diff --git a/crmd/lrm.c b/crmd/lrm.c index 8c0992c7c92..5f63676e83f 100644 --- a/crmd/lrm.c +++ b/crmd/lrm.c @@ -2123,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) { @@ -2241,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); diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index ca4923f39d3..47a72c515d3 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -162,11 +162,92 @@ 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 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); + } +} + 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 +389,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) { @@ -402,11 +470,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; From a4bfb1f03f845f52493b0f563cfb4e00d90c70dd Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 1 Feb 2016 16:48:39 +1100 Subject: [PATCH 058/214] Log: cib: Additional detail when patching xml --- cib/callbacks.c | 9 +++++++-- lib/cib/cib_ops.c | 2 +- lib/common/xml.c | 9 ++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cib/callbacks.c b/cib/callbacks.c index 69bace90bbe..414b907d687 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); @@ -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,6 +1330,7 @@ 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); } @@ -1334,7 +1339,7 @@ cib_process_command(xmlNode * request, xmlNode ** reply, xmlNode ** cib_diff, gb if ((call_options & cib_inhibit_notify) == 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/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/common/xml.c b/lib/common/xml.c index bebfcef20b3..33ebe1f5f49 100644 --- a/lib/common/xml.c +++ b/lib/common/xml.c @@ -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; } } From 1d1b13bd904658ab7b7850fa1b0149c35e54fc12 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 3 Feb 2016 15:01:22 +1100 Subject: [PATCH 059/214] Fix: cib: Do not send notifications when the dryrun flag is present --- cib/callbacks.c | 2 +- lib/cib/cib_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cib/callbacks.c b/cib/callbacks.c index 414b907d687..e6ee1d95402 100644 --- a/cib/callbacks.c +++ b/cib/callbacks.c @@ -1336,7 +1336,7 @@ cib_process_command(xmlNode * request, xmlNode ** reply, xmlNode ** cib_diff, gb } } - 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 %d", is_set(call_options, cib_dryrun)); 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); From 1a81582812f1062597e3b03be179b44058cd123f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 3 Feb 2016 21:07:33 +0100 Subject: [PATCH 060/214] xml: new fulldiff make target (diff all, subsequently) --- xml/Makefile.am | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xml/Makefile.am b/xml/Makefile.am index de522c719b2..5db32a6de52 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -44,6 +44,13 @@ RNG_last ?= $(shell ls -1 *.rng \ # 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_generated = pacemaker.rng $(foreach base,$(RNG_versions),pacemaker-$(base).rng) versions.rng @@ -121,6 +128,18 @@ diff: 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 +# diff fails with ec=2 if no predecessor is found +fulldiff: + @echo "# Comparing all changes across all the subsequent increments" + @for p in ${RNG_version_pairs}; do \ + set `echo "$$p" | tr '-' ' '`; echo "### *-$$1.rng vs. predecessor"; \ + for v in *-$$2.rng; do \ + echo "#### $${v} vs. predecessor"; b=`echo "$${v}" | cut -d'-' -f1`; \ + diff -u `$(top_srcdir)/xml/best-match.sh $${b} $$1` "$${v}" 2>/dev/null; \ + test $$? -le 1 || echo "##### $${v} has no predecessor"; \ + done; \ + done + sync: git rm -f $(wildcard *-next.rng) make pacemaker-next.rng From 5689bef733cbce20a3cfe9aec7113f6b94280cdb Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 19 Nov 2015 15:33:57 -0600 Subject: [PATCH 061/214] Feature: crmd: update node state for stopped pacemaker_remote nodes This updates a stopped pacemaker_remote node's status in the remote peer cache (to CRM_NODE_LOST) and CIB node state (to in_ccm=false), which triggers peer state callbacks. The most visible effect is sending notifications for stopped nodes. --- crmd/remote_lrmd_ra.c | 54 ++++++++++++++++++++++++++++++++++++++-- lib/cluster/membership.c | 4 ++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index 47a72c515d3..4f940135f78 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -222,6 +222,41 @@ remote_node_up(const char *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 @@ -238,6 +273,23 @@ check_remote_node_state(remote_ra_cmd_t *cmd) if (safe_str_eq(cmd->action, "start")) { remote_node_up(cmd->rsc_id); + + } 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); + } + } } } @@ -543,8 +595,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 { diff --git a/lib/cluster/membership.c b/lib/cluster/membership.c index 806032e250c..9d17bfb2592 100644 --- a/lib/cluster/membership.c +++ b/lib/cluster/membership.c @@ -140,7 +140,9 @@ crm_remote_peer_cache_add(const char *node_name) 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); + } } /*! From 8676234d88a0dec20cf0d3dc643a992c84f12c24 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 2 Feb 2016 12:15:13 -0600 Subject: [PATCH 062/214] Feature: crmd: update node state for migrated pacemaker_remote nodes --- crmd/remote_lrmd_ra.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index 4f940135f78..ce54e507a88 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -274,6 +274,13 @@ check_remote_node_state(remote_ra_cmd_t *cmd) if (safe_str_eq(cmd->action, "start")) { remote_node_up(cmd->rsc_id); + } else if (safe_str_eq(cmd->action, "migrate_from")) { + /* Ensure node is in this host's remote peer cache */ + 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; From 71745dcde46dd4cb89d35683ffe5f3bb2acbf8d9 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 29 Jan 2016 18:30:09 -0600 Subject: [PATCH 063/214] Feature: remote: recover from remote node fencing more quickly --- crmd/crmd_lrm.h | 1 + crmd/remote_lrmd_ra.c | 21 +++++++++++++++++++++ crmd/te_utils.c | 8 ++++++++ 3 files changed, 30 insertions(+) diff --git a/crmd/crmd_lrm.h b/crmd/crmd_lrm.h index 175eb181c3c..0e7ff481f38 100644 --- a/crmd/crmd_lrm.h +++ b/crmd/crmd_lrm.h @@ -158,5 +158,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); +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/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index ce54e507a88..b4aebd3e7ba 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -1025,3 +1025,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_utils.c b/crmd/te_utils.c index 3a9f491e4f1..03e3b04f230 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,13 @@ 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. + */ + if (is_set(peer->flags, crm_remote_node)) { + remote_ra_fail(st_event->target); + } + crmd_peer_down(peer, TRUE); } } From f47c270a934c05a73e71bc9528901a83f512b287 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 3 Feb 2016 11:37:14 -0600 Subject: [PATCH 064/214] Fix: libcluster: crm_peer_uname() should return NULL if uuid is invalid Previously, it would reuse the last node from a previous iteration, and set its uuid to the invalid uuid. --- lib/cluster/cluster.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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()) { From ccd73104ab69ec3006b446026a9d1ce1f8e2e0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 4 Feb 2016 01:13:44 +0100 Subject: [PATCH 065/214] Doc: CfS: continuation (literal->normal) et al. formatting (incl. typos) --- doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt b/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt index 6b25b36105f..2f85501b143 100644 --- a/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt +++ b/doc/Clusters_from_Scratch/en-US/Ch-Stonith.txt @@ -48,8 +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]]+ - - If the any flags that do not take arguments, such as `--ssl` should be passed as `ssl=1` ++ +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` From 749e18ef7918022310ce7d0dafeb03bf5c3bc65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 4 Feb 2016 22:32:44 +0100 Subject: [PATCH 066/214] xml: fulldiff target: fix the message The routine always compares selected version against its predecessor if present, not the other way around. --- xml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index 5db32a6de52..514049639bb 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -132,7 +132,7 @@ diff: fulldiff: @echo "# Comparing all changes across all the subsequent increments" @for p in ${RNG_version_pairs}; do \ - set `echo "$$p" | tr '-' ' '`; echo "### *-$$1.rng vs. predecessor"; \ + 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`; \ diff -u `$(top_srcdir)/xml/best-match.sh $${b} $$1` "$${v}" 2>/dev/null; \ From d0f7ca3c126bd255e472c92d865476c3aef32cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 4 Feb 2016 22:36:24 +0100 Subject: [PATCH 067/214] xml: fulldiff target: best effort per-hunk RNG context For instance, last hunk of diff -u resources-1.{0,2}.rng: > @@ -166,6 +213,7 @@ context: //operations/op/@on-fail > restart > standby > fence > + restart-container > > > --- xml/Makefile.am | 42 ++++++++++++++++++----- xml/context-of.xsl | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 8 deletions(-) create mode 100644 xml/context-of.xsl diff --git a/xml/Makefile.am b/xml/Makefile.am index 514049639bb..dcb08454162 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -128,17 +128,43 @@ diff: 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 -# diff fails with ec=2 if no predecessor is found +# 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 fulldiff: @echo "# Comparing all changes across all the subsequent increments" @for p in ${RNG_version_pairs}; 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`; \ - diff -u `$(top_srcdir)/xml/best-match.sh $${b} $$1` "$${v}" 2>/dev/null; \ - test $$? -le 1 || echo "##### $${v} has no predecessor"; \ - done; \ - done + 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=`$(top_srcdir)/xml/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 sync: git rm -f $(wildcard *-next.rng) 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From afdb39368b98ffc76e24318b51654ee7d7c1c0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 00:26:51 +0100 Subject: [PATCH 068/214] Doc: xml: mention fulldiff make target --- xml/Readme.md | 2 ++ 1 file changed, 2 insertions(+) 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`. From 3ae879df3270ead00700107819eedc50fd22987f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 10:01:03 +0100 Subject: [PATCH 069/214] xml: extract fulldiff target logic to a function + use in diff --- xml/Makefile.am | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index dcb08454162..1f451215ae3 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -36,12 +36,6 @@ RNG_numeric_versions = $(shell ls -1 *.rng \ # 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 \ @@ -51,6 +45,14 @@ RNG_version_pairs = $(join \ ) 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 @@ -119,26 +121,16 @@ pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am 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 - # 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 -fulldiff: - @echo "# Comparing all changes across all the subsequent increments" - @for p in ${RNG_version_pairs}; do \ - set `echo "$$p" | tr '-' ' '`; \ - echo "### *-$$2.rng vs. predecessor"; \ +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`; \ + echo "\#\#\#\# $${v} vs. predecessor"; b=`echo "$${v}" | cut -d- -f1`; \ old=`$(top_srcdir)/xml/best-match.sh $${b} $$1`; \ p=`diff -u "$${old}" "$${v}" 2>/dev/null`; \ case $$? in \ @@ -161,11 +153,19 @@ fulldiff: -e '/^\(---\|@@ \)/be;p;d;:e;n;be'; \ done; \ ;; \ - 2) echo "##### $${v} has no predecessor";; \ + 2) echo "\#\#\#\#\# $${v} has no predecessor";; \ esac; \ done; \ done +diff: + @echo "# Comparing changes in + since $(RNG_max)" + $(call version_diff,${RNG_version_pairs_last}) + +fulldiff: + @echo "# Comparing all changes across all the subsequent increments" + $(call version_diff,${RNG_version_pairs}) + sync: git rm -f $(wildcard *-next.rng) make pacemaker-next.rng From cff27f0d4e7b885929ec7cdd9c7cb51de7b0a8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 10:49:35 +0100 Subject: [PATCH 070/214] xml: diff: sanitize best-match.sh - uniform spacing/indentation - curly braces around named variables - quoting of the variables --- xml/best-match.sh | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/xml/best-match.sh b/xml/best-match.sh index 6d9ffb72193..8271274eb20 100755 --- a/xml/best-match.sh +++ b/xml/best-match.sh @@ -6,41 +6,41 @@ 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 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} - 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} + echo "${prefix}" >> "${destination}" fi fi From 3baf9e27d83998ab9646cf6926097a28884f5072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 11:01:58 +0100 Subject: [PATCH 071/214] xml: diff: make best-match.sh return nonzero on fail Adjust Makefile.am accordingly. --- xml/Makefile.am | 2 +- xml/best-match.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index 1f451215ae3..8627feeca83 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -111,7 +111,7 @@ pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am $(top_srcdir)/xml/best-match.sh cib $(*) $(@) " " echo " " >> $@ echo " " >> $@ - for rng in $(RNG_cfg_base); do $(top_srcdir)/xml/best-match.sh $$rng $(*) $(@) " "; done + for rng in $(RNG_cfg_base); do $(top_srcdir)/xml/best-match.sh $$rng $(*) $(@) " " || :; done echo " " >> $@ echo " " >> $@ echo " " >> $@ diff --git a/xml/best-match.sh b/xml/best-match.sh index 8271274eb20..36171c4e647 100755 --- a/xml/best-match.sh +++ b/xml/best-match.sh @@ -37,10 +37,12 @@ for rng in ${candidates}; do esac done -if [ "${best}" != "0.0" ]; then +[ "${best}" != "0.0" ]; ec=$? +if [ ${ec} -eq 0 ]; then if [ "x${destination}" = "x" ]; then echo "${base}-${best}.rng" else echo "${prefix}" >> "${destination}" fi fi +ret () { return $1; }; ret ${ec} From 09725a8abbb9fec116c82261c71d97c79cb79245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 11:05:42 +0100 Subject: [PATCH 072/214] xml: diff: make best-match.sh consider non-versioned files (special treatment because of nvset.rng) --- xml/best-match.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/xml/best-match.sh b/xml/best-match.sh index 36171c4e647..2ba062532e1 100755 --- a/xml/best-match.sh +++ b/xml/best-match.sh @@ -6,7 +6,7 @@ destination=$1; shift prefix=$1; shift best="0.0" -candidates=$(ls -1 "${base}"-*.rng 2>/dev/null) +candidates=$(ls -1 "${base}.rng" "${base}"-*.rng 2>/dev/null) for rng in ${candidates}; do case ${rng} in ${base}-${target}.rng) @@ -17,7 +17,12 @@ for rng in ${candidates}; do : skipping ${rng} ;; *) - v=$(echo ${rng} | sed -e "s/${base}-//" -e 's/.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" @@ -39,10 +44,15 @@ done [ "${best}" != "0.0" ]; ec=$? if [ ${ec} -eq 0 ]; then + if [ "${best}" = "0.1" ]; then + found=${base}.rng + else + found=${base}-${best}.rng + fi if [ "x${destination}" = "x" ]; then - echo "${base}-${best}.rng" + echo "${found}" else - echo "${prefix}" >> "${destination}" + echo "${prefix}" >> "${destination}" fi fi ret () { return $1; }; ret ${ec} From 9ae15f209afbeaadc1f586ee776153ff135bcb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 13:10:33 +0100 Subject: [PATCH 073/214] xml: diff: simplify best-match.sh invocation --- xml/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index 8627feeca83..cbff8e3bc6a 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -108,14 +108,14 @@ pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am echo "" >> $@ echo " " >> $@ echo " " >> $@ - $(top_srcdir)/xml/best-match.sh cib $(*) $(@) " " + ./best-match.sh cib $(*) $(@) " " echo " " >> $@ echo " " >> $@ - for rng in $(RNG_cfg_base); do $(top_srcdir)/xml/best-match.sh $$rng $(*) $(@) " " || :; done + for rng in $(RNG_cfg_base); do ./best-match.sh $$rng $(*) $(@) " " || :; done echo " " >> $@ echo " " >> $@ echo " " >> $@ - $(top_srcdir)/xml/best-match.sh status $(*) $(@) " " + ./best-match.sh status $(*) $(@) " " echo " " >> $@ echo " " >> $@ echo " " >> $@ @@ -131,7 +131,7 @@ version_diff = \ echo "\#\#\# *-$$2.rng vs. predecessor"; \ for v in *-$$2.rng; do \ echo "\#\#\#\# $${v} vs. predecessor"; b=`echo "$${v}" | cut -d- -f1`; \ - old=`$(top_srcdir)/xml/best-match.sh $${b} $$1`; \ + old=`./best-match.sh $${b} $$1`; \ p=`diff -u "$${old}" "$${v}" 2>/dev/null`; \ case $$? in \ 1) echo "$${p}" | sed -n -e '/^@@ /!d;=;p' \ From efb56deca4f9b8b90003d1605fe2f1092e822308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 5 Feb 2016 13:11:28 +0100 Subject: [PATCH 074/214] xml: diff: cleanup (unused "function", prerequisites) --- xml/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index cbff8e3bc6a..d5ceca05e33 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -67,8 +67,6 @@ RNG_SCRIPTS = $(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)" @@ -158,11 +156,11 @@ version_diff = \ done; \ done -diff: +diff: best-match.sh @echo "# Comparing changes in + since $(RNG_max)" $(call version_diff,${RNG_version_pairs_last}) -fulldiff: +fulldiff: best-match.sh @echo "# Comparing all changes across all the subsequent increments" $(call version_diff,${RNG_version_pairs}) From 356c8d65cd2361929555092363dd10fc29d43d46 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 2 Feb 2016 11:50:02 +0100 Subject: [PATCH 075/214] Fix: crmd: Disconnect the relevant remote proxies as well when disconnecting a remote node Previously, the relevant remote proxies would still exist even if a remote node was already disconnected. So whenever there was an event, it would still trigger remote_proxy_dispatch_internal(). Especially if the remote node was unexpectedly disconnected, lrmd_tls_send() would fail to relay the event and call lrmd_tls_disconnect() again. It actually always occurred when reconnecting to the remote node, which basically made reconnecting impossible. --- crmd/lrm_state.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 6d3cd6ab5cc..0f50fefaba0 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -287,6 +287,45 @@ 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) { @@ -296,6 +335,9 @@ 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)) { From 9af4d96307bf0fc993520e2db7a70ee48d7c10ae Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Fri, 5 Feb 2016 16:36:41 +0100 Subject: [PATCH 076/214] Fix: liblrmd: Prevent potential use-after-free Fix use-after-free introduced by c29102d --- lib/lrmd/proxy_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index b90c3a7f20a..eb17e4e2679 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -97,7 +97,6 @@ remote_proxy_end_session(const char *session) if (proxy->source) { mainloop_del_ipc_client(proxy->source); - proxy->source = NULL; } } From 515a21c9045f4404feb953aeb96141e1135e91d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 8 Feb 2016 16:45:34 +0100 Subject: [PATCH 077/214] xml: diff: use XSLTPROC from configure script --- xml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index d5ceca05e33..e05166a5460 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -142,7 +142,7 @@ version_diff = \ 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 -`; \ + } | $(XSLTPROC) --param skip 1 context-of.xsl -`; \ fi; \ echo "$${p}" | sed -n -e "$$(($${hline}-2)),$${hline}!d" \ -e '/^\(+++\|---\)/p'; \ From d21fc64b7ff6333a4bddbc6dca401dacc1541d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 9 Feb 2016 11:11:38 +0100 Subject: [PATCH 078/214] Build: make sure PACKAGE_URL is indeed defined --- configure.ac | 7 ++++++- version.m4 | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cc9dfe75c1e..4c0b7a10d4d 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 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]) From 3492794b1dfad0d6b85b53f7cc986a31dd6ee926 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Wed, 10 Feb 2016 11:22:08 +0100 Subject: [PATCH 079/214] Build: spec: Move the common directories under /var/lib/pacemaker into pacemaker-cli package Since pacemaker-remote needs these directories as well. --- pacemaker.spec.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index b372b61eb6d..578795fde58 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -443,11 +443,8 @@ exit 0 %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 /usr/lib/ocf/resource.d/pacemaker/controld /usr/lib/ocf/resource.d/pacemaker/o2cb /usr/lib/ocf/resource.d/pacemaker/remote @@ -526,6 +523,10 @@ exit 0 %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) From a00d265c558fd853ca58d07da348a5c8985627a7 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 10 Feb 2016 10:21:56 -0600 Subject: [PATCH 080/214] Refactor: crmd: handle_remote_state() can use crm_is_true() to simplify code This also adds more extensive comments about remote node state tracking. --- crmd/callbacks.c | 3 ++- crmd/messages.c | 2 +- crmd/remote_lrmd_ra.c | 18 +++++++++++++++++- crmd/te_utils.c | 2 ++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/crmd/callbacks.c b/crmd/callbacks.c index 0dc987d695e..34abe811422 100644 --- a/crmd/callbacks.c +++ b/crmd/callbacks.c @@ -240,7 +240,8 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d * pacemaker_remote nodes, so normal pacemaker_remote node stops * will come here and get ugly log messages, but otherwise be OK. * We can't skip this entirely for pacemaker_remote nodes, - * because monitor failures will also end up here. + * because recurring monitor failures will also end up here + * when the cluster recovers the connection resource. */ crm_notice("Stonith/shutdown of %s not matched", node->uname); diff --git a/crmd/messages.c b/crmd/messages.c index c536e0fd098..0753cd34544 100644 --- a/crmd/messages.c +++ b/crmd/messages.c @@ -674,7 +674,7 @@ handle_remote_state(xmlNode *msg) CRM_CHECK(remote_peer, return I_NULL); crm_update_peer_state(__FUNCTION__, remote_peer, - strcmp(remote_is_up, XML_BOOLEAN_TRUE)? + crm_is_true(remote_is_up)? CRM_NODE_LOST : CRM_NODE_MEMBER, 0); return I_NULL; } diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index b4aebd3e7ba..181c462e31d 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -275,7 +275,13 @@ check_remote_node_state(remote_ra_cmd_t *cmd) remote_node_up(cmd->rsc_id); } else if (safe_str_eq(cmd->action, "migrate_from")) { - /* Ensure node is in this host's remote peer cache */ + /* 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); @@ -298,6 +304,16 @@ check_remote_node_state(remote_ra_cmd_t *cmd) } } } + + /* 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 diff --git a/crmd/te_utils.c b/crmd/te_utils.c index 03e3b04f230..c2e16f5e5f0 100644 --- a/crmd/te_utils.c +++ b/crmd/te_utils.c @@ -360,6 +360,8 @@ tengine_stonith_notify(stonith_t * st, stonith_event_t * st_event) /* 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); From 6424a647dd160d7a0c8e13a0908297df1a5b2c6f Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 11 Feb 2016 12:32:29 +1100 Subject: [PATCH 081/214] Feature: Allow cluster and remote LRM API versions to diverge Requiring the same version is not realistic. Common examples will be rolling upgrades (where typically you'd upgrade the cluster first) and guest introspection (where you may never upgrade the guest software). Normally you want the "server" to be the higher, however the client/sever roles are turned on their head here since the cluster is acting as the "client" connecting to pacemaker remote "server". However we generally want pacemaker-remote to be as dumb as possible which is consistent with how we'd do upgrades. So for this reason we require that the remote node's API version be less-than or equal to that of the cluster. --- include/crm/lrmd.h | 2 +- lib/lrmd/lrmd_client.c | 5 ++++- lrmd/lrmd.c | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/crm/lrmd.h b/include/crm/lrmd.h index 7d2ecf478b3..9ff88e1f9de 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" diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c index 8adf2c339ac..5ccaeb561df 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 * @@ -907,6 +908,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 +916,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 +930,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; } } diff --git a/lrmd/lrmd.c b/lrmd/lrmd.c index 518d5d17cb2..13f426d89bb 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -1380,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)) { From 8199a4839413921a5d197fef1512d5c150ec1b91 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 11 Feb 2016 12:42:15 +1100 Subject: [PATCH 082/214] Refactor: Common function for checking SBD/watchdog configuration --- crmd/control.c | 21 ++------------------- lib/common/utils.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/crmd/control.c b/crmd/control.c index 406c880361c..051bc50b674 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -938,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 }, @@ -1025,16 +1025,7 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void 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) { + if(value == NULL && sbd_timeout > 0) { char *timeout = NULL; st_timeout = 2 * sbd_timeout / 1000; @@ -1044,14 +1035,6 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void 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"); diff --git a/lib/common/utils.c b/lib/common/utils.c index 1cb8a6c67a9..05518bc74e5 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -129,6 +129,40 @@ 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(st_timeout > 0 && !daemon_option_enabled(crm_system_name, "watchdog")) { + do_crm_log_always(LOG_EMERG, "Shutting down: no watchdog device configured"); + crm_exit(DAEMON_RESPAWN_STOP); + + } else if(!daemon_option_enabled(crm_system_name, "watchdog")) { + crm_trace("Watchdog disabled"); + return TRUE; + + } else if(value == NULL && sbd_timeout > 0) { + /* Control.c on the host will set this, for now accept it */ + return TRUE; + + } else if(st_timeout <= 0) { + crm_notice("Watchdog enabled but stonith-watchdog-timeout is disabled"); + return TRUE; + + } 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; +} + + gboolean check_boolean(const char *value) { From 68d4ddf619026029728392d08464dfff8216d625 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 11 Feb 2016 14:40:09 +1100 Subject: [PATCH 083/214] Feature: remote: Ensure SBD is consistently configured on remote nodes --- crmd/lrm_state.c | 37 ++++++++++++++++++++++++++++++++ include/crm/lrmd.h | 2 ++ include/crm_internal.h | 2 ++ lib/lrmd/lrmd_client.c | 19 ++++++++++++++++ lrmd/lrmd.c | 3 +++ lrmd/pacemaker_remote.service.in | 3 ++- 6 files changed, 65 insertions(+), 1 deletion(-) diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 7ea4e8a56f8..a3441e8c7f6 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; @@ -463,6 +465,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) { @@ -495,6 +526,7 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) 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); @@ -503,6 +535,11 @@ 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); + + /* 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); diff --git a/include/crm/lrmd.h b/include/crm/lrmd.h index 9ff88e1f9de..c21015debd2 100644 --- a/include/crm/lrmd.h +++ b/include/crm/lrmd.h @@ -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,7 @@ 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" diff --git a/include/crm_internal.h b/include/crm_internal.h index 24d7949c72c..87658689f8f 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -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); @@ -385,5 +386,6 @@ 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/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c index 5ccaeb561df..6f9ea7f6b59 100644 --- a/lib/lrmd/lrmd_client.c +++ b/lib/lrmd/lrmd_client.c @@ -881,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) { diff --git a/lrmd/lrmd.c b/lrmd/lrmd.c index 13f426d89bb..a63346bb96a 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -1686,6 +1686,9 @@ 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)) { + const char *timeout = crm_element_value(request, F_LRMD_WATCHDOG); + check_sbd_timeout(timeout); } else { rc = -EOPNOTSUPP; do_reply = 1; diff --git a/lrmd/pacemaker_remote.service.in b/lrmd/pacemaker_remote.service.in index 72529760e28..d5e79308032 100644 --- a/lrmd/pacemaker_remote.service.in +++ b/lrmd/pacemaker_remote.service.in @@ -9,7 +9,8 @@ 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 From f2f9ded4c4ae43318deba6dc20ee458162f9bb3c Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 11 Feb 2016 10:28:48 +0100 Subject: [PATCH 084/214] Fix: ipc: Respect the parameter of pick_ipc_buffer() but don't let it affect the global value e5964d5 changed the logic in pick_ipc_buffer(). It doesn't look right to let the parameter "max" affect "global_max". And any following invocations would basically ignore "max" and directly return "global_max". --- lib/common/ipc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/common/ipc.c b/lib/common/ipc.c index 990a97fef34..7e844287f10 100644 --- a/lib/common/ipc.c +++ b/lib/common/ipc.c @@ -747,22 +747,22 @@ struct crm_ipc_s { static unsigned int pick_ipc_buffer(unsigned int max) { - const char *env; static unsigned int global_max = 0; - if (global_max != 0) - return global_max; + if (global_max == 0) { + const char *env = getenv("PCMK_ipc_buffer"); - env = getenv("PCMK_ipc_buffer"); - if (env) { - int env_max = crm_parse_int(env, "0"); + if (env) { + int env_max = crm_parse_int(env, "0"); - global_max = QB_MAX(MIN_MSG_SIZE, env_max); - } else { - global_max = QB_MAX(MAX_MSG_SIZE, max); + global_max = (env_max > 0)? QB_MAX(MIN_MSG_SIZE, env_max) : MAX_MSG_SIZE; + + } else { + global_max = MAX_MSG_SIZE; + } } - return global_max; + return QB_MAX(max, global_max); } crm_ipc_t * From e30112e4822e372b6db75890133610dbe9db7be2 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 11 Feb 2016 15:01:22 +1100 Subject: [PATCH 085/214] Fix: crmd: Only poopulate stonith-watchdog-timeout if SBD is active --- crmd/control.c | 4 ++-- lib/common/utils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crmd/control.c b/crmd/control.c index 051bc50b674..c98cb4b4ab7 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -1025,12 +1025,12 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void sbd_timeout = crm_get_msec(value); value = crmd_pref(config_hash, "stonith-watchdog-timeout"); - if(value == NULL && sbd_timeout > 0) { + if(value == NULL && sbd_timeout > 0 && pcmk_locate_sbd()) { char *timeout = NULL; st_timeout = 2 * sbd_timeout / 1000; timeout = crm_strdup_printf("%lds", st_timeout); - crm_notice("Setting stonith-watchdog-timeout=%s", timeout); + crm_notice("Detected SBD running, 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); diff --git a/lib/common/utils.c b/lib/common/utils.c index 05518bc74e5..d987e4e83c3 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -138,7 +138,7 @@ check_sbd_timeout(const char *value) long 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: no watchdog device configured"); + do_crm_log_always(LOG_EMERG, "Shutting down: no watchdog device configured: %s: %s", value, daemon_option("watchdog")); crm_exit(DAEMON_RESPAWN_STOP); } else if(!daemon_option_enabled(crm_system_name, "watchdog")) { From f557164e4f13940dc28f44866bf080553e912b6c Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 12 Feb 2016 11:25:12 +1100 Subject: [PATCH 086/214] Feature: Fencing: Simplify watchdog integration We should never ask the user to configure what we can inferr. Advertise the watchdog if stonith-watchdog-timeout is configured. Require SBD if stonith-watchdog-timeout is configured. You can still enable SBD without allowing auto-recovery with stonith-watchdog-timeout --- crmd/control.c | 2 +- crmd/election.c | 9 +++------ crmd/pengine.c | 7 ++----- fencing/main.c | 17 +++++++++-------- lib/common/utils.c | 23 ++++++++--------------- 5 files changed, 23 insertions(+), 35 deletions(-) diff --git a/crmd/control.c b/crmd/control.c index c98cb4b4ab7..ea87ff2e2ef 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -1038,7 +1038,7 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void } 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; } 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/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/fencing/main.c b/fencing/main.c index b0afced1041..1435d8eac7f 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -1083,15 +1083,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 +1100,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) { @@ -1491,7 +1492,7 @@ main(int argc, char **argv) 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/lib/common/utils.c b/lib/common/utils.c index d987e4e83c3..1a357f60fed 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -137,29 +137,22 @@ check_sbd_timeout(const char *value) long sbd_timeout = crm_get_msec(env_value); long 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: no watchdog device configured: %s: %s", value, daemon_option("watchdog")); - crm_exit(DAEMON_RESPAWN_STOP); - - } else if(!daemon_option_enabled(crm_system_name, "watchdog")) { - crm_trace("Watchdog disabled"); - return TRUE; - - } else if(value == NULL && sbd_timeout > 0) { - /* Control.c on the host will set this, for now accept it */ - return TRUE; - - } else if(st_timeout <= 0) { + if(value == NULL || st_timeout <= 0) { crm_notice("Watchdog enabled but stonith-watchdog-timeout is disabled"); - return TRUE; + + } 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; } - return FALSE; + return TRUE; } From c41e203891ef6a52f67a99eaaf141b07008b28dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= Date: Fri, 12 Feb 2016 08:49:55 +0100 Subject: [PATCH 087/214] Fix: crm_shadow: fix broken --display command The command line flag for crm_shadow --display is 'p', but the command section looks for 'P', so the crm_shadow --display command never actually does anything. This commit fixes the typo. --- tools/cib_shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cib_shadow.c b/tools/cib_shadow.c index 845486c1459..2fe66f13027 100644 --- a/tools/cib_shadow.c +++ b/tools/cib_shadow.c @@ -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); From 11bccdb11a0baa2dd5637478b17460bf3e56d1ed Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 10 Feb 2016 09:17:53 -0600 Subject: [PATCH 088/214] Test: CTS: update documentation for how to run container tests --- README.markdown | 4 ++++ cts/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.markdown b/README.markdown index 1b596a2ec1b..f92b5e6fa7e 100644 --- a/README.markdown +++ b/README.markdown @@ -70,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/cts/README.md b/cts/README.md index 0486e9eac11..d387e918e96 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 From a8d518b86477b24ac06779543bae42f9e065d9ba Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 12 Feb 2016 10:48:59 -0600 Subject: [PATCH 089/214] Test: CTS: use RSA in ssh key example DSA is no longer considered as secure. --- cts/README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cts/README.md b/cts/README.md index d387e918e96..15ecdd0805a 100644 --- a/cts/README.md +++ b/cts/README.md @@ -245,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. From 75a636d3bbebbc397641422501ea056fd8043ac3 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 10 Feb 2016 12:41:06 -0600 Subject: [PATCH 090/214] Test: CTS: improve LXC generation script * Create /run for containers * Ensure the container's network interface is brought up * Set the default gateway using the ip command * Don't restore default network if it didn't exist to begin with * Only modify configuration section of CIB * Wait for cluster to stabilize before destroying containers * Purge nodes from caches and CIB status section when cleaning up --- cts/lxc_autogen.sh.in | 57 +++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/cts/lxc_autogen.sh.in b/cts/lxc_autogen.sh.in index e11532b33cc..d06ba2ddb56 100755 --- a/cts/lxc_autogen.sh.in +++ b/cts/lxc_autogen.sh.in @@ -16,6 +16,7 @@ add_master=0 verify=0 working_dir="@CRM_CONFIG_CTS@/lxc" curdir=$(pwd) +run_dirs="/run /var/run /usr/var/run" function helptext() { echo "lxc_autogen.sh - A tool for generating libvirt lxc containers for testing purposes." @@ -124,12 +125,14 @@ set_network() END - ls restore_default.xml > /dev/null 2>&1 - if [ $? -ne 0 ]; then - virsh net-dumpxml default > restore_default.xml + 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 @@ -153,8 +156,9 @@ generate() 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 + for dir in $run_dirs; do + mkdir -p lxc$c-filesystem/$dir + done rm -f lxc$c.xml suffix=$((10 + $c)) @@ -179,14 +183,16 @@ generate() +END + for dir in $run_dirs; do + cat << END >> lxc$c.xml - - - - - - + + +END + done + cat << END >> lxc$c.xml @@ -216,7 +222,8 @@ END 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 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 @@ -262,7 +269,7 @@ 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 } @@ -298,7 +305,7 @@ apply_cib_entries() unset CIB_file - cibadmin --replace --xml-file cur.cib + cibadmin --replace -o configuration --xml-file cur.cib rm -f cur.cib } @@ -332,8 +339,17 @@ restore_cib() cibadmin -B unset CIB_file - cibadmin --replace --xml-file cur.cib + cibadmin --replace -o configuration --xml-file cur.cib rm -f cur.cib + + # Allow the cluster to stabilize before continuing + crm_resource --wait + + # Purge nodes from caches and CIB status section + for tmp in $(ls lxc*.xml); do + tmp=$(echo $tmp | sed -e 's/\.xml//g') + crm_node --force --remove $tmp + done } restore_libvirt() @@ -347,10 +363,9 @@ restore_libvirt() echo "$tmp destroyed" 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 + 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 From 9dd76af0a8900eb4c1f3b79b012fe6738e9035db Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 12 Feb 2016 15:19:10 -0600 Subject: [PATCH 091/214] Test: CTS: ignore expected probe error for RemoteLXC test --- cts/CTStests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cts/CTStests.py b/cts/CTStests.py index 6aeb818449e..3b0a7f6f884 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -2641,6 +2641,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) From 3748ad6868fd637665f216e1afcb757801082087 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 12 Feb 2016 16:13:54 -0600 Subject: [PATCH 092/214] Fix: crmd: set remote state correctly on DC a00d265 made handle_remote_state() use crm_is_true() but failed to keep the sense of the test correct --- crmd/messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmd/messages.c b/crmd/messages.c index 0753cd34544..060396ff9d7 100644 --- a/crmd/messages.c +++ b/crmd/messages.c @@ -675,7 +675,7 @@ handle_remote_state(xmlNode *msg) crm_update_peer_state(__FUNCTION__, remote_peer, crm_is_true(remote_is_up)? - CRM_NODE_LOST : CRM_NODE_MEMBER, 0); + CRM_NODE_MEMBER : CRM_NODE_LOST, 0); return I_NULL; } From 8934f8feb09becb77e7cf93b7ee953b4ae23e66d Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 15 Feb 2016 15:51:56 +1100 Subject: [PATCH 093/214] Fix: common: Assume processes are active if we get EACCESS --- lib/common/utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/common/utils.c b/lib/common/utils.c index 1a357f60fed..8c1a19f49ee 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1245,10 +1245,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; @@ -1799,7 +1803,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'; From 415f21feaf57dd3a6b291793e090c2bd03e4ec12 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 15 Feb 2016 18:04:54 +1100 Subject: [PATCH 094/214] Fix: Correctly locate sbd via its pidfile --- include/crm_internal.h | 4 +-- lib/common/utils.c | 70 +++++++++++++++++++----------------------- lib/common/watchdog.c | 15 +++++---- 3 files changed, 41 insertions(+), 48 deletions(-) diff --git a/include/crm_internal.h b/include/crm_internal.h index 87658689f8f..618c0616a2b 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -264,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); } diff --git a/lib/common/utils.c b/lib/common/utils.c index 8c1a19f49ee..ae2e465e94b 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1274,17 +1274,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; } @@ -1292,6 +1299,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); } } @@ -1302,46 +1311,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 diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index d6dc29094f8..c9018fe2ad2 100644 --- a/lib/common/watchdog.c +++ b/lib/common/watchdog.c @@ -225,15 +225,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 +239,7 @@ pcmk_locate_sbd(void) if(sbd_pid < 0) { sbd_pid = 0; + crm_trace("SBD not detected"); } free(pidfile); From 9bbce5d64cecdb70bfc8180084b91433f0af0e17 Mon Sep 17 00:00:00 2001 From: yuusuke Date: Tue, 16 Feb 2016 12:57:32 +0900 Subject: [PATCH 095/214] fix: Modified so that the cluster to stop before the rsyslog --- mcp/pacemaker.service.in | 1 + 1 file changed, 1 insertion(+) 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 From 755ba4bb7cdb7ec8aa1dfc2ae816b85a9252ad6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Tue, 16 Feb 2016 11:21:14 +0100 Subject: [PATCH 096/214] The default IPC buffer size is 128k since 1.1.10 (8196f23a) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- mcp/pacemaker.sysconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcp/pacemaker.sysconfig b/mcp/pacemaker.sysconfig index 4b1fdff12ab..28b8588ab68 100644 --- a/mcp/pacemaker.sysconfig +++ b/mcp/pacemaker.sysconfig @@ -80,8 +80,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 From 17bb46e3d479c4b08c4e5dc9d808c78a27340137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Sun, 14 Feb 2016 17:48:57 +0100 Subject: [PATCH 097/214] Fix state file metadata in Dummy, Stateful and HealthCPU resource agents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And the metadata output example in the documentation. Thanks: Jan Pokorný Signed-off-by: Ferenc Wágner --- doc/Pacemaker_Explained/en-US/Ch-Resources.txt | 2 +- extra/resources/Dummy | 2 +- extra/resources/HealthCPU | 2 +- extra/resources/Stateful | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt index 55d04992189..7b49af0433d 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 - + diff --git a/extra/resources/Dummy b/extra/resources/Dummy index 8a38ef57504..c24e7aa2379 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 - + diff --git a/extra/resources/HealthCPU b/extra/resources/HealthCPU index 1ceaa01bbca..f48854fb04c 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 - + diff --git a/extra/resources/Stateful b/extra/resources/Stateful index 2ae65add686..c5184d572db 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 - + From b253bf8e34d8495f91051064d8052294c9c52951 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 18 Feb 2016 11:21:56 +1100 Subject: [PATCH 098/214] Fix: remote: Correctly check for SBD configuration consistency --- lib/common/utils.c | 3 ++- lrmd/lrmd.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/common/utils.c b/lib/common/utils.c index ae2e465e94b..516427d2caf 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -138,7 +138,7 @@ check_sbd_timeout(const char *value) long st_timeout = crm_get_msec(value); if(value == NULL || st_timeout <= 0) { - crm_notice("Watchdog enabled but stonith-watchdog-timeout is disabled"); + 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); @@ -152,6 +152,7 @@ check_sbd_timeout(const char *value) return FALSE; } + crm_info("Watchdog functionality is consistent: %s delay exceeds timeout of %s", value, env_value); return TRUE; } diff --git a/lrmd/lrmd.c b/lrmd/lrmd.c index a63346bb96a..11e38d70922 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -1687,7 +1687,9 @@ process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request) do_notify = 1; do_reply = 1; } else if (crm_str_eq(op, LRMD_OP_CHECK, TRUE)) { - const char *timeout = crm_element_value(request, F_LRMD_WATCHDOG); + 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; From 8d08316c7b9006808f883cb172ab23d0227d0601 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 18 Feb 2016 11:33:24 +1100 Subject: [PATCH 099/214] Fix: crmd: Do not turn on stonith-watchdog-timeout automatically if SBD is detected Leave it up to the admin to decide if they want SBD used as an implicit fencing device, or just as a safety precaution. --- crmd/control.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/crmd/control.c b/crmd/control.c index ea87ff2e2ef..53d850e0ab8 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -979,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; @@ -1021,22 +1019,6 @@ 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"); - if(value == NULL && sbd_timeout > 0 && pcmk_locate_sbd()) { - char *timeout = NULL; - - st_timeout = 2 * sbd_timeout / 1000; - timeout = crm_strdup_printf("%lds", st_timeout); - crm_notice("Detected SBD running, 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); - } - value = crmd_pref(config_hash, "no-quorum-policy"); if (safe_str_eq(value, "suicide") && pcmk_locate_sbd()) { no_quorum_suicide_escalation = TRUE; From bcced6cf8fbdca7bb91121989e30b29ca5351f5a Mon Sep 17 00:00:00 2001 From: Hideo Yamauchi Date: Thu, 18 Feb 2016 11:22:24 +0900 Subject: [PATCH 100/214] Fix: pacemakerd: Correction of the stonithd process judgment of pacemakerd. --- mcp/pacemaker.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mcp/pacemaker.c b/mcp/pacemaker.c index 41b93d1f793..accb2961e20 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 */ From 68a6e5b92b5a73dd87da36d75534b94eb124a2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 18 Feb 2016 14:47:24 +0100 Subject: [PATCH 101/214] Low: action_launch_child is effectively noreturn Explicit commented assert will ease the code comprehension. --- lib/services/services_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index ee9bb55dbb1..a01d5966553 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -728,6 +728,7 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) } action_launch_child(op); + CRM_ASSERT(0); /* action_launch_child is effectively noreturn */ } /* Only the parent reaches here */ From 59c0fa751cf8293fee3344d404540d55f363ab3f Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 18 Feb 2016 18:00:33 +0100 Subject: [PATCH 102/214] Fix: crmd: Prevent use-after-free when an unexpected remote client takes over --- crmd/crmd_lrm.h | 1 + crmd/lrm_state.c | 12 +++++++++++- crmd/remote_lrmd_ra.c | 7 +++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/crmd/crmd_lrm.h b/crmd/crmd_lrm.h index 0e7ff481f38..412ce5be8a1 100644 --- a/crmd/crmd_lrm.h +++ b/crmd/crmd_lrm.h @@ -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, diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 0f50fefaba0..0e0c6501154 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -327,7 +327,7 @@ remote_proxy_disconnect_by_node(const char * node_name) } void -lrm_state_disconnect(lrm_state_t * lrm_state) +lrm_state_disconnect_only(lrm_state_t * lrm_state) { int removed = 0; @@ -344,6 +344,16 @@ lrm_state_disconnect(lrm_state_t * lrm_state) 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; diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index 181c462e31d..27c951a1c16 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -492,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; } From 5976fded9494bbb08e15c5ab6736f3bdfd8058ac Mon Sep 17 00:00:00 2001 From: NAKAHIRA Kazutomo Date: Thu, 18 Feb 2016 15:23:32 +0900 Subject: [PATCH 103/214] Fix: libservices: Check resource agent is executable or not before pipe open. Currently, if lrmd execute resource operation and resource agent does not exist, then pipe does not closed. It waste 4 file descriptors each resource operation. --- lib/services/services_linux.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index ee9bb55dbb1..2e1a8463081 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -638,14 +638,6 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) } #endif - if (pipe(stdout_fd) < 0) { - crm_err("pipe() failed"); - } - - if (pipe(stderr_fd) < 0) { - crm_err("pipe() failed"); - } - /* Fail fast */ if(stat(op->opaque->exec, &st) != 0) { int rc = errno; @@ -657,6 +649,14 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) return FALSE; } + if (pipe(stdout_fd) < 0) { + crm_err("pipe() failed"); + } + + if (pipe(stderr_fd) < 0) { + crm_err("pipe() failed"); + } + if (synchronous) { #ifdef HAVE_SYS_SIGNALFD_H sigemptyset(&mask); From 84e1b59bedb28021cee701144b30020abc5256c8 Mon Sep 17 00:00:00 2001 From: NAKAHIRA Kazutomo Date: Thu, 18 Feb 2016 15:26:19 +0900 Subject: [PATCH 104/214] Fix: libservices: Add error handling for pipe() failed. libservices have no error handling for pipe() failed. If pipe() succeed for standard output and pipe() failed for error output, then command in the resource agent receive SIGPIPE when output to standard output. It seems that resource operation have to fail explicitly when pipe() failed occurred because it raise weird error in the resource agent. --- lib/services/services_linux.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index 2e1a8463081..d74b4dba8eb 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -650,11 +650,30 @@ services_os_action_execute(svc_action_t * op, gboolean synchronous) } if (pipe(stdout_fd) < 0) { - crm_err("pipe() failed"); + 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; } if (pipe(stderr_fd) < 0) { - crm_err("pipe() failed"); + int rc = errno; + + 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); + } + return FALSE; } if (synchronous) { From 7ee805990ec872b9da0d3a447b945e625f118cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 19 Feb 2016 15:57:45 +0100 Subject: [PATCH 105/214] Build: spec: declare also BSD license as suitable This is because of the license of the initscripts. --- pacemaker.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 578795fde58..4b43d9d2bee 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -60,7 +60,12 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager Version: 1.1.14 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 @@ -191,7 +196,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} From 29cd1cbd9d3499585e012bf66f5b6234cec617d0 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 19 Feb 2016 15:11:03 -0600 Subject: [PATCH 106/214] Doc: Pacemaker Explained: improve description of location constraints --- .../en-US/Ch-Constraints.txt | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 43c28f01b45..a14d7bbc40c 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 Date: Fri, 19 Feb 2016 15:21:03 -0600 Subject: [PATCH 107/214] Doc: Pacemaker Explained: improve description of ordering constraints --- .../en-US/Ch-Constraints.txt | 71 +++++++++++++++---- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index a14d7bbc40c..10c3d684315 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -211,21 +211,22 @@ indexterm:[Resource,Constraints,Ordering] indexterm:[Resource,Start Order] indexterm:[Ordering Constraints] -The way to specify the order in which resources should start is by -creating +rsc_order+ constraints. +'Ordering constraints' tell the cluster the order in which resources should +start. [IMPORTANT] ==== Ordering constraints affect 'only' the ordering of resources; -they do not require that the resources be placed on the +they do 'not' require that the resources be placed on the same node. If you want resources to be started on the same node -'and' in a specific order, you need an ordering constraint 'and' -a location constraint (see <>). +'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 Date: Fri, 19 Feb 2016 16:00:57 -0600 Subject: [PATCH 108/214] Doc: Pacemaker Explained: improve description of colocation constraints --- .../en-US/Ch-Constraints.txt | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 10c3d684315..711ce53cba9 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -325,14 +325,12 @@ if they both need to be stopped. indexterm:[Resource,Constraints,Colocation] indexterm:[Resource,Location Relative to other Resources] -When the location of one resource depends on the location of another -one, we call this colocation. +'Colocation constraints' tell the cluster that the location of one resource +depends on the location of another one. Colocation has an important side-effect: it affects the order in which -resources are assigned to a node. -footnote:['Not' the order in which they are started. For that, see -<>.] -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, @@ -349,9 +347,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"] |========================================================= @@ -651,9 +658,9 @@ combinations grow. An example of this approach: [source,XML] ------- - - - + + + ------- ====== @@ -661,8 +668,8 @@ combinations grow. An example of this approach: To make things easier, we allow an alternate form of colocation constraints using +resource_set+. 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+ @@ -684,8 +691,9 @@ stopped. Here is an example +resource_set+: [WARNING] ========= -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 @@ -694,7 +702,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] ------- @@ -713,6 +721,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 @@ -747,3 +761,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. +==== From 6dea8f14d3df57f48c27e73bd6ba0d75fb6eb726 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 18 Feb 2016 18:24:34 +0100 Subject: [PATCH 109/214] Log: remote: Correctly display the IP address of the remote client --- lrmd/tls_backend.c | 55 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/lrmd/tls_backend.c b/lrmd/tls_backend.c index 7b8ef9d8432..fd316e42ad8 100644 --- a/lrmd/tls_backend.c +++ b/lrmd/tls_backend.c @@ -185,13 +185,37 @@ 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 * sa, char * s, size_t maxlen) +{ + switch(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 addr; gnutls_session_t *session = NULL; crm_client_t *new_client = NULL; @@ -200,11 +224,32 @@ lrmd_remote_listen(gpointer data) .destroy = lrmd_remote_client_destroy, }; - /* accept the connection */ 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)); + getsockname(ssock, &addr, &laddr); + + /* accept the connection */ + + if (addr.sa_family == AF_INET6) { + struct sockaddr_in6 sa; + char addr_str[INET6_ADDRSTRLEN]; + + laddr = sizeof(sa); + memset(&sa, 0, sizeof(sa)); + csock = accept(ssock, &sa, &laddr); + get_ip_str((struct sockaddr *)&sa, addr_str, INET6_ADDRSTRLEN); + crm_info("New remote connection from %s", addr_str); + + } else { + struct sockaddr_in sa; + char addr_str[INET_ADDRSTRLEN]; + + laddr = sizeof(sa); + memset(&sa, 0, sizeof(sa)); + csock = accept(ssock, &sa, &laddr); + get_ip_str((struct sockaddr *)&sa, addr_str, INET_ADDRSTRLEN); + crm_info("New remote connection from %s", addr_str); + } if (csock == -1) { crm_err("accept socket failed"); From 5ec24a2642bd0854b884d1a9b51d12371373b410 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Mon, 22 Feb 2016 18:12:05 +0100 Subject: [PATCH 110/214] Fix: remote: cl#5269 - Notify other clients of a new connection only if the handshake has completed (bsc#967388) --- lrmd/tls_backend.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lrmd/tls_backend.c b/lrmd/tls_backend.c index fd316e42ad8..0e0782869a9 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; } @@ -289,8 +292,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; } From 149c045750414e852f2623528ae80b84f88d0cf3 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 23 Feb 2016 12:09:37 +0100 Subject: [PATCH 111/214] Refactor: remote: Simplify calls to accept() and inet_ntop() by using "struct sockaddr_storage" --- lrmd/tls_backend.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/lrmd/tls_backend.c b/lrmd/tls_backend.c index fd316e42ad8..aac4f555887 100644 --- a/lrmd/tls_backend.c +++ b/lrmd/tls_backend.c @@ -188,9 +188,9 @@ lrmd_auth_timeout_cb(gpointer data) /* Convert a struct sockaddr address to a string, IPv4 and IPv6: */ static char * -get_ip_str(const struct sockaddr * sa, char * s, size_t maxlen) +get_ip_str(const struct sockaddr_storage * sa, char * s, size_t maxlen) { - switch(sa->sa_family) { + switch(((struct sockaddr *)sa)->sa_family) { case AF_INET: inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), s, maxlen); @@ -215,7 +215,8 @@ lrmd_remote_listen(gpointer data) int csock = 0; int flag = 0; unsigned laddr = 0; - struct sockaddr addr; + struct sockaddr_storage addr; + char addr_str[INET6_ADDRSTRLEN]; gnutls_session_t *session = NULL; crm_client_t *new_client = NULL; @@ -224,32 +225,13 @@ lrmd_remote_listen(gpointer data) .destroy = lrmd_remote_client_destroy, }; + /* accept the connection */ laddr = sizeof(addr); memset(&addr, 0, sizeof(addr)); - getsockname(ssock, &addr, &laddr); - - /* accept the connection */ - - if (addr.sa_family == AF_INET6) { - struct sockaddr_in6 sa; - char addr_str[INET6_ADDRSTRLEN]; + csock = accept(ssock, (struct sockaddr *)&addr, &laddr); - laddr = sizeof(sa); - memset(&sa, 0, sizeof(sa)); - csock = accept(ssock, &sa, &laddr); - get_ip_str((struct sockaddr *)&sa, addr_str, INET6_ADDRSTRLEN); - crm_info("New remote connection from %s", addr_str); - - } else { - struct sockaddr_in sa; - char addr_str[INET_ADDRSTRLEN]; - - laddr = sizeof(sa); - memset(&sa, 0, sizeof(sa)); - csock = accept(ssock, &sa, &laddr); - get_ip_str((struct sockaddr *)&sa, addr_str, INET_ADDRSTRLEN); - crm_info("New remote connection from %s", addr_str); - } + 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"); From afda4c53514b2ea8b1187886bb659ee68be4c55e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 22 Feb 2016 14:04:11 -0600 Subject: [PATCH 112/214] Doc: Pacemaker Explained: more clarifications about constraints includes new section on Resource Sets --- .../en-US/Ch-Constraints.txt | 137 +++++++++++++----- .../en-US/Ch-Multi-site-Clusters.txt | 3 +- 2 files changed, 99 insertions(+), 41 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt index 711ce53cba9..ff5db377e95 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.txt @@ -100,9 +100,10 @@ indexterm:[Constraints,Location,score] normally be left as the default, so that rogue instances of a service can be stopped when they are running where they are not supposed to be. However, there are two situations where disabling resource discovery is a good idea: - when a service is not installed on a node, discovery might return an error; - and when Pacemaker Remote is used to scale a cluster to hundreds of nodes, - limiting resource discovery to allowed nodes can significantly boost + when a service is not installed on a node, discovery might return an error + (properly written OCF agents will not, so this is usually only seen with other + agent types); and when Pacemaker Remote is used to scale a cluster to hundreds + of nodes, limiting resource discovery to allowed nodes can significantly boost performance. * +always:+ Always perform resource discovery for the specified resource on this node. @@ -110,10 +111,10 @@ indexterm:[Constraints,Location,score] This option should generally be used with a -INFINITY score, although that is not strictly required. * +exclusive:+ Perform resource discovery for the specified resource only on - this node (and other nodes similarly marked as exclusive). Multiple location - constraints using exclusive discovery for the same resource across + this node (and other nodes similarly marked as +exclusive+). Multiple location + constraints using +exclusive+ discovery for the same resource across different nodes creates a subset of nodes resource-discovery is exclusive to. - If a resource is marked for exclusive discovery on one or more nodes, that + If a resource is marked for +exclusive+ discovery on one or more nodes, that resource is only allowed to be placed within that subset of nodes. indexterm:[Resource Discovery,Location Constraints] @@ -121,6 +122,15 @@ indexterm:[Constraints,Location,Resource Discovery] |========================================================= +[WARNING] +========= +Setting resource-discovery to +never+ or +exclusive+ removes Pacemaker's +ability to detect and stop unwanted instances of a service running +where it's not supposed to be. It is up to the system administrator (you!) +to make sure that the service can 'never' be active on nodes without +resource-discovery (such as by leaving the relevant software uninstalled). +========= + === Asymmetrical "Opt-In" Clusters === indexterm:[Asymmetrical Opt-In Clusters] indexterm:[Cluster Type,Asymmetrical Opt-In] @@ -448,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>) can be used +within colocation constraints. As with the chained version, a resource that can't be active prevents any resource that must be colocated with it from being active. For example, if +B+ is not able to run, then both +C+ and by inference +D+ must also remain @@ -689,7 +746,7 @@ stopped. Here is an example +resource_set+: ------- ====== -[WARNING] +[IMPORTANT] ========= If you use a higher-level tool, pay attention to how it exposes this functionality. Depending on the tool, creating a set +A B+ may be equivalent to 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 From 7cc5d18d4489078b7f603e5264d4410506e3506d Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 25 Feb 2016 12:34:47 -0600 Subject: [PATCH 113/214] Fix: libcrmcommon: spelling in log messages Also cast an ignored return value to make coverity happy. --- lib/common/watchdog.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index c9018fe2ad2..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(); } } From a2826080dd4edb540d05dda498140a651940b38a Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 25 Feb 2016 13:15:30 -0600 Subject: [PATCH 114/214] Refactor: crmd,pengine: make coverity happy realloc_safe() now frees the original pointer before aborting, otherwise no real effect --- crmd/te_callbacks.c | 3 ++- include/crm_internal.h | 3 ++- pengine/native.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crmd/te_callbacks.c b/crmd/te_callbacks.c index 08612bd38a9..476df7ade08 100644 --- a/crmd/te_callbacks.c +++ b/crmd/te_callbacks.c @@ -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/include/crm_internal.h b/include/crm_internal.h index 618c0616a2b..d22ba552e52 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -352,7 +352,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(); } diff --git a/pengine/native.c b/pengine/native.c index 6bcadb8b135..0a4cea58d4d 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -2814,7 +2814,7 @@ 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) { + 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); From cb8eb0f5912567e8c77a0947ab0d50da7aa80cde Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 25 Feb 2016 14:46:27 -0600 Subject: [PATCH 115/214] Build: only require systemd-python on Fedora 21+ and RHEL 7+ --- pacemaker.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 4b43d9d2bee..8b1041a6a34 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -243,10 +243,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 From 88963781324aa75b3063f8f110dff15f5de1aea6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 25 Feb 2016 15:02:49 -0600 Subject: [PATCH 116/214] Test: lrmd: bump cancel command timeouts to 6s --- lrmd/regression.py.in | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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\" ") From 1c2ca2bef99f0457910a4ac12c523d0fae64f7c2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 25 Feb 2016 15:10:29 -0600 Subject: [PATCH 117/214] Build: ignore rpmlint warnings about version numbering used by buildbot --- rpmlintrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpmlintrc b/rpmlintrc index eec11e4ed7f..e762c6d4986 100644 --- a/rpmlintrc +++ b/rpmlintrc @@ -33,3 +33,6 @@ 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") From 1bda047c4c6e6c4cfd66fa9bcba304e3aa8caf79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Wed, 10 Feb 2016 23:25:20 +0100 Subject: [PATCH 118/214] Fix typo: existance -> existence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- pengine/allocate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pengine/allocate.c b/pengine/allocate.c index d84c33260b1..ae594e89652 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -769,7 +769,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 +985,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); From c87409dd6e94cfb47ec12d84d96b51d460dce0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Thu, 25 Feb 2016 12:19:18 +0100 Subject: [PATCH 119/214] The DTD, RNG and XSL files are not executable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- xml/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index e05166a5460..88f0dd94622 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -18,10 +18,10 @@ 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 RNGdir = $(dtddir) @@ -63,7 +63,7 @@ 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 From ac13fdc57229773ec75dac31a2ff466148726c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Thu, 25 Feb 2016 13:18:57 +0100 Subject: [PATCH 120/214] Create CRM_CORE_DIR during installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This directory is created by the daemons at runtime anyway, but this change makes the ownership more explicit and the structure more uniform, reducing packaging overhead. Signed-off-by: Ferenc Wágner --- Makefile.am | 2 ++ pacemaker.spec.in | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) 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/pacemaker.spec.in b/pacemaker.spec.in index 8b1041a6a34..5479ea04ad0 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -308,7 +308,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 From d1077a7a6b1afba48edb3912e1de3b0085f1e27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Fri, 26 Feb 2016 09:57:42 +0100 Subject: [PATCH 121/214] Fix typo: afer -> after MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- pengine/graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pengine/graph.c b/pengine/graph.c index 4bc23d5c52a..4e1af52ea79 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); } From 60bf2282a23f2ad1f57973896b9fd8f895b95344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Thu, 11 Feb 2016 00:56:58 +0100 Subject: [PATCH 122/214] Auto-export the init script variables read from the config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- lrmd/pacemaker_remote.in | 4 ++++ mcp/pacemaker.sysconfig | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) 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/mcp/pacemaker.sysconfig b/mcp/pacemaker.sysconfig index 28b8588ab68..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 From 2558d76ffde83cc01a43fff222531710da6f84e5 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 29 Feb 2016 13:14:25 +1100 Subject: [PATCH 123/214] Refactor: PE: Simplify the reload logic By mandating that the reload occurs even if the resource eventually stops, we can simplify the logic and schedule it when we detect the missmatch. --- include/crm/crm.h | 1 + include/crm/pengine/internal.h | 1 + pengine/allocate.c | 12 ++- pengine/allocate.h | 1 - pengine/native.c | 106 ++++++++++----------------- pengine/test10/bug-5025-1.exp | 2 +- pengine/test10/load-stopped-loop.exp | 106 +++++++++++++-------------- pengine/test10/params-4.exp | 38 +++++----- pengine/test10/params-6.dot | 1 - pengine/test10/params-6.exp | 12 +-- pengine/test10/params-6.summary | 4 +- 11 files changed, 125 insertions(+), 159 deletions(-) diff --git a/include/crm/crm.h b/include/crm/crm.h index d035d16d9df..3e3fac3c418 100644 --- a/include/crm/crm.h +++ b/include/crm/crm.h @@ -145,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/pengine/internal.h b/include/crm/pengine/internal.h index 88aaa5a8cad..c419a41dd9f 100644 --- a/include/crm/pengine/internal.h +++ b/include/crm/pengine/internal.h @@ -179,6 +179,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, \ diff --git a/pengine/allocate.c b/pengine/allocate.c index d84c33260b1..2f95b5f41f8 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, 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,8 +334,8 @@ 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); + /* Reload this resource */ + ReloadRsc(rsc, active_node, data_set); /* 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); @@ -352,8 +353,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) @@ -1989,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 a2c8fa256d6..1dbc76498c7 100644 --- a/pengine/allocate.h +++ b/pengine/allocate.h @@ -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/native.c b/pengine/native.c index 6bcadb8b135..d554142ddff 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); @@ -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, @@ -2814,6 +2819,11 @@ 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); + /* Before any reloads, if they exist */ + custom_action_order(rsc, NULL, probe, + top, reload_key(rsc), NULL, + pe_order_optional, data_set); + if (node && node->details->shutdown == FALSE) { custom_action_order(rsc, NULL, probe, rsc, generate_op_key(rsc->id, RSC_STOP, 0), NULL, @@ -3135,92 +3145,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/test10/bug-5025-1.exp b/pengine/test10/bug-5025-1.exp index 8465dfb2408..9c94badaeec 100644 --- a/pengine/test10/bug-5025-1.exp +++ b/pengine/test10/bug-5025-1.exp @@ -1,7 +1,7 @@ - + diff --git a/pengine/test10/load-stopped-loop.exp b/pengine/test10/load-stopped-loop.exp index 8851e95f297..ac825af14b2 100644 --- a/pengine/test10/load-stopped-loop.exp +++ b/pengine/test10/load-stopped-loop.exp @@ -1,9 +1,9 @@ - + - + @@ -17,15 +17,15 @@ - + - + - + @@ -39,15 +39,15 @@ - + - + - + @@ -61,7 +61,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -89,9 +89,9 @@ - + - + @@ -105,15 +105,15 @@ - + - + - + @@ -127,13 +127,13 @@ - + - + @@ -142,14 +142,14 @@ - + - + @@ -162,13 +162,13 @@ - + - + @@ -177,14 +177,14 @@ - + - + @@ -197,26 +197,26 @@ - + - + - + - + @@ -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/params-4.exp b/pengine/test10/params-4.exp index 66d46410336..9a3fad1c915 100644 --- a/pengine/test10/params-4.exp +++ b/pengine/test10/params-4.exp @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -19,7 +19,7 @@ - + @@ -35,13 +35,13 @@ - + - + - + @@ -60,7 +60,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -123,7 +123,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -177,7 +177,7 @@ - + @@ -186,7 +186,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..22b58425b80 100644 --- a/pengine/test10/params-6.exp +++ b/pengine/test10/params-6.exp @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -21,14 +21,10 @@ - + - - - - - + diff --git a/pengine/test10/params-6.summary b/pengine/test10/params-6.summary index 49f9787d17a..85122d36198 100644 --- a/pengine/test10/params-6.summary +++ b/pengine/test10/params-6.summary @@ -186,11 +186,11 @@ 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 ] From 36675b39a2de9ccdb4e971f20fca4e73c0e85457 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 29 Feb 2016 13:56:13 +1100 Subject: [PATCH 124/214] Test: PE: Drop legacy code --- pengine/allocate.c | 5 +--- pengine/test10/bug-5025-1.exp | 2 +- pengine/test10/load-stopped-loop.exp | 28 +++++++++++----------- pengine/test10/params-4.exp | 36 ++++++++++++++-------------- pengine/test10/params-6.exp | 4 ++-- 5 files changed, 36 insertions(+), 39 deletions(-) diff --git a/pengine/allocate.c b/pengine/allocate.c index 2f95b5f41f8..8259728aa44 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -324,7 +324,7 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op #if 0 /* Always reload/restart the entire resource */ - ReloadRsc(rsc, data_set); + 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); @@ -337,9 +337,6 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op /* Reload this resource */ ReloadRsc(rsc, active_node, data_set); - /* 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); - } else { pe_rsc_trace(rsc, "Resource %s doesn't know how to reload", rsc->id); diff --git a/pengine/test10/bug-5025-1.exp b/pengine/test10/bug-5025-1.exp index 9c94badaeec..8465dfb2408 100644 --- a/pengine/test10/bug-5025-1.exp +++ b/pengine/test10/bug-5025-1.exp @@ -1,7 +1,7 @@ - + diff --git a/pengine/test10/load-stopped-loop.exp b/pengine/test10/load-stopped-loop.exp index ac825af14b2..deac4916b42 100644 --- a/pengine/test10/load-stopped-loop.exp +++ b/pengine/test10/load-stopped-loop.exp @@ -1,7 +1,7 @@ - + @@ -17,13 +17,13 @@ - + - + @@ -39,13 +39,13 @@ - + - + @@ -61,7 +61,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -105,13 +105,13 @@ - + - + @@ -127,7 +127,7 @@ - + @@ -142,7 +142,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -177,7 +177,7 @@ - + @@ -197,7 +197,7 @@ - + diff --git a/pengine/test10/params-4.exp b/pengine/test10/params-4.exp index 9a3fad1c915..aadc5acbf25 100644 --- a/pengine/test10/params-4.exp +++ b/pengine/test10/params-4.exp @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -19,7 +19,7 @@ - + @@ -35,13 +35,13 @@ - + - + - + @@ -60,7 +60,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -123,7 +123,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -177,7 +177,7 @@ - + @@ -186,7 +186,7 @@ - + diff --git a/pengine/test10/params-6.exp b/pengine/test10/params-6.exp index 22b58425b80..307dbf30e8f 100644 --- a/pengine/test10/params-6.exp +++ b/pengine/test10/params-6.exp @@ -1,7 +1,7 @@ - + @@ -10,7 +10,7 @@ - + From ba15849215e69dd9d1a179ebc4bc9d546dae1308 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Mon, 29 Feb 2016 13:57:29 +1100 Subject: [PATCH 125/214] Fix: cpg: Ensure group name is never unset --- lib/cluster/cpg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cluster/cpg.c b/lib/cluster/cpg.c index 46edb7e9666..551d05b5fb8 100644 --- a/lib/cluster/cpg.c +++ b/lib/cluster/cpg.c @@ -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) { From f9ca3d79a249bfc5ea0b57e29ae873895547d9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 29 Feb 2016 15:07:47 +0100 Subject: [PATCH 126/214] Low: rethink sed command complexity vs. compatibility trade-off This change effectively reverts [8ebeb52] and re-does the intended compatibility enhancement in a less intrusive (and hopefully more compatible) way + the same is applied at another instance of 'BRE-imposed, ERE-unsupported backslashing of meta-plus'. Note that there is a counter-proposal by Ken: It is expected that -E switch will eventually become fully adpoted by main "sed" implementations, but at this point it seems unwise to drop backward compatibility (with up to at least ~2008 POSIX) altogether: [8ebeb52] https://github.com/ClusterLabs/pacemaker/pull/861 --- extra/cluster-init | 2 +- xml/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/xml/Makefile.am b/xml/Makefile.am index e05166a5460..5c02b227e83 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -30,7 +30,7 @@ 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 From c71206964491ab4d3e6a98ba92e720be1e0c0a30 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Mon, 29 Feb 2016 18:29:39 +0100 Subject: [PATCH 127/214] Fix: crm_resource: Prevent segfault when --resource is not correctly supplied for --restart command --- tools/crm_resource.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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); From 3b857dbd295cc47f9906edc556dd28546f8d211e Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Tue, 1 Mar 2016 10:01:50 +1100 Subject: [PATCH 128/214] Fix: PE: Memory leak --- pengine/allocate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pengine/allocate.c b/pengine/allocate.c index ccb87492e35..9e53423a096 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -336,6 +336,7 @@ check_action_definition(resource_t * rsc, node_t * active_node, xmlNode * xml_op /* 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); From 03cde9d96e1093994ec6c0c16c5df0ee8542dd18 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 2 Mar 2016 11:32:00 +1100 Subject: [PATCH 129/214] PE: Include a reference to the working set in each resource Saves changing 15 levels of API calls so the leaf function can make use of data_set --- include/crm/pengine/status.h | 2 ++ lib/pengine/complex.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index 66c1ff70657..41c83a68712 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -296,6 +296,8 @@ struct resource_s { const char *isolation_wrapper; gboolean exclusive_discover; int remote_reconnect_interval; + + pe_working_set_t *cluster; }; struct pe_action_s { 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..."); From 4657ad0567a40fa618f72cf6e9fb9e00390c9f7a Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 2 Mar 2016 12:36:33 +1100 Subject: [PATCH 130/214] Feature: crm_mon: Help admins identify why resources are not being started or responding to commands --- include/crm/pengine/status.h | 3 ++ lib/pengine/clone.c | 53 ++++++++++++++++++++++++----- lib/pengine/native.c | 64 ++++++++++++++++++++++-------------- tools/crm_mon.c | 39 +++++++++++++++------- tools/crm_simulate.c | 31 +++++++++++++++++ 5 files changed, 146 insertions(+), 44 deletions(-) diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index 41c83a68712..d9f2ca50880 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -123,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 { 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/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/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_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); } From 6833bce372607703f0f921e186253a966df207e6 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Wed, 2 Mar 2016 13:47:33 +1100 Subject: [PATCH 131/214] Test: Help admins identify why resources are not being started or responding to commands --- ...-am-then-bm-a-migrating-b-stopping.summary | 5 +- ...-am-then-bm-b-migrating-a-stopping.summary | 5 +- pengine/test10/asymmetric.summary | 5 +- pengine/test10/bug-1718.summary | 5 +- pengine/test10/bug-1765.summary | 7 +- .../test10/bug-5014-A-stop-B-started.summary | 5 +- .../bug-5014-A-stopped-B-stopped.summary | 5 +- .../bug-5014-CLONE-A-stop-B-started.summary | 3 +- .../bug-5014-CthenAthenB-C-stopped.summary | 5 +- ...bug-5014-GROUP-A-stopped-B-started.summary | 5 +- ...bug-5014-GROUP-A-stopped-B-stopped.summary | 5 +- ...5014-ordered-set-symmetrical-false.summary | 5 +- ...-5014-ordered-set-symmetrical-true.summary | 5 +- pengine/test10/bug-5028-bottom.summary | 4 +- pengine/test10/bug-5028-detach.summary | 7 +- pengine/test10/bug-5028.summary | 4 +- pengine/test10/bug-5059.summary | 7 +- .../test10/bug-5140-require-all-false.summary | 9 +- pengine/test10/bug-5143-ms-shuffle.summary | 13 +- pengine/test10/bug-cl-5168.summary | 9 +- pengine/test10/bug-cl-5170.summary | 4 +- pengine/test10/bug-cl-5219.summary | 5 +- pengine/test10/bug-lf-2171.summary | 3 +- pengine/test10/bug-lf-2317.summary | 3 +- pengine/test10/bug-lf-2358.summary | 5 +- pengine/test10/bug-lf-2422.summary | 9 +- pengine/test10/bug-lf-2453.summary | 3 +- pengine/test10/bug-lf-2606.summary | 5 +- pengine/test10/bug-rh-1097457.summary | 9 +- pengine/test10/bug-suse-707150.summary | 11 +- .../clone-fail-block-colocation.summary | 4 +- pengine/test10/clone-no-shuffle.summary | 3 +- .../test10/clone-order-16instances.summary | 5 +- pengine/test10/cloned-group-stop.summary | 3 +- .../test10/coloc-clone-stays-active.summary | 49 +-- ...colocation_constraint_stops_master.summary | 1 + .../colocation_constraint_stops_slave.summary | 7 +- pengine/test10/complex_enforce_colo.summary | 3 +- .../test10/container-is-remote-node.summary | 5 +- pengine/test10/enforce-colo1.summary | 3 +- .../test10/expire-non-blocked-failure.summary | 4 +- pengine/test10/failcount-block.summary | 4 +- pengine/test10/group11.summary | 5 +- pengine/test10/interleave-pseudo-stop.summary | 2 +- pengine/test10/interleave-stop.summary | 2 +- pengine/test10/load-stopped-loop-2.summary | 17 +- pengine/test10/load-stopped-loop.summary | 129 +++---- pengine/test10/master-13.summary | 5 +- .../test10/master-asymmetrical-order.summary | 3 +- pengine/test10/master-colocation.summary | 5 +- pengine/test10/master-demote-block.summary | 4 +- pengine/test10/master-depend.summary | 15 +- pengine/test10/master-ordering.summary | 5 +- .../master-partially-demoted-group.summary | 9 +- pengine/test10/master-probed-score.summary | 5 +- .../master-promotion-constraint.summary | 9 +- pengine/test10/master-reattach.summary | 9 +- pengine/test10/migrate-partial-4.summary | 3 +- .../multiple-active-block-group.summary | 12 +- .../not-reschedule-unneeded-monitor.summary | 5 +- pengine/test10/novell-251689.summary | 5 +- pengine/test10/one-or-more-1.summary | 5 +- pengine/test10/one-or-more-2.summary | 5 +- pengine/test10/one-or-more-3.summary | 9 +- pengine/test10/one-or-more-4.summary | 5 +- pengine/test10/one-or-more-5.summary | 9 +- pengine/test10/one-or-more-6.summary | 5 +- pengine/test10/one-or-more-7.summary | 5 +- pengine/test10/order-clone.summary | 5 +- pengine/test10/order7.summary | 4 +- .../order_constraint_stops_master.summary | 5 +- .../order_constraint_stops_slave.summary | 7 +- .../test10/ordered-set-basic-startup.summary | 9 +- pengine/test10/ordered-set-natural.summary | 13 +- pengine/test10/params-6.summary | 361 +++++++++--------- pengine/test10/probe-2.summary | 5 +- pengine/test10/rec-rsc-4.summary | 4 +- pengine/test10/rec-rsc-8.summary | 4 +- pengine/test10/remote-disable.summary | 5 +- pengine/test10/rsc-maintenance.summary | 9 +- pengine/test10/rsc-sets-clone-1.summary | 17 +- .../test10/stop-failure-no-fencing.summary | 4 +- pengine/test10/stop-failure-no-quorum.summary | 4 +- pengine/test10/stopped-monitor-03.summary | 5 +- pengine/test10/stopped-monitor-04.summary | 5 +- pengine/test10/stopped-monitor-05.summary | 4 +- pengine/test10/stopped-monitor-06.summary | 5 +- pengine/test10/stopped-monitor-07.summary | 4 +- pengine/test10/stopped-monitor-11.summary | 5 +- pengine/test10/stopped-monitor-12.summary | 5 +- pengine/test10/stopped-monitor-20.summary | 5 +- pengine/test10/stopped-monitor-21.summary | 5 +- pengine/test10/stopped-monitor-22.summary | 5 +- pengine/test10/stopped-monitor-24.summary | 5 +- pengine/test10/stopped-monitor-25.summary | 5 +- pengine/test10/stopped-monitor-31.summary | 5 +- pengine/test10/target-1.summary | 9 +- pengine/test10/target-2.summary | 13 +- pengine/test10/template-1.summary | 5 +- .../test10/unmanaged-block-restart.summary | 4 +- pengine/test10/unmanaged-stop-1.summary | 9 +- pengine/test10/unmanaged-stop-2.summary | 9 +- pengine/test10/unmanaged-stop-3.summary | 9 +- pengine/test10/unmanaged-stop-4.summary | 13 +- pengine/test10/use-after-free-merge.summary | 11 +- pengine/test10/utilization-order4.summary | 9 +- pengine/test10/whitebox-asymmetric.summary | 5 +- pengine/test10/whitebox-stop.summary | 5 +- 108 files changed, 635 insertions(+), 543 deletions(-) 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/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-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-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.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-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-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-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.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/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/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/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.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-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-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/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/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-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/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-6.summary b/pengine/test10/params-6.summary index 85122d36198..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) @@ -195,16 +196,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-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-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-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.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/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/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.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/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/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/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-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-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] From 950fca1b5d8d4b751de431c48c10ee37dcc23960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 2 Mar 2016 12:33:58 +0100 Subject: [PATCH 132/214] Fix typos: *syncronous* -> *synchronous* --- crmd/lrm.c | 2 +- doc/msg-schema.txt | 2 +- fencing/remote.c | 2 +- lib/cib/cib_native.c | 2 +- lib/cib/cib_remote.c | 4 ++-- lib/fencing/st_client.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crmd/lrm.c b/crmd/lrm.c index 5f63676e83f..f91538fa25e 100644 --- a/crmd/lrm.c +++ b/crmd/lrm.c @@ -2196,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/doc/msg-schema.txt b/doc/msg-schema.txt index 303370826a0..f07c6aef9a9 100644 --- a/doc/msg-schema.txt +++ b/doc/msg-schema.txt @@ -23,7 +23,7 @@ Key points from the diagram: and are thus subject to existing HA client security is available. - The RPC layer allows the cluster to be controled from non-member hosts (subject to RPC security which is available for free). -- The option of syncronous or asynchronous RPC calls will be provided. +- The option of synchronous or asynchronous RPC calls will be provided. This will probably be in the form of a flag sent as part of the function call. diff --git a/fencing/remote.c b/fencing/remote.c index 8fa639fc1d1..ec16160e8f8 100644 --- a/fencing/remote.c +++ b/fencing/remote.c @@ -1309,7 +1309,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. */ 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_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/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; From 3394eaa2558855b322660d66463d98b6b95ce8d8 Mon Sep 17 00:00:00 2001 From: Lars Ellenberg Date: Wed, 2 Mar 2016 14:17:38 +0100 Subject: [PATCH 133/214] Build: Fix for -Werror build (s/g_main_new/g_main_loop_new/) They have a broken g_main_new() macro definition that inclues the trailing semicolon, which then breaks with crm_node.c:348: error: ISO C90 forbids mixed declarations and code --- tools/crm_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From fc87717a91fa8c5011c184c1ea3ce551b650037d Mon Sep 17 00:00:00 2001 From: Lars Ellenberg Date: Wed, 2 Mar 2016 14:28:54 +0100 Subject: [PATCH 134/214] build: fix format errors mostly trivial: for s?size_t -> use z modifier for long/int/time_t/pid_t: add explicit cast, or use different specifier for char*/void*: use explicit cast for too many/too few arguments, use git log and context to either add format specifier or drop argument, resp. drop format specifier or add suitable argument. ipc.c:497: error: format '%d' expects type 'int', but argument 10 has type 'ssize_t' ipc.c:500: error: format '%d' expects type 'int', but argument 10 has type 'ssize_t' ipc.c:500: error: format '%.120s' expects type 'char *', but argument 11 has type 'void *' ipc.c:512: error: format '%d' expects type 'int', but argument 12 has type 'ssize_t' ipc.c:661: error: format '%d' expects type 'int', but argument 8 has type 'ssize_t' ipc.c:831: error: too few arguments for format utils.c:2075: error: format '%lu' expects type 'long unsigned int', but argument 10 has type 'unsigned int' utils.c:2075: error: format '%lu' expects type 'long unsigned int', but argument 11 has type 'unsigned int' utils.c:2075: error: format '%lu' expects type 'long unsigned int', but argument 12 has type 'unsigned int' utils.c:2075: error: format '%lu' expects type 'long unsigned int', but argument 13 has type 'unsigned int' xml.c:910: error: too many arguments for format xml.c:2429: error: '0' flag ignored with precision and '%x' gnu_printf format xml.c:4163: error: '0' flag ignored with precision and '%x' gnu_printf format iso8601.c:982: error: too few arguments for format remote.c:237: error: format '%d' expects type 'int', but argument 7 has type 'size_t' remote.c:250: error: format '%d' expects type 'int', but argument 8 has type 'size_t' remote.c:276: error: format '%d' expects type 'int', but argument 8 has type 'size_t' remote.c:291: error: format '%d' expects type 'int', but argument 8 has type 'size_t' remote.c:521: error: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' remote.c:562: error: format '%u' expects type 'unsigned int', but argument 8 has type 'size_t' remote.c:568: error: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' remote.c:572: error: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' remote.c:580: error: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' remote.c:583: error: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' remote.c:693: error: too few arguments for format mainloop.c:659: error: format '%d' expects type 'int', but argument 9 has type 'long int' mainloop.c:659: error: too many arguments for format unpack.c:2884: error: too many arguments for format utils.c:234: error: too many arguments for format services_linux.c:92: error: too many arguments for format dbus.c:521: error: format '%ld' expects type 'long int', but argument 8 has type 'int' lrmd_client.c:1771: error: format '%d' expects type 'int', but argument 7 has type 'size_t' lrmd_client.c:1913: error: format '%d' expects type 'int', but argument 7 has type 'size_t' cpg.c:169: error: format '%d' expects type 'int', but argument 7 has type 'size_t' cpg.c:181: error: format '%d' expects type 'int', but argument 11 has type 'ssize_t' cpg.c:203: error: format '%d' expects type 'int', but argument 8 has type 'size_t' cpg.c:626: error: format '%d' expects type 'int', but argument 9 has type 'size_t' cpg.c:629: error: format '%d' expects type 'int', but argument 9 has type 'size_t' --- cib/callbacks.c | 2 +- cib/io.c | 4 +++- cib/remote.c | 2 +- crmd/lrm.c | 4 ++-- crmd/lrm_state.c | 2 +- crmd/throttle.c | 4 ++-- lib/cluster/cpg.c | 10 +++++----- lib/common/ipc.c | 12 ++++++------ lib/common/iso8601.c | 2 +- lib/common/mainloop.c | 2 +- lib/common/remote.c | 22 +++++++++++----------- lib/common/utils.c | 2 +- lib/common/xml.c | 6 +++--- lib/lrmd/lrmd_client.c | 4 ++-- lib/pengine/unpack.c | 2 +- lib/services/dbus.c | 2 +- lib/services/services_linux.c | 2 +- lib/transition/utils.c | 2 +- lrmd/lrmd.c | 4 ++-- mcp/pacemaker.c | 2 +- pengine/native.c | 5 ++--- tools/crm_resource_runtime.c | 2 +- 22 files changed, 50 insertions(+), 49 deletions(-) diff --git a/cib/callbacks.c b/cib/callbacks.c index e6ee1d95402..3f8a92d985a 100644 --- a/cib/callbacks.c +++ b/cib/callbacks.c @@ -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); } 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/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/crmd/lrm.c b/crmd/lrm.c index 5f63676e83f..50d04912fb7 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); } } @@ -1928,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); } diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 2ad71adbbb9..048e7beb493 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -75,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; 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/lib/cluster/cpg.c b/lib/cluster/cpg.c index 551d05b5fb8..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; @@ -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/common/ipc.c b/lib/common/ipc.c index 7e844287f10..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) { @@ -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 2f3422ed67e..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; @@ -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 516427d2caf..08d9e4fb0fb 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -2072,7 +2072,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); diff --git a/lib/common/xml.c b/lib/common/xml.c index 33ebe1f5f49..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; } @@ -2426,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 { @@ -4160,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/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c index 174f41bf0d8..151df40fc78 100644 --- a/lib/lrmd/lrmd_client.c +++ b/lib/lrmd/lrmd_client.c @@ -1768,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; } @@ -1910,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/pengine/unpack.c b/lib/pengine/unpack.c index 7744d772ef6..bd865d7e71b 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -2881,7 +2881,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; 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 2c9d9100fa1..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 { 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/lrmd.c b/lrmd/lrmd.c index 11e38d70922..cb4fdd9ffed 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -1698,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/mcp/pacemaker.c b/mcp/pacemaker.c index accb2961e20..f7f1d462b32 100644 --- a/mcp/pacemaker.c +++ b/mcp/pacemaker.c @@ -828,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/pengine/native.c b/pengine/native.c index 49d5a340713..829613aa0c9 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -1263,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; } @@ -1825,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); diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c index 5440fe9f712..82608bbe383 100644 --- a/tools/crm_resource_runtime.c +++ b/tools/crm_resource_runtime.c @@ -838,7 +838,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++; } } From 4cd3a2af14154ed860330f77be7cdf97b64693fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 2 Mar 2016 17:31:08 +0100 Subject: [PATCH 135/214] Build: xml: track new file context-of.xsl as noinst_DATA --- xml/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml/Makefile.am b/xml/Makefile.am index c24a34ade87..55f3130d6bd 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -23,6 +23,8 @@ dtd_DATA = crm.dtd crm-transitional.dtd xsltdir = $(dtddir) xslt_DATA = upgrade06.xsl upgrade-*.xsl +noinst_DATA = context-of.xsl + RNGdir = $(dtddir) # See Readme.md for details on updating schema files From 86bfd6779e9e937613c232882214c0f70fed033d Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 2 Mar 2016 08:59:00 -0600 Subject: [PATCH 136/214] Fix: resources: use /bin/bash for agents that use bashishms ClusterMon, HealthSMART and SysInfo use bash's "(( ))" arithmetic built-ins --- extra/resources/ClusterMon | 2 +- extra/resources/HealthSMART | 2 +- extra/resources/SysInfo | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/HealthSMART b/extra/resources/HealthSMART index 3747bfa25ed..b5d83b71df0 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 diff --git a/extra/resources/SysInfo b/extra/resources/SysInfo index 3b35ce66dff..4af46016fa4 100644 --- a/extra/resources/SysInfo +++ b/extra/resources/SysInfo @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # # SysInfo OCF Resource Agent From b97369221998436363b07344826d0a7793c7fa6b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 2 Mar 2016 09:03:41 -0600 Subject: [PATCH 137/214] Fix: resources: get rid of annoying double slashes in pathnames Makes meta-data look cleaner. For HealthSMART, this also makes the state file default in the meta-data consistent with recent changes to other agents. --- doc/Pacemaker_Explained/en-US/Ch-Resources.txt | 2 +- extra/resources/Dummy | 6 +++--- extra/resources/HealthCPU | 6 +++--- extra/resources/HealthSMART | 6 +++--- extra/resources/Stateful | 6 +++--- extra/resources/SysInfo | 2 +- extra/resources/ping | 6 +++--- extra/resources/pingd | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/Pacemaker_Explained/en-US/Ch-Resources.txt b/doc/Pacemaker_Explained/en-US/Ch-Resources.txt index 7b49af0433d..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 - + diff --git a/extra/resources/Dummy b/extra/resources/Dummy index c24e7aa2379..40254dfaf85 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 - + @@ -188,12 +188,12 @@ dummy_validate() { 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 VERIFY_SERIALIZED_FILE="${OCF_RESKEY_state}.serialized" diff --git a/extra/resources/HealthCPU b/extra/resources/HealthCPU index f48854fb04c..7aa44e76ede 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 - + @@ -184,12 +184,12 @@ dummy_validate() { 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 b5d83b71df0..9eee059fa1f 100644 --- a/extra/resources/HealthSMART +++ b/extra/resources/HealthSMART @@ -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 c5184d572db..25bc4dc837d 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 - + @@ -188,12 +188,12 @@ stateful_validate() { 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 4af46016fa4..33f7139e3ca 100644 --- a/extra/resources/SysInfo +++ b/extra/resources/SysInfo @@ -323,7 +323,7 @@ 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 diff --git a/extra/resources/ping b/extra/resources/ping index 67b7dc768e8..43316aa83d5 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -52,7 +52,7 @@ Every time the monitor action is run, this resource agent records (in the CIB) t PID file PID file - + @@ -345,9 +345,9 @@ 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 attrd_options='-q' 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 - + From 610cf0eee833759d5184f1eec2f4d644802de2f4 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 2 Mar 2016 09:06:03 -0600 Subject: [PATCH 138/214] Fix: resources: match agents' default for globally_unique to pacemaker's Pacemaker should always supply the value (even if default), so the agents' default only matters for manual invocations, but it is still a good idea to keep the default behavior consistent. --- extra/resources/Dummy | 2 +- extra/resources/HealthCPU | 2 +- extra/resources/Stateful | 2 +- extra/resources/ping | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/resources/Dummy b/extra/resources/Dummy index 40254dfaf85..9d11e7d2037 100644 --- a/extra/resources/Dummy +++ b/extra/resources/Dummy @@ -184,7 +184,7 @@ 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 [ "x$OCF_RESKEY_state" = "x" ]; then if [ ${OCF_RESKEY_CRM_meta_globally_unique} = "false" ]; then diff --git a/extra/resources/HealthCPU b/extra/resources/HealthCPU index 7aa44e76ede..32a10ad3e70 100644 --- a/extra/resources/HealthCPU +++ b/extra/resources/HealthCPU @@ -180,7 +180,7 @@ 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 diff --git a/extra/resources/Stateful b/extra/resources/Stateful index 25bc4dc837d..23526c93fb8 100644 --- a/extra/resources/Stateful +++ b/extra/resources/Stateful @@ -184,7 +184,7 @@ 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 diff --git a/extra/resources/ping b/extra/resources/ping index 43316aa83d5..f3bc53afa12 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -317,7 +317,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 From 1bfc6392e68d67d3e543919f6a4e46793d7bd194 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 2 Mar 2016 09:09:55 -0600 Subject: [PATCH 139/214] Fix: resources: correct typo in Dummy log message --- extra/resources/Dummy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/resources/Dummy b/extra/resources/Dummy index 9d11e7d2037..0960a29f0b2 100644 --- a/extra/resources/Dummy +++ b/extra/resources/Dummy @@ -208,7 +208,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..." From c4ecf6e4054fba5d0a8ddded7a38acd2e150d548 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 2 Mar 2016 09:10:22 -0600 Subject: [PATCH 140/214] Refactor: resources: clean up Dummy This uses good shell programming practice but has no real effect (quote filenames, use numeric comparisons where appropriate, etc.). --- extra/resources/Dummy | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/extra/resources/Dummy b/extra/resources/Dummy index 0960a29f0b2..5a34ff031d6 100644 --- a/extra/resources/Dummy +++ b/extra/resources/Dummy @@ -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/$$" @@ -186,14 +183,12 @@ dummy_validate() { : ${OCF_RESKEY_CRM_meta_interval=0} : ${OCF_RESKEY_CRM_meta_globally_unique:="false"} -if [ "x$OCF_RESKEY_state" = "x" ]; then +if [ -z "$OCF_RESKEY_state" ]; then + OCF_RESKEY_state="${HA_VARRUN%%/}/Dummy-${OCF_RESOURCE_INSTANCE}.state" + 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" @@ -225,4 +220,3 @@ esac rc=$? ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" exit $rc - From 0a4abb5ed3826f600701f350e938c4fcb0f9d112 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 3 Mar 2016 16:22:51 +1100 Subject: [PATCH 141/214] Fix: crm_report: Use the correct variable for extra log files to extract --- tools/report.collector | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 6c0ca4070db..ce147cb7e79 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -659,11 +659,11 @@ 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" From 75fa55e824ef21fbe8cd39614d8bcea2cfe47b6b Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 3 Mar 2016 16:35:43 +1100 Subject: [PATCH 142/214] Fix: crm_report: Repair parsing of the --logfile option --- tools/crm_report.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index 6ad8656f908..430245892ff 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -21,7 +21,7 @@ # 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: \ + --long help,cts:,cts-log:,dest:,node:,nodes:,from:,to:,logfile:,as-directory,single-node,cluster:,user:,max-depth:,version,features,rsh: \ -n 'crm_report' -- "$@"` eval set -- "$TEMP" From 163157ff6d313c86c556c303c16a6ec7df369370 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 3 Mar 2016 19:48:08 +0100 Subject: [PATCH 143/214] Fix: libcib: Correctly determine the node type Previously, if a remote node already existed under /cib/configuration/nodes/, query_node_uuid() would return *is_remote_node = FALSE for it though. --- lib/cib/cib_attrs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); From 139924ac47dca49d25610c3f8f6e7d78724840c7 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 29 Feb 2016 15:48:36 -0600 Subject: [PATCH 144/214] Test: CTS: overhaul lxc_autogen.sh to synchronize on all nodes Before, the -s option (for synchronization of changes with all nodes) only applied to the container filesystem. However, migrating a container will fail because the network would not be configured appropriately. Now, -s synchronizes /etc/pacemaker/authkey, /etc/hosts entries, and the libvirt network as well as the filesystem. --- cts/lxc_autogen.sh.in | 238 ++++++++++++++++++++++++++++++------------ 1 file changed, 170 insertions(+), 68 deletions(-) diff --git a/cts/lxc_autogen.sh.in b/cts/lxc_autogen.sh.in index d06ba2ddb56..da4b92e98b8 100755 --- a/cts/lxc_autogen.sh.in +++ b/cts/lxc_autogen.sh.in @@ -15,9 +15,18 @@ 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." echo "" @@ -25,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." @@ -34,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" @@ -56,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;; @@ -107,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 @@ -124,9 +175,25 @@ set_network() END + sync_file ${working_dir}/cur_network.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 [ \$? -eq 0 ]; then if [ ! -f restore_default.xml ]; then virsh net-dumpxml default > restore_default.xml fi @@ -136,15 +203,38 @@ END 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 } @@ -155,12 +245,15 @@ generate() # Generate libvirt domains in xml for (( c=1; c <= $containers; c++ )) do - rm -rf lxc$c-filesystem + # 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 - rm -f lxc$c.xml + # Create libvirt definition suffix=$((10 + $c)) prefix=$(echo $addr | awk -F. '{print $1"."$2}') subnet=$(echo $addr | awk -F. '{print $3}') @@ -168,6 +261,7 @@ generate() subnet=$(($subnet + 1)) suffix=$(($subnet - 255)) done + cip=$prefix.$subnet.$suffix cat << END >> lxc$c.xml @@ -187,7 +281,7 @@ END for dir in $run_dirs; do cat << END >> lxc$c.xml - + END @@ -200,6 +294,8 @@ END END + + # Create CIB definition rm -f container$c.cib cat << END >> container$c.cib @@ -218,10 +314,11 @@ 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 +ip -f inet addr add $cip/24 dev eth0 ip link set eth0 up ip route add default via $addr.1 hostname lxc$c @@ -231,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 @@ -260,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 @@ -275,8 +370,6 @@ apply_cib_master() apply_cib_entries() { - node=$(crm_node -n) - cibadmin -Q > cur.cib export CIB_file=cur.cib for tmp in $(ls container*.cib); do @@ -285,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 @@ -311,12 +404,10 @@ apply_cib_entries() 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 @@ -332,7 +423,7 @@ 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 @@ -346,79 +437,90 @@ restore_cib() crm_resource --wait # Purge nodes from caches and CIB status section - 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 crm_node --force --remove $tmp done } -restore_libvirt() +restore_network() { - 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 - - sed -i.bak "/...\....\....\..* ${tmp}/d" /etc/hosts - echo "$tmp destroyed" + 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 + 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 From eed2fed7ebc35396b4acb4ad91f813ad39c4053e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 29 Feb 2016 17:38:52 -0600 Subject: [PATCH 145/214] Test: CTS: use new lxc_autogen.sh synchronization capability in LXC test --- cts/CTStests.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cts/CTStests.py b/cts/CTStests.py index 3b0a7f6f884..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. ''' From f4550801e907cf8aff9782d7af2a38380f7acd1a Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Thu, 3 Mar 2016 21:27:10 +1100 Subject: [PATCH 146/214] Fix: crm_report: Default to our application log file --- tools/report.collector | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/report.collector b/tools/report.collector index ce147cb7e79..0cf4a1e29ce 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -579,7 +579,7 @@ get_logfiles() { fi ;; *) debug "Unknown cluster type: $cf_type" - echo "/var/log/messages" + echo "/var/log/pacemaker.log" ;; esac @@ -737,6 +737,7 @@ for l in $logfiles $EXTRA_LOGS; do # We already have it continue fi + dumplogset "$l" $LOG_START $LOG_END > "$b" echo "Log patterns $REPORT_TARGET:" > $ANALYSIS_F cat $b | grep -f $pattfile >> $ANALYSIS_F From 1bcad6a1eced1a3b6c314b05ac1d353adda260f6 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 4 Mar 2016 12:18:00 +1100 Subject: [PATCH 147/214] Feature: crm_report: There is no need to search for system logs when being called by sosreport --- tools/crm_report.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index 430245892ff..5c993dc529f 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -21,7 +21,7 @@ # 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: \ + --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" @@ -35,7 +35,6 @@ ssh_user="root" search_logs=1 report_data=`dirname $0` - extra_logs="" sanitize_patterns="passw.*" log_patterns="CRIT: ERROR:" @@ -120,6 +119,7 @@ while true; do -u|--user) ssh_user="$2"; shift; shift;; -D|--max-depth) maxdepth="$2"; shift; shift;; -M) search_logs=0; shift;; + --sos-mode) search_logs=0; extra_logs="/var/log/pacemaker.log /var/log/cluster/corosync.log"; nodes="$host"; shift;; --dest) DESTDIR=$2; shift; shift;; --) if [ ! -z $2 ]; then DESTDIR=$2; fi; break;; -h|--help) usage; exit 0;; From cd10f0bed1170c6fc4d4756ac27785dcb0280c95 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 3 Mar 2016 15:55:58 +0100 Subject: [PATCH 148/214] Fix: crmd,tools: Set attributes for remote nodes directly into cib if it's legacy attrd Legacy attrd cannot handle attributes for remote nodes. Fix it by conditionally reverting part of 488d82f. --- crmd/utils.c | 42 ++++++++++++++++++++++++++++++++++++ tools/crm_attribute.c | 4 ++++ tools/crm_resource_runtime.c | 25 +++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) 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/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_resource_runtime.c b/tools/crm_resource_runtime.c index 82608bbe383..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) { From 62ed004d828ad9b4e3592b684e7d0965b7046965 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 11 Mar 2016 13:22:41 +1100 Subject: [PATCH 149/214] Fix: PE: Correctly handle the ordering of demote actions for failed and moving containers --- pengine/allocate.c | 20 +++++++++++--------- pengine/test10/whitebox-ms-ordering.dot | 3 +-- pengine/test10/whitebox-ms-ordering.exp | 14 +++++--------- pengine/test10/whitebox-ms-ordering.summary | 10 +++++----- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/pengine/allocate.c b/pengine/allocate.c index 9e53423a096..fb984e18e6a 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -1726,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") && 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 From c8a4f84a3e2cb2781bfc104d3cc3148b5de07604 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 11 Mar 2016 13:25:34 +1100 Subject: [PATCH 150/214] Test: PE: Correctly handle the ordering of demote actions for failed and moving containers --- pengine/regression.sh | 1 + pengine/test10/whitebox-ms-ordering-move.dot | 52 ++ pengine/test10/whitebox-ms-ordering-move.exp | 268 +++++++ .../test10/whitebox-ms-ordering-move.scores | 372 ++++++++++ .../test10/whitebox-ms-ordering-move.summary | 86 +++ pengine/test10/whitebox-ms-ordering-move.xml | 685 ++++++++++++++++++ 6 files changed, 1464 insertions(+) create mode 100644 pengine/test10/whitebox-ms-ordering-move.dot create mode 100644 pengine/test10/whitebox-ms-ordering-move.exp create mode 100644 pengine/test10/whitebox-ms-ordering-move.scores create mode 100644 pengine/test10/whitebox-ms-ordering-move.summary create mode 100644 pengine/test10/whitebox-ms-ordering-move.xml diff --git a/pengine/regression.sh b/pengine/regression.sh index 8d7e3e8d6de..c897964f0d3 100755 --- a/pengine/regression.sh +++ b/pengine/regression.sh @@ -801,6 +801,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/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..484eff72863 --- /dev/null +++ b/pengine/test10/whitebox-ms-ordering-move.exp @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cc712fc8e01bbbb2a1f7601f5f6c76030d6f6556 Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Fri, 11 Mar 2016 13:26:34 +1100 Subject: [PATCH 151/214] Log: PE: Additional debug for tracking down the source of ordering dependancies --- pengine/constraints.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; From cb0a48e94401a3c07a16fb7ea56518212d878607 Mon Sep 17 00:00:00 2001 From: guest Date: Fri, 11 Mar 2016 13:28:45 +0900 Subject: [PATCH 152/214] Low: attrd: If a value of dampen is a negative number, attrd outputs warn log. --- attrd/commands.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/attrd/commands.c b/attrd/commands.c index b2cc83a0fad..d3dc46a3c6b 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); From 361e125e97bfb85d87b028d070fa1e0a8a2d6703 Mon Sep 17 00:00:00 2001 From: guest Date: Mon, 14 Mar 2016 14:39:56 +0900 Subject: [PATCH 153/214] Mid: attrd: Support of the dampen change by attrd. --- attrd/commands.c | 60 +++++++++++++++++++++++++++++++++++------- attrd/main.c | 8 ++++++ include/crm_internal.h | 2 ++ lib/common/utils.c | 8 ++++++ tools/attrd_updater.c | 7 +++++ 5 files changed, 76 insertions(+), 9 deletions(-) diff --git a/attrd/commands.c b/attrd/commands.c index d3dc46a3c6b..2e903404cda 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -527,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)) { @@ -671,14 +671,53 @@ 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; + } + } else { + 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 { + 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) { @@ -713,15 +752,18 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, const char *host, bool filter) free_xml(sync); } else if(safe_str_neq(v->current, value)) { - crm_info("Setting %s[%s]: %s -> %s from %s", attr, host, v->current, value, peer->uname); - free(v->current); - if(value) { - v->current = strdup(value); + if (safe_str_eq(op, ATTRD_OP_UPDATE) || safe_str_eq(op, ATTRD_OP_UPDATE_BOTH)) { + crm_info("Setting %s[%s]: %s -> %s from %s", attr, host, v->current, value, peer->uname); + free(v->current); + if(value) { + v->current = strdup(value); + } else { + v->current = NULL; + } + changed = TRUE; } else { - v->current = NULL; + crm_trace("Unchanged %s[%s] from %s.(ATTRD_OP_UPDATE_DELAY)", attr, host, peer->uname); } - changed = TRUE; - } else { crm_trace("Unchanged %s[%s] from %s is %s", attr, host, peer->uname, value); } diff --git a/attrd/main.c b/attrd/main.c index 01983960ff2..0e39da7e4a2 100644 --- a/attrd/main.c +++ b/attrd/main.c @@ -239,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(); diff --git a/include/crm_internal.h b/include/crm_internal.h index d22ba552e52..69b45896f7b 100644 --- a/include/crm_internal.h +++ b/include/crm_internal.h @@ -291,6 +291,8 @@ long 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" diff --git a/lib/common/utils.c b/lib/common/utils.c index 08d9e4fb0fb..cdad3f201e7 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1818,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); 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': From 7b63541150a94710a4431f03b6eb4c7ca9a3cc26 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 15 Mar 2016 15:03:03 +0100 Subject: [PATCH 154/214] Fix: pengine: Suppress assert if a stateful clone is not being demoted/stopped In clone_update_actions_interleave(), if first_task is "demote", but first is not actually being demoted, the demote action doesn't exist (first_action == NULL). Do not trigger assert for this case. --- pengine/clone.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/pengine/clone.c b/pengine/clone.c index 7d2e07a9b7c..fd47018298f 100644 --- a/pengine/clone.c +++ b/pengine/clone.c @@ -1277,20 +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)); - - /* We're only interested if 'then' is neither stopping nor being demoted */ - 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_DEMOTE, 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); From 4111c4cd5dfeb3b713cb5db17f389cf7f6b0783f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Wed, 16 Mar 2016 09:44:43 +0100 Subject: [PATCH 155/214] Replace the deprecated obj_type option in the examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- doc/Pacemaker_Explained/en-US/Ch-Basics.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -------- ====== From 89f5177d71a4035128bc9e6401e49b5cc8e46a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 16 Mar 2016 16:26:29 +0100 Subject: [PATCH 156/214] xml: make optional in all the RNG schemas The main reason behind this is that the only materialized, local CIB snapshot when pacemaker is not running is /var/lib/pacemaker/cib/cib.xml (and possibly siblings), i.e., a file that is privately managed in due course of its proceeding, and for storing that file, the CIB content is first massaged in lib/cib/cib_file.c:cib_file_prepare_xml with a following justification: /* Delete status section before writing to file, because * we discard it on startup anyway, and users get confused by it */ This means that status is omitted so as not to cause confusion, should it be investigated by anyone. This revision makes the schemas (admittedly, also retroactively, which should be exceptional for good reason) reflect this special handling of persisted files by making all status section optional, effectively ensuring their proper validity. --- xml/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index 55f3130d6bd..0cc948ed1b7 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -114,9 +114,11 @@ pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am for rng in $(RNG_cfg_base); do ./best-match.sh $$rng $(*) $(@) " " || :; done echo " " >> $@ echo " " >> $@ - echo " " >> $@ - ./best-match.sh status $(*) $(@) " " - echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + ./best-match.sh status $(*) $(@) " " + echo " " >> $@ + echo " " >> $@ echo " " >> $@ echo " " >> $@ echo "" >> $@ From 0fa59969c77de21e41e9c8e16412d25c5c315579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 16 Mar 2016 18:38:14 +0100 Subject: [PATCH 157/214] xml: make generated RNG files consistent in quotation marks --- xml/Makefile.am | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/xml/Makefile.am b/xml/Makefile.am index 0cc948ed1b7..d10e0d2a591 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -75,28 +75,28 @@ 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 $@" @@ -104,24 +104,24 @@ pacemaker.rng: pacemaker-$(RNG_max).rng pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am echo " RNG $@" - echo "" > $@ - echo "" >> $@ - echo " " >> $@ - echo " " >> $@ + echo '' > $@ + echo '' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ ./best-match.sh cib $(*) $(@) " " - echo " " >> $@ - echo " " >> $@ + echo ' ' >> $@ + echo ' ' >> $@ for rng in $(RNG_cfg_base); do ./best-match.sh $$rng $(*) $(@) " " || :; done - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ + echo ' ' >> $@ ./best-match.sh status $(*) $(@) " " - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo " " >> $@ - echo "" >> $@ + 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, From 9286c246fac7c803b99525bd989e264fe76c8ff4 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 3 Mar 2016 16:31:09 -0600 Subject: [PATCH 158/214] Refactor: crmd: remove obsolete arguments from match_down_event() --- crmd/callbacks.c | 2 +- crmd/te_callbacks.c | 2 +- crmd/te_events.c | 18 ++---------------- crmd/tengine.h | 2 +- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/crmd/callbacks.c b/crmd/callbacks.c index 34abe811422..037d7ee758f 100644 --- a/crmd/callbacks.c +++ b/crmd/callbacks.c @@ -199,7 +199,7 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d xmlNode *update = NULL; int flags = node_update_peer; gboolean alive = is_remote? appeared : crm_is_peer_active(node); - crm_action_t *down = match_down_event(0, node->uuid, NULL, appeared); + crm_action_t *down = match_down_event(node->uuid, appeared); crm_trace("Alive=%d, appear=%d, down=%p", alive, appeared, down); diff --git a/crmd/te_callbacks.c b/crmd/te_callbacks.c index 476df7ade08..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); diff --git a/crmd/te_events.c b/crmd/te_events.c index 21739c44c7e..a3f68ff5606 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -387,9 +387,7 @@ get_cancel_action(const char *id, const char *node) /*! * \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 @@ -402,7 +400,7 @@ get_cancel_action(const char *id, const char *node) * Then, peer_update_callback() could ignore these. */ 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; @@ -420,19 +418,11 @@ match_down_event(int id, const char *target, const char *filter, bool quiet) for (; gIter2 != NULL; gIter2 = gIter2->next) { crm_action_t *action = (crm_action_t *) gIter2->data; - 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; - } 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; @@ -451,7 +441,6 @@ match_down_event(int id, const char *target, const char *filter, bool quiet) } match = action; - id = action->id; break; } @@ -461,12 +450,9 @@ match_down_event(int id, const char *target, const char *filter, bool quiet) } if (match != NULL) { - crm_debug("Match found for action %d: %s on %s", id, + crm_debug("Match found for action %d: %s on %s", match->id, crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY), target); - } else if (id > 0) { - crm_err("No match for action %d", id); - } else if(quiet == FALSE) { crm_warn("No match for shutdown action on %s", target); } diff --git a/crmd/tengine.h b/crmd/tengine.h index 89ca3094f8f..7205c16cc44 100644 --- a/crmd/tengine.h +++ b/crmd/tengine.h @@ -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); From 9595db8c7141f71bc8403e5f184f179b235f9f32 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 3 Mar 2016 16:31:36 -0600 Subject: [PATCH 159/214] Log: crmd: improve log messages from match_down_event() --- crmd/callbacks.c | 3 ++- crmd/te_events.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crmd/callbacks.c b/crmd/callbacks.c index 037d7ee758f..d2e66f94f92 100644 --- a/crmd/callbacks.c +++ b/crmd/callbacks.c @@ -201,7 +201,8 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d 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); diff --git a/crmd/te_events.c b/crmd/te_events.c index a3f68ff5606..49f75f1f196 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -450,11 +450,12 @@ match_down_event(const char *target, bool quiet) } if (match != NULL) { - crm_debug("Match found for action %d: %s on %s", match->id, - crm_element_value(match->xml, XML_LRM_ATTR_TASK_KEY), target); + 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; From e4e25fd862e0c543c2e8f96a8fdad1da4053d75b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 3 Mar 2016 16:55:08 -0600 Subject: [PATCH 160/214] Fix: libtransition: potential memory leak if unpacking action fails Before, a copy of the action XML would be allocated but not freed if allocating the action structure then failed, and callers would silently ignore the failure. Now, the memory leak is avoided, and any errors will be logged. --- lib/transition/unpack.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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) { From 193fa0055c32eba1a43f1797a6b239c2d0f33b9e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Mar 2016 14:46:59 -0600 Subject: [PATCH 161/214] Refactor: libpe_status: separate remote-related code into its own files Move Pacemaker Remote-related functions from utils.c to a new file, remote.c (and the corresponding declarations from internal.h to a new file, remote.h, included by it). No code is changed, just moved. This helps isolate remote-related code and keeps utils.c from growing ever bigger. --- include/crm/pengine/Makefile.am | 2 +- include/crm/pengine/internal.h | 6 +- include/crm/pengine/remote.h | 28 +++++++++ lib/pengine/Makefile.am | 3 +- lib/pengine/remote.c | 101 ++++++++++++++++++++++++++++++++ lib/pengine/utils.c | 82 +------------------------- 6 files changed, 134 insertions(+), 88 deletions(-) create mode 100644 include/crm/pengine/remote.h create mode 100644 lib/pengine/remote.c 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/internal.h b/include/crm/pengine/internal.h index c419a41dd9f..f6db1258cf7 100644 --- a/include/crm/pengine/internal.h +++ b/include/crm/pengine/internal.h @@ -18,6 +18,7 @@ #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) @@ -272,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..b86dd90410b --- /dev/null +++ b/include/crm/pengine/remote.h @@ -0,0 +1,28 @@ +/* + * 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); + +#endif 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/remote.c b/lib/pengine/remote.c new file mode 100644 index 00000000000..45208305fdf --- /dev/null +++ b/lib/pengine/remote.c @@ -0,0 +1,101 @@ +/* + * 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; +} diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c index 5fd7a4b762e..5b1cada96db 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) { @@ -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. * @@ -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) { From 75b3ff7a74f1e18ea0ed212566858181a2ad9f36 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Mar 2016 16:08:57 -0600 Subject: [PATCH 162/214] Refactor: libpe_status: mark appropriate arguments as const for a couple of functions This will allow node_copy() and find_actions() to be used in more contexts. --- include/crm/pengine/internal.h | 4 ++-- lib/pengine/utils.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/crm/pengine/internal.h b/include/crm/pengine/internal.h index f6db1258cf7..8adae7ca106 100644 --- a/include/crm/pengine/internal.h +++ b/include/crm/pengine/internal.h @@ -104,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); @@ -216,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); diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c index 5b1cada96db..ec7b380ff90 100644 --- a/lib/pengine/utils.c +++ b/lib/pengine/utils.c @@ -63,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; @@ -1191,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; From 26122e8aaf034a1a7a80fbccceef04913b77ebd5 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 8 Mar 2016 16:10:37 -0600 Subject: [PATCH 163/214] Refactor: libpe_status,pengine: functionize iterating over a host's guest nodes This functionizes some of find_fence_target_node_actions() into a new library function, pe_foreach_guest_node(), to isolate remote-related code and allow the functionality to be used elsewhere. --- include/crm/pengine/remote.h | 2 ++ lib/pengine/remote.c | 32 +++++++++++++++++++ pengine/native.c | 59 +++++++++++++++++++++--------------- 3 files changed, 68 insertions(+), 25 deletions(-) diff --git a/include/crm/pengine/remote.h b/include/crm/pengine/remote.h index b86dd90410b..cf78184b3fd 100644 --- a/include/crm/pengine/remote.h +++ b/include/crm/pengine/remote.h @@ -24,5 +24,7 @@ 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/lib/pengine/remote.c b/lib/pengine/remote.c index 45208305fdf..e8d9bab6279 100644 --- a/lib/pengine/remote.c +++ b/lib/pengine/remote.c @@ -99,3 +99,35 @@ xml_contains_remote_node(xmlNode *xml) } 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/pengine/native.c b/pengine/native.c index 829613aa0c9..ecc83863d50 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -2885,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 From b194024c89216f054d7369883c72c63b27411a34 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 3 Mar 2016 18:13:40 -0600 Subject: [PATCH 164/214] Refactor: pengine: add list of downed nodes to action XML If an action is expected to bring any nodes down, the PE now lists the nodes' UUIDs in the action XML. This will allow the crmd to more intelligently determine whether an outage was expected (particularly for Pacemaker Remote nodes). --- include/crm/msg_xml.h | 15 +++--- pengine/graph.c | 105 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 108 insertions(+), 12 deletions(-) diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index 278b0941781..d8c72c3ad53 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -253,17 +253,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 +289,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" diff --git a/pengine/graph.c b/pengine/graph.c index 4e1af52ea79..230ee2f654b 100644 --- a/pengine/graph.c +++ b/pengine/graph.c @@ -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; } From d2873c4cbd5dc272e93b6f82b7102f6e2f5961b2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 9 Mar 2016 16:41:14 -0600 Subject: [PATCH 165/214] Test: pengine: update regression tests for new downed-node XML --- pengine/test10/594.exp | 6 ++++++ pengine/test10/662.exp | 3 +++ pengine/test10/797.exp | 3 +++ pengine/test10/829.exp | 3 +++ pengine/test10/bug-1572-1.exp | 3 +++ pengine/test10/bug-1572-2.exp | 3 +++ pengine/test10/bug-1573.exp | 3 +++ pengine/test10/bug-1820-1.exp | 3 +++ pengine/test10/bug-1820.exp | 3 +++ pengine/test10/bug-1822.exp | 3 +++ pengine/test10/bug-5028-detach.exp | 3 +++ pengine/test10/bug-5186-partial-migrate.exp | 3 +++ pengine/test10/bug-cl-5247.exp | 3 +++ pengine/test10/bug-lf-2508.exp | 3 +++ pengine/test10/bug-lf-2551.exp | 3 +++ pengine/test10/bug-lf-2606.exp | 3 +++ pengine/test10/bug-rh-1097457.exp | 3 +++ .../test10/colocate-primitive-with-clone.exp | 3 +++ pengine/test10/concurrent-fencing.exp | 9 +++++++++ pengine/test10/inc12.exp | 18 ++++++++++++++++++ pengine/test10/interleave-pseudo-stop.exp | 3 +++ pengine/test10/master-7.exp | 3 +++ pengine/test10/master-8.exp | 3 +++ pengine/test10/master-9.exp | 3 +++ pengine/test10/migrate-fencing.exp | 3 +++ pengine/test10/migrate-shutdown.exp | 12 ++++++++++++ pengine/test10/novell-239082.exp | 3 +++ pengine/test10/novell-252693.exp | 3 +++ pengine/test10/params-2.exp | 3 +++ pengine/test10/rec-node-11.exp | 3 +++ pengine/test10/rec-node-12.exp | 3 +++ pengine/test10/rec-node-13.exp | 3 +++ pengine/test10/rec-node-14.exp | 9 +++++++++ pengine/test10/rec-node-15.exp | 3 +++ pengine/test10/rec-node-2.exp | 3 +++ pengine/test10/rec-node-4.exp | 3 +++ pengine/test10/rec-node-6.exp | 3 +++ pengine/test10/rec-node-7.exp | 3 +++ pengine/test10/rec-rsc-5.exp | 3 +++ pengine/test10/remote-disable.exp | 3 +++ .../test10/remote-fence-before-reconnect.exp | 6 ++++++ pengine/test10/remote-fence-unclean.exp | 6 ++++++ pengine/test10/remote-fence-unclean2.exp | 3 +++ pengine/test10/remote-orphaned.exp | 3 +++ pengine/test10/remote-partial-migrate2.exp | 3 +++ pengine/test10/remote-recover-fail.exp | 6 ++++++ pengine/test10/remote-start-fail.exp | 3 +++ pengine/test10/remote-unclean2.exp | 6 ++++++ pengine/test10/simple7.exp | 3 +++ pengine/test10/stonith-0.exp | 6 ++++++ pengine/test10/stonith-1.exp | 3 +++ pengine/test10/stonith-2.exp | 3 +++ pengine/test10/stonith-3.exp | 3 +++ pengine/test10/stonith-4.exp | 12 ++++++++++++ pengine/test10/stop-failure-no-quorum.exp | 3 +++ pengine/test10/stop-failure-with-fencing.exp | 3 +++ pengine/test10/systemhealth1.exp | 6 ++++++ pengine/test10/systemhealth2.exp | 3 +++ pengine/test10/systemhealth3.exp | 3 +++ pengine/test10/systemhealthm1.exp | 6 ++++++ pengine/test10/systemhealthm2.exp | 3 +++ pengine/test10/systemhealthm3.exp | 3 +++ pengine/test10/systemhealthn1.exp | 6 ++++++ pengine/test10/systemhealthn2.exp | 3 +++ pengine/test10/systemhealthn3.exp | 3 +++ pengine/test10/systemhealtho1.exp | 6 ++++++ pengine/test10/systemhealtho2.exp | 3 +++ pengine/test10/systemhealtho3.exp | 3 +++ pengine/test10/systemhealthp1.exp | 6 ++++++ pengine/test10/systemhealthp2.exp | 3 +++ pengine/test10/systemhealthp3.exp | 3 +++ pengine/test10/ticket-clone-21.exp | 6 ++++++ pengine/test10/ticket-clone-9.exp | 6 ++++++ pengine/test10/ticket-group-21.exp | 3 +++ pengine/test10/ticket-group-9.exp | 3 +++ pengine/test10/ticket-master-21.exp | 3 +++ pengine/test10/ticket-master-9.exp | 3 +++ pengine/test10/ticket-primitive-21.exp | 3 +++ pengine/test10/ticket-primitive-9.exp | 3 +++ pengine/test10/unfence-definition.exp | 3 +++ pengine/test10/unfence-parameters.exp | 3 +++ pengine/test10/unfence-startup.exp | 3 +++ pengine/test10/unmanaged-master.exp | 6 ++++++ pengine/test10/whitebox-fail1.exp | 3 +++ pengine/test10/whitebox-fail2.exp | 3 +++ .../test10/whitebox-imply-stop-on-fence.exp | 5 +++++ pengine/test10/whitebox-move.exp | 3 +++ pengine/test10/whitebox-ms-ordering-move.exp | 3 +++ pengine/test10/whitebox-orphan-ms.exp | 6 ++++++ pengine/test10/whitebox-orphaned.exp | 3 +++ pengine/test10/whitebox-stop.exp | 3 +++ 91 files changed, 365 insertions(+) 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/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/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-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-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-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-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-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-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/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/concurrent-fencing.exp b/pengine/test10/concurrent-fencing.exp index 4c09b7584cd..354111ad5c7 100644 --- a/pengine/test10/concurrent-fencing.exp +++ b/pengine/test10/concurrent-fencing.exp @@ -3,6 +3,9 @@ + + + @@ -11,6 +14,9 @@ + + + @@ -26,6 +32,9 @@ + + + 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/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/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-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/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-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/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/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-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/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-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/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-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-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/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/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-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/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.exp b/pengine/test10/whitebox-ms-ordering-move.exp index 484eff72863..c2a4f543b17 100644 --- a/pengine/test10/whitebox-ms-ordering-move.exp +++ b/pengine/test10/whitebox-ms-ordering-move.exp @@ -239,6 +239,9 @@ + + + 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 @@ + + + From 65c3e95cd8ec0bbb854d7f4200809b7fa425aa40 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 4 Mar 2016 15:43:07 -0600 Subject: [PATCH 166/214] Fix: crmd: don't abort transition for expected remote node shutdown Crmd's match_down_event() now checks the action XML's new "downed" section. This fixes the following issues with the previous version: * Stopping a resource that creates a Pacemaker Remote node is now properly detected as a down event for that node. (Stops that are part of a migration are properly ignored.) * Fencing a cluster node that was running guest nodes is now properly detected as a down event for the guest nodes. * Unfencing events are now properly ignored. --- crmd/callbacks.c | 15 +++-------- crmd/te_events.c | 65 +++++++++++++++--------------------------------- 2 files changed, 24 insertions(+), 56 deletions(-) diff --git a/crmd/callbacks.c b/crmd/callbacks.c index d2e66f94f92..62064a1d84a 100644 --- a/crmd/callbacks.c +++ b/crmd/callbacks.c @@ -217,9 +217,9 @@ 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); if (!is_remote) { @@ -232,18 +232,11 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d trigger_graph(); } else { - crm_trace("Node %s came up, was expected %s (op %d)", - node->uname, task, down->id); + crm_trace("Node %s is %salive, was expected to %s (op %d)", + node->uname, (alive? "" : "not "), task, down->id); } } else if (appeared == FALSE) { - /* match_down_event() doesn't match resource stop events for - * pacemaker_remote nodes, so normal pacemaker_remote node stops - * will come here and get ugly log messages, but otherwise be OK. - * We can't skip this entirely for pacemaker_remote nodes, - * because recurring monitor failures will also end up here - * when the cluster recovers the connection resource. - */ crm_notice("Stonith/shutdown of %s not matched", node->uname); if (!is_remote) { diff --git a/crmd/te_events.c b/crmd/te_events.c index 49f75f1f196..e42e63d2888 100644 --- a/crmd/te_events.c +++ b/crmd/te_events.c @@ -384,6 +384,10 @@ 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 * @@ -391,64 +395,35 @@ get_cancel_action(const char *id, const char *node) * \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. - * \todo This should detect normal pacemaker_remote node stop events, - * where action->type is action_type_rsc, - * XML_LRM_ATTR_TASK is CRMD_ACTION_STOP, - * and the affected resource creates a remote node that matches target. - * Then, peer_update_callback() could ignore these. */ crm_action_t * 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; - - 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; - - this_action = crm_element_value(action->xml, XML_LRM_ATTR_TASK); + char *xpath = crm_strdup_printf(XPATH_DOWNED, target); - if (action->type != action_type_crm) { - continue; - - } else if (safe_str_neq(this_action, CRM_OP_FENCE) - && safe_str_neq(this_action, CRM_OP_SHUTDOWN)) { - continue; - } + for (gIter = transition_graph->synapses; + gIter != NULL && match == NULL; + gIter = gIter->next) { - this_node = crm_element_value(action->xml, XML_LRM_ATTR_TARGET_UUID); + for (gIter2 = ((synapse_t*)gIter->data)->actions; + gIter2 != NULL && match == NULL; + gIter2 = gIter2->next) { - 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 = (crm_action_t*)gIter2->data; + xpath_ret = xpath_search(match->xml, xpath); + if (numXpathResults(xpath_ret) < 1) { + match = NULL; } - - match = action; - break; - } - - if (match != NULL) { - break; + freeXpathObject(xpath_ret); } } + free(xpath); + if (match != NULL) { crm_debug("Shutdown action found for node %s: action %d (%s)", target, match->id, From eff102460dc40c35aeb0013abe3e8b866cf990c1 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 16 Mar 2016 17:51:32 -0500 Subject: [PATCH 167/214] High: build: fix scalability regression This reverts commit 0fe7a4d, which inadvertently negated the LIBS changes made by AC_CHECK_LIB. That causes the check for qb_ipcs_connection_get_buffer_size() to fail even when the function is available, which in turn disables code allowing the CIB to scale to large sizes. --- configure.ac | 6 ------ 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4c0b7a10d4d..28bddaf02ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1039,15 +1039,9 @@ 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" 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" From f9a61522456ac94ddd160e88371979f7996eaff6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 16 Mar 2016 17:56:51 -0500 Subject: [PATCH 168/214] Fix: attrd: crash on exit if initialization fails Patch supplied by Vladislav Bogdanov on the users@clusterlabs.org mailing list on 2015-10-12 --- attrd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/attrd/main.c b/attrd/main.c index 01983960ff2..31e531712e2 100644 --- a/attrd/main.c +++ b/attrd/main.c @@ -374,8 +374,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); From da9af2d2958c3b501777e45c42d2b605d162a6ca Mon Sep 17 00:00:00 2001 From: guest Date: Thu, 17 Mar 2016 08:29:08 +0900 Subject: [PATCH 169/214] Mid: attrd: Support of the dampen change by attrd.(final change.) --- attrd/commands.c | 69 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/attrd/commands.c b/attrd/commands.c index 2e903404cda..5d07748ad07 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -687,36 +687,41 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, const char *host, bool filter) crm_warn("Update error (attribute %s not found)", attr); return; } - } else { - 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; - } + } + + 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 { - crm_warn("Update error (A positive number is necessary for delay parameter. attribute %s : %dms (%s))", a->id, dampen, dvalue); - return; + 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 (delay parameter is necessary for the update of the attribute %s)", a->id); + 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; } } @@ -752,18 +757,14 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, const char *host, bool filter) free_xml(sync); } else if(safe_str_neq(v->current, value)) { - if (safe_str_eq(op, ATTRD_OP_UPDATE) || safe_str_eq(op, ATTRD_OP_UPDATE_BOTH)) { - crm_info("Setting %s[%s]: %s -> %s from %s", attr, host, v->current, value, peer->uname); - free(v->current); - if(value) { - v->current = strdup(value); - } else { - v->current = NULL; - } - changed = TRUE; + crm_info("Setting %s[%s]: %s -> %s from %s", attr, host, v->current, value, peer->uname); + free(v->current); + if(value) { + v->current = strdup(value); } else { - crm_trace("Unchanged %s[%s] from %s.(ATTRD_OP_UPDATE_DELAY)", attr, host, peer->uname); + v->current = NULL; } + changed = TRUE; } else { crm_trace("Unchanged %s[%s] from %s is %s", attr, host, peer->uname, value); } From cc3ce9a6a3c8f952add5ecd01be142e9c4c11c7e Mon Sep 17 00:00:00 2001 From: guest Date: Thu, 17 Mar 2016 10:19:08 +0900 Subject: [PATCH 170/214] Mid: extra: Support of the dampen change by RA. --- extra/resources/SysInfo | 4 +++- extra/resources/ifspeed | 2 +- extra/resources/ping | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extra/resources/SysInfo b/extra/resources/SysInfo index 33f7139e3ca..80e0d835f40 100644 --- a/extra/resources/SysInfo +++ b/extra/resources/SysInfo @@ -146,7 +146,7 @@ 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" + ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n $name -B "$value" } SysInfoStats() { @@ -328,6 +328,8 @@ fi : ${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..224defe0a2a 100644 --- a/extra/resources/ifspeed +++ b/extra/resources/ifspeed @@ -396,7 +396,7 @@ update() { local speed=$( iface_get_speed ${OCF_RESKEY_iface} ) : $(( score = speed * ${OCF_RESKEY_weight_base} / 1000 )) - attrd_updater -n ${OCF_RESKEY_name} -v ${score} -d ${OCF_RESKEY_dampen} ${attrd_options} + attrd_updater -n ${OCF_RESKEY_name} -B ${score} -d ${OCF_RESKEY_dampen} ${attrd_options} rc=$? case ${rc} in 0) diff --git a/extra/resources/ping b/extra/resources/ping index f3bc53afa12..1903bee3d17 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -291,7 +291,7 @@ ping_update() { fi score=`expr $active \* $OCF_RESKEY_multiplier` - attrd_updater -n $OCF_RESKEY_name -v $score -d $OCF_RESKEY_dampen $attrd_options + attrd_updater -n $OCF_RESKEY_name -B $score -d $OCF_RESKEY_dampen $attrd_options rc=$? case $rc in 0) ping_conditional_log debug "Updated $OCF_RESKEY_name = $score" ;; From ad56141aed2c915bacb8e5ddb66bc6d9a54714ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Thu, 17 Mar 2016 09:45:40 +0100 Subject: [PATCH 171/214] doc: describe recovery behavior of stonith-enabled=false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Wágner --- doc/Pacemaker_Explained/en-US/Ch-Options.txt | 5 +++++ 1 file changed, 5 insertions(+) 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] From 850487752b7817ff2eea45efac36b3b477fe6b5c Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 19 Mar 2016 15:36:01 +0100 Subject: [PATCH 172/214] Failing to find libqb >= 0.13 should be fatal Like it was before 836e034 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 28bddaf02ee..689aa36f2ea 100644 --- a/configure.ac +++ b/configure.ac @@ -1039,7 +1039,7 @@ if test x${enable_no_stack} = xyes; then SUPPORT_CS=no fi -PKG_CHECK_MODULES(libqb, libqb >= 0.13, HAVE_libqb=1, HAVE_libqb=0) +PKG_CHECK_MODULES(libqb, libqb >= 0.13, HAVE_libqb=1) AC_CHECK_HEADERS(qb/qbipc_common.h) AC_CHECK_LIB(qb, qb_ipcs_connection_auth_set) From b2c591edb8cdb4390dff8dcda0bf34aefa4b048d Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 19 Mar 2016 15:53:45 +0100 Subject: [PATCH 173/214] libqb: take pkgconfig result into account --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 689aa36f2ea..6b76746959d 100644 --- a/configure.ac +++ b/configure.ac @@ -1040,6 +1040,8 @@ if test x${enable_no_stack} = xyes; then fi 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) @@ -1048,7 +1050,6 @@ 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) From 3f09092a3a5391b75d7a31ae7a4849288d75436c Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 19 Mar 2016 16:39:49 +0100 Subject: [PATCH 174/214] Remove unused variable --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6b76746959d..b867da44da2 100644 --- a/configure.ac +++ b/configure.ac @@ -1045,7 +1045,6 @@ LIBS="$libqb_LIBS $LIBS" AC_CHECK_HEADERS(qb/qbipc_common.h) AC_CHECK_LIB(qb, qb_ipcs_connection_auth_set) -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])) From 5743dda7ea27f3e4626e6b676fd7d68888adb0d2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 21 Mar 2016 17:44:44 -0500 Subject: [PATCH 175/214] Feature: tools: crm_mon now sanitizes logfiles --- tools/report.collector | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 0cf4a1e29ce..ecd1546b34d 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -728,7 +728,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 @@ -739,8 +740,10 @@ for l in $logfiles $EXTRA_LOGS; do 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 @@ -769,12 +772,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 From d8f46ba7ea997fbd0af817adf0387ab5ebc22e07 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 21 Mar 2016 17:50:25 -0500 Subject: [PATCH 176/214] Fix: doc: correct pcs command in Pacemaker Remote example --- doc/Pacemaker_Remote/en-US/Ch-Example.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Pacemaker_Remote/en-US/Ch-Example.txt b/doc/Pacemaker_Remote/en-US/Ch-Example.txt index 9513e3da6ac..cdc1823dd79 100644 --- a/doc/Pacemaker_Remote/en-US/Ch-Example.txt +++ b/doc/Pacemaker_Remote/en-US/Ch-Example.txt @@ -102,7 +102,7 @@ vm-guest1 (ocf::heartbeat:VirtualDomain): Started node1 Now, you could place a resource, such as a webserver, on *guest1*: ---- # pcs resource create webserver apache params configfile=/etc/httpd/conf/httpd.conf op monitor interval=30s -# pcs constraint webserver prefers guest1 +# pcs constraint location webserver prefers guest1 ---- Now, the crm_mon output would show: From 5879cfcf5c674201cbe4e7decbd54209fbfbe90d Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 21 Mar 2016 17:56:45 -0500 Subject: [PATCH 177/214] Log: lrmd: upgrade "already shutting down" message to notice in case sysadmin is sending KILL KILL KILL --- lrmd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lrmd/main.c b/lrmd/main.c index 98a14126df8..7fc4d5f503f 100644 --- a/lrmd/main.c +++ b/lrmd/main.c @@ -309,7 +309,7 @@ lrmd_shutdown(int nsig) */ if (ipc_proxy) { if (shutting_down) { - crm_trace("Shutdown already in progress"); + crm_notice("Waiting for cluster to stop resources before exiting"); return; } From 98457d1635db1222f93599b6021e662e766ce62d Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 24 Mar 2016 10:55:54 -0500 Subject: [PATCH 178/214] Fix: crmd: update cluster state in CIB after fencing an unseen node 8b98a9b2 introduced a regression such that if a node that has never been seen is fenced and remains unseen after the fence, it will incorrectly remain unclean, because the cluster state will never be updated in the CIB. --- crmd/te_actions.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) 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) { From e9a9d8e2d79a0a6099612af3bcf344692d8ee63c Mon Sep 17 00:00:00 2001 From: guest Date: Tue, 29 Mar 2016 12:58:07 +0900 Subject: [PATCH 179/214] Mid: extra: Support of the dampen change by RA.(Second) --- extra/resources/SysInfo | 6 +++++- extra/resources/ifspeed | 12 ++++++------ extra/resources/ping | 8 +++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/extra/resources/SysInfo b/extra/resources/SysInfo index 80e0d835f40..81af0bba722 100644 --- a/extra/resources/SysInfo +++ b/extra/resources/SysInfo @@ -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 -B "$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() { diff --git a/extra/resources/ifspeed b/extra/resources/ifspeed index 224defe0a2a..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 < - @@ -291,7 +290,11 @@ ping_update() { fi score=`expr $active \* $OCF_RESKEY_multiplier` - attrd_updater -n $OCF_RESKEY_name -B $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" ;; @@ -372,7 +375,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 From db33d82b4702b255c7e50d7f3e5bf694e6099c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 31 Mar 2016 17:31:16 +0200 Subject: [PATCH 180/214] Build: spec: avoid cumbersome length of source archive Examples of the source archives after the change: - full release: pacemaker-1.1.14.tar.gz - snapshot release: pacemaker-5a6cdd1.tar.gz GNUmakefile changed accordingly. --- GNUmakefile | 11 +++++++---- pacemaker.spec.in | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 5d617ab0774..37da54731dc 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,10 @@ 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;;\ + 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/pacemaker.spec.in b/pacemaker.spec.in index 5479ea04ad0..e35b994e741 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -3,8 +3,11 @@ %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 github_owner ClusterLabs # Turn off the auto compilation of python files not in the site-packages directory @@ -58,7 +61,7 @@ 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+ @@ -69,7 +72,7 @@ License: GPLv2+ and LGPLv2+ and BSD 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 From 6e838b66e12e8a81bf892795bed23a6686dde110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 31 Mar 2016 18:03:47 +0200 Subject: [PATCH 181/214] Build: spec: native support for post-releases (snapshots) GNUmakefile changed accordingly. --- GNUmakefile | 1 + pacemaker.spec.in | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index 37da54731dc..126620b6e98 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -157,6 +157,7 @@ srpm-%: export $(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;; \ *) \ + [ "$(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/pacemaker.spec.in b/pacemaker.spec.in index e35b994e741..5c77432b74f 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -8,6 +8,7 @@ # "pcmkversion" macro to "Pacemaker-" (will yield a tag per the convention) %global commit HEAD %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 @@ -56,8 +57,12 @@ %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 From 3e6d9cf004ea5fa8155e089033acfb3724060b29 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Wed, 30 Mar 2016 16:09:40 +0800 Subject: [PATCH 182/214] Low: xml: use spaces instead of tabs in schema files there are tabs in files of xml dirctory which makes it not convenient to read when tab is not eight in some vimrc, this patch replaced tabs with 8 blanks --- xml/acls-1.2.rng | 64 ++++---- xml/acls-2.0.rng | 96 +++++------ xml/constraints-1.0.rng | 180 ++++++++++----------- xml/constraints-1.2.rng | 248 ++++++++++++++-------------- xml/constraints-2.1.rng | 264 +++++++++++++++--------------- xml/constraints-2.2.rng | 270 +++++++++++++++---------------- xml/constraints-2.3.rng | 272 +++++++++++++++---------------- xml/constraints-next.rng | 302 +++++++++++++++++----------------- xml/crm-transitional.dtd | 2 +- xml/crm.xsl | 8 +- xml/fencing-1.2.rng | 10 +- xml/fencing-2.4.rng | 18 +-- xml/nodes-1.0.rng | 38 ++--- xml/nodes-1.2.rng | 58 +++---- xml/nodes-1.3.rng | 60 +++---- xml/nvset-1.3.rng | 42 ++--- xml/nvset.rng | 22 +-- xml/ocf-meta2man.xsl | 58 +++---- xml/options-1.0.rng | 38 ++--- xml/resources-1.0.rng | 230 +++++++++++++------------- xml/resources-1.2.rng | 312 ++++++++++++++++++------------------ xml/resources-1.3.rng | 314 ++++++++++++++++++------------------ xml/rule.rng | 154 +++++++++--------- xml/score.rng | 8 +- xml/tags-1.3.rng | 16 +- xml/upgrade-1.3.xsl | 32 ++-- xml/upgrade06.xsl | 338 +++++++++++++++++++-------------------- 27 files changed, 1727 insertions(+), 1727 deletions(-) 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/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/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/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 @@ - - - - - - - - - + + + + + + + + + From 76daaa0b3d8164706ad00cfc2d7365e0fd8f5303 Mon Sep 17 00:00:00 2001 From: HideoYamauchi Date: Mon, 11 Apr 2016 11:08:15 +0900 Subject: [PATCH 183/214] Low: crm_report: Support of the L option. --- tools/crm_report.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index 5c993dc529f..52e2713bece 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -20,7 +20,7 @@ # Note the quotes around `$TEMP': they are essential! TEMP=`getopt \ - -o hv?xl:f:t:n:T:Lp:c:dSACHu:D:MVse: \ + -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" From 3a53b2577905240f07a487031d274ef90ea3890e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Tue, 12 Apr 2016 15:39:18 +0200 Subject: [PATCH 184/214] Build: explicitly allow skipping Publican building docs There are cases one wants to avoid Publican being involved in the build process at all (for instance, if a local copy is too old to behave gracefully with what build process requires). We avoid introducing a new configure option by (sort of) overloading --with-brand one. See also rhbz#1326350 (instructing configure using --with-brand= would then help). --- configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b867da44da2..c97a8dc8391 100644 --- a/configure.ac +++ b/configure.ac @@ -312,7 +312,7 @@ AC_ARG_WITH(coverage, PUBLICAN_BRAND="common" AC_ARG_WITH(brand, - [ --with-brand=brand Brand to use for generated documentation [$PUBLICAN_BRAND]], + [ --with-brand=brand Brand to use for generated documentation (set empty for no docs) [$PUBLICAN_BRAND]], [ PUBLICAN_BRAND="$withval" ]) AC_SUBST(PUBLICAN_BRAND) @@ -606,8 +606,13 @@ 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 +AM_CONDITIONAL([BUILD_DOCBOOK], + [test x"${PUBLICAN_BRAND}" != x"" \ + && test x"${PUBLICAN}" != x"" \ + && test x"${INKSCAPE}" != x""]) +if test x"${PUBLICAN_BRAND}" != x"" \ + && test x"${PUBLICAN}" != x"" \ + && test x"${INKSCAPE}" != x""; then AC_MSG_NOTICE(Enabling publican) PCMK_FEATURES="$PCMK_FEATURES publican-docs" fi From 58dcf0a73ef5712af3f8fbe87c89852646f37540 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 12 Apr 2016 21:39:51 +0200 Subject: [PATCH 185/214] Fix: cib/fencing: Set status callback before connecting to cluster Otherwise, we'd at least miss the initial call to crm_status_callback(): init_cs_connection_once() -> crm_get_peer() -> crm_update_peer_uname() -> crm_status_callback() Previously for stonithd, it would not be able to broadcast its uname at the earliest time, which could potentially introduce other issues. --- cib/main.c | 8 +++++--- fencing/main.c | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) 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/fencing/main.c b/fencing/main.c index 1435d8eac7f..76107233121 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -1450,6 +1450,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); @@ -1486,7 +1488,6 @@ 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); From 7880b4954331a44aa85be089ff5e21146a0f5c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Wed, 13 Apr 2016 13:15:16 +0200 Subject: [PATCH 186/214] Build: put possible (V=0) redirection to a usual location --- doc/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index f4c836d4137..e7f037e8e4d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -95,7 +95,7 @@ $(CFS_XML): $(CFS_SHARED_XML) Clusters_from_Scratch.build: $(PNGS) $(wildcard Clusters_from_Scratch/en-US/*.xml) $(CFS_XML) $(CFS_SHARED_XML) ../xsl $(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 + $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs $(PCMK_quiet) rm -rf $(@:%.build=%)/tmp touch $@ @@ -112,7 +112,7 @@ $(PE_XML): $(PE_SHARED_XML) Pacemaker_Explained.build: $(PNGS) $(wildcard Pacemaker_Explained/en-US/*.xml) $(PE_XML) $(PE_SHARED_XML) ../xsl $(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 + $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs $(PCMK_quiet) rm -rf $(@:%.build=%)/tmp touch $@ @@ -125,7 +125,7 @@ PR_XML=$(PR_TXT:%.txt=%.xml) Pacemaker_Remote.build: $(PNGS) $(wildcard Pacemaker_Remote/en-US/*.xml) $(PR_XML) ../xsl $(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 + $(AM_V_PUB)cd $(@:%.build=%) && RPM_BUILD_DIR="" $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs $(PCMK_quiet) rm -rf $(@:%.build=%)/tmp touch $@ From fda0d2a0af721d21e50af5da9bfa04cc64591869 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 4 Apr 2016 16:34:52 -0500 Subject: [PATCH 187/214] Refactor: tools: make crm_report more vim-friendly Add a modeline for formatting style, and tweak code so syntax highlighting works. --- tools/crm_report.in | 6 ++++-- tools/report.collector | 2 ++ tools/report.common.in | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index 52e2713bece..3317e4535e3 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -161,7 +161,7 @@ collect_data() { fi for node in $nodes; do - cat<$l_base/.env + cat <$l_base/.env LABEL="$label" REPORT_HOME="$r_base" REPORT_MASTER="$host" @@ -179,7 +179,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 @@ -479,3 +479,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/report.collector b/tools/report.collector index ecd1546b34d..7a035a5c772 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -792,3 +792,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..5073de817dc 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -803,3 +803,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: From b8709b866ed4466523c75fc23000ee826c82c8c6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Mon, 4 Apr 2016 15:41:32 -0500 Subject: [PATCH 188/214] Fix: tools: fix detection of cluster type in crm_report Previously, whitespace after an equals sign was not ignored, and " quorum_cman" would never match "quorum_cman". --- tools/report.common.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/report.common.in b/tools/report.common.in index 5073de817dc..ff0b4776483 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -711,8 +711,8 @@ get_cluster_type() { 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" From 6de28e16c600188563e05108f6ac6124fa1366aa Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 8 Apr 2016 15:20:04 -0500 Subject: [PATCH 189/214] Fix: tools: improve crm_report's sys_info.txt output Tidy up command output, add some blank lines for readability, fix a bug that skipped printing the messaging layer version, and include pacemaker-cluster-libs and pacemaker-remote in the list of packages to verify. --- tools/report.collector | 22 +++++++++++++--------- tools/report.common.in | 7 +++++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 7a035a5c772..996707068f4 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -314,7 +314,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 +349,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 +364,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" @@ -441,21 +443,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 +468,7 @@ sys_info() { # Resource agents version hash echo "resource-agents: `grep 'Build version:' /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs`" + echo pkg_ver $* } diff --git a/tools/report.common.in b/tools/report.common.in index ff0b4776483..4429e1780a2 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 From d4cb6107bfd73764dc00df1520d7600e95d35b16 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 8 Apr 2016 15:29:07 -0500 Subject: [PATCH 190/214] Fix: tools: crm_report shouldn't log debug messages twice when in verbose mode Not THAT verbose. ;) --- tools/report.common.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/report.common.in b/tools/report.common.in index 4429e1780a2..21790c0b610 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -96,8 +96,9 @@ log() { debug() { if [ $verbose -gt 0 ]; then log "Debug: $*" + else + record "Debug: $*" fi - record "Debug: $*" } info() { From a60dcfd70dd1754015cfe02fa672ef9f8dc84279 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 8 Apr 2016 15:58:21 -0500 Subject: [PATCH 191/214] Fix: tools: improve crm_report's cluster configuration output Don't try to run crm_uuid if it doesn't exist, properly handle Pacemaker Remote nodes when dumping the cluster status and configuration, and properly dump configuration info when the cluster uses pcs instead of crm. This also refactors a new function is_running() to reduce code duplication and make the code more readable. --- tools/crm_report.in | 4 +--- tools/report.collector | 35 ++++++++++++++++++++++------------- tools/report.common.in | 13 +++++++------ 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index 3317e4535e3..b4a80b9c84a 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -380,9 +380,7 @@ getnodes() { cluster_cf=`find_cluster_cf $cluster` # 1. Live - if - ps -ef | egrep -qs "[c]ib" - then + if is_running cib; then debug "Querying CIB for nodes" cibadmin -Ql -o nodes | awk ' /uname/ { diff --git a/tools/report.collector b/tools/report.collector index 996707068f4..9dcfda68eac 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -210,6 +210,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 +225,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 +238,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 } @@ -495,9 +508,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 @@ -682,9 +693,7 @@ getblackboxes $LOG_START $LOG_END $REPORT_HOME/$REPORT_TARGET case $cluster in cman|corosync) - if - ps -ef | egrep -qs '[c]orosync' - then + if is_running corosync; then corosync-blackbox &> corosync-blackbox-live.txt fi # corosync-fplay > corosync-blackbox.txt diff --git a/tools/report.common.in b/tools/report.common.in index 21790c0b610..18c68ac2b05 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -114,6 +114,10 @@ fatal() { exit 1 } +is_running() { + ps -ef | egrep -qs $(echo "$1" | sed -e 's/^\(.\)/[\1]/') +} + detect_host() { if [ -z "$maxdepth" ]; then depth="-maxdepth 5" @@ -710,9 +714,7 @@ 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/.*=\s*//'`;; @@ -724,10 +726,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 From e6af33ae020ce2495b28392a73067a530f0004f6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 12 Apr 2016 14:30:36 -0500 Subject: [PATCH 192/214] Fix: tools: replace bashisms in crm_report scripts --- tools/report.collector | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 9dcfda68eac..704092ce9c7 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -410,7 +410,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 @@ -439,7 +439,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 } @@ -694,7 +694,7 @@ getblackboxes $LOG_START $LOG_END $REPORT_HOME/$REPORT_TARGET case $cluster in cman|corosync) if is_running corosync; then - corosync-blackbox &> corosync-blackbox-live.txt + corosync-blackbox >corosync-blackbox-live.txt 2>&1 fi # corosync-fplay > corosync-blackbox.txt From ebec33cd9503d697447f404eb6f9c2b541074b4c Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 8 Apr 2016 16:36:52 -0500 Subject: [PATCH 193/214] Fix: tools: crm_report should find pacemaker_remote logs Also combine multiple patterns into one expression to improve performance. --- tools/report.collector | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 704092ce9c7..f520f80ffd7 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -615,17 +615,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() { From 5530088f427d9b51927b06245739a2999af4eb00 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 12 Apr 2016 16:26:29 -0500 Subject: [PATCH 194/214] Fix: tools: make crm_report search system logs more efficiently Previously, crm_report's findmsg function would uncompress and grep all system logs, then display the names of the N most recently modified. Now, it processes the files in order of most recently modified, and returns once it has displayed N names. Also, it can now handle log files with spaces in their names. --- tools/report.common.in | 102 +++++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 35 deletions(-) diff --git a/tools/report.common.in b/tools/report.common.in index 18c68ac2b05..fe59023b057 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -72,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 # @@ -336,34 +346,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() { @@ -489,16 +523,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 # From 1768a3da806a31dd4b04a4b04be68d1320be508e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 12 Apr 2016 17:22:56 -0500 Subject: [PATCH 195/214] Fix: tools: improve crm_report's detection of node names If run from a Pacemaker Remote node that is integrated into the cluster, crm_report is now able to get the node list from the live CIB. --- tools/crm_report.in | 127 ++++++++++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 52 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index b4a80b9c84a..c2d48d7b58e 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -365,67 +365,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 is_running cib; 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 } @@ -449,13 +466,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 From 2eda7f1840d6a6c240e08fabf9b9ba1dfc89aa90 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 12:41:24 -0500 Subject: [PATCH 196/214] Fix: tools: make crm_report happier when run on remote nodes Before, crm_report would assume a cluster stack of heartbeat if none could be detected. Since remote nodes won't have a cluster stack, various things would break. Now, it simply collects less data if no stack can be found. --- tools/report.collector | 71 ++++++++++++++++++++++-------------------- tools/report.common.in | 11 ++++++- 2 files changed, 47 insertions(+), 35 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index f520f80ffd7..bc9aa9906ad 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -566,48 +566,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/pacemaker.log" - ;; 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()'`" @@ -668,7 +669,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 @@ -685,7 +689,7 @@ else 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 @@ -698,16 +702,15 @@ getblackboxes $LOG_START $LOG_END $REPORT_HOME/$REPORT_TARGET case $cluster in cman|corosync) if is_running corosync; then - corosync-blackbox >corosync-blackbox-live.txt 2>&1 + 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 diff --git a/tools/report.common.in b/tools/report.common.in index fe59023b057..c3e4d0f8128 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -778,8 +778,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" @@ -826,6 +831,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" ;; From 547861dca512f53890deb272fe9a19d384dd5ad2 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 14:48:09 -0500 Subject: [PATCH 197/214] Fix: tools: crm_report shouldn't exit if daemons can't be found on remote node --- tools/crm_report.in | 1 + tools/report.common.in | 69 +++++++++++++++++++++--------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index c2d48d7b58e..ebfdf73c0e4 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -34,6 +34,7 @@ cluster="any" ssh_user="root" search_logs=1 report_data=`dirname $0` +maxdepth=5 extra_logs="" sanitize_patterns="passw.*" diff --git a/tools/report.common.in b/tools/report.common.in index c3e4d0f8128..bfc8e767339 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -128,20 +128,45 @@ is_running() { ps -ef | egrep -qs $(echo "$1" | sed -e 's/^\(.\)/[\1]/') } -detect_host() { - if [ -z "$maxdepth" ]; then - depth="-maxdepth 5" +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 + echo $d + info "Found: $d" + return + fi + done + + for f in $(find / -maxdepth $maxdepth -type f -name pengine -o -name lrmd_test); do + d=$(dirname "$f") + echo $d + info "Found: $d" + return + done + + # Pacemaker Remote nodes don't need to install daemons + # TODO: pacemaker_remoted might not be on path + if which pacemaker_remoted >/dev/null 2>&1; then + info "Not found (this appears to be a Pacemaker Remote node)" else - depth="-maxdepth $maxdepth" + fatal "Pacemaker daemons not found (nonstandard installation?)" fi +} +detect_host() { local_state_dir=@localstatedir@ if [ -d $local_state_dir/run ]; then CRM_STATE_DIR=$local_state_dir/run/crm else info "Searching for where Pacemaker keeps runtime data... this may take a while" - for d in `find / $depth -type d -name run`; do + for d in `find / -maxdepth $maxdepth -type d -name run`; do local_state_dir=`dirname $d` CRM_STATE_DIR=$d/crm break @@ -151,33 +176,7 @@ detect_host() { 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 - 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 - - if [ -z $CRM_DAEMON_DIR ]; then - fatal "Non-standard Pacemaker installation: daemons not found" - else - debug "Pacemaker daemons located under: $CRM_DAEMON_DIR" - fi + CRM_DAEMON_DIR=$(detect_daemon_dir) CRM_CONFIG_DIR= for d in pacemaker/cib heartbeat/crm; do @@ -189,7 +188,7 @@ detect_host() { 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 + for f in `find / -maxdepth $maxdepth -type f -name cib.xml`; do CRM_CONFIG_DIR=`dirname $f` break done @@ -212,7 +211,7 @@ detect_host() { 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 + for d in `find / -maxdepth $maxdepth -type d -name pengine`; do PE_STATE_DIR=$d break done @@ -810,7 +809,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 From 17579e94f7003591f21ab4501d6ad61dbde99dfc Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 15:21:59 -0500 Subject: [PATCH 198/214] Fix: tools: crm_report shouldn't print warning if CIB can't be found on remote node --- tools/report.common.in | 62 ++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/tools/report.common.in b/tools/report.common.in index bfc8e767339..2fd6fe7d811 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -128,6 +128,16 @@ 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 +} + detect_daemon_dir() { info "Searching for where Pacemaker daemons live... this may take a while" @@ -151,14 +161,39 @@ detect_daemon_dir() { done # Pacemaker Remote nodes don't need to install daemons - # TODO: pacemaker_remoted might not be on path - if which pacemaker_remoted >/dev/null 2>&1; then + if has_remoted; then info "Not found (this appears to be a Pacemaker Remote node)" else fatal "Pacemaker daemons not found (nonstandard installation?)" fi } +detect_cib_dir() { + for d in $local_state_dir/lib/{pacemaker/cib,heartbeat/crm}; do + if [ -f "$d/cib.xml" ]; then + echo $d + info "Pacemaker config files located in: $d" + return + fi + done + + 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) + echo $d + info "Pacemaker config files located in: $d" + return + done + + # Pacemaker Remote nodes don't need a CIB + if has_remoted; then + info "Not found (this appears to be a Pacemaker Remote node)" + else + warning "Pacemaker config not found (nonstandard installation?)" + fi +} + detect_host() { local_state_dir=@localstatedir@ @@ -177,28 +212,7 @@ detect_host() { debug "Pacemaker runtime data located in: $CRM_STATE_DIR" CRM_DAEMON_DIR=$(detect_daemon_dir) - - 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 - done - - if [ ! -d $CRM_CONFIG_DIR ]; then - info "Detecting where Pacemaker keeps config information... this may take a while" - for f in `find / -maxdepth $maxdepth -type f -name cib.xml`; do - CRM_CONFIG_DIR=`dirname $f` - break - done - info "Found: $CRM_CONFIG_DIR" - fi - if [ -z $CRM_CONFIG_DIR ]; then - warning "Non-standard Pacemaker installation: config not found" - else - debug "Pacemaker config files located in: $CRM_CONFIG_DIR" - fi + CRM_CONFIG_DIR=$(detect_cib_dir) # Assume new layout # $local_state_dir/lib/pacemaker/(cib,pengine,blackbox,cores) From 3545e82b770107c7749a27fdf70a039c0ea83e16 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 15:28:18 -0500 Subject: [PATCH 199/214] Fix: tools: crm_report should detect blackbox and cores directories on remote nodes --- tools/report.common.in | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/report.common.in b/tools/report.common.in index 2fd6fe7d811..34ead1c3550 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -194,6 +194,18 @@ detect_cib_dir() { 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 +} + detect_host() { local_state_dir=@localstatedir@ @@ -213,10 +225,7 @@ detect_host() { CRM_DAEMON_DIR=$(detect_daemon_dir) CRM_CONFIG_DIR=$(detect_cib_dir) - - # Assume new layout - # $local_state_dir/lib/pacemaker/(cib,pengine,blackbox,cores) - config_root=`dirname $CRM_CONFIG_DIR` + config_root=$(detect_state_dir) # Older versions had none BLACKBOX_DIR=$config_root/blackbox From e00d52184ef58e1f9d52a9dafc441da41817a8d3 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 15:46:09 -0500 Subject: [PATCH 200/214] Fix: tools: crm_report shouldn't exit if PE inputs can't be found on remote node --- tools/report.collector | 14 ++++++----- tools/report.common.in | 57 +++++++++++++++++++++++++----------------- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index bc9aa9906ad..5ab70257e46 100644 --- a/tools/report.collector +++ b/tools/report.collector @@ -423,12 +423,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 } diff --git a/tools/report.common.in b/tools/report.common.in index 34ead1c3550..f9ed6f5355f 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -138,6 +138,12 @@ has_remoted() { return 1 } +# found_dir +found_dir() { + echo "$2" + info "Pacemaker $1 found in: $2" +} + detect_daemon_dir() { info "Searching for where Pacemaker daemons live... this may take a while" @@ -147,16 +153,14 @@ detect_daemon_dir() { # 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 - echo $d - info "Found: $d" + 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") - echo $d - info "Found: $d" + found_dir "daemons" "$d" return done @@ -170,9 +174,8 @@ detect_daemon_dir() { detect_cib_dir() { for d in $local_state_dir/lib/{pacemaker/cib,heartbeat/crm}; do - if [ -f "$d/cib.xml" ]; then - echo $d - info "Pacemaker config files located in: $d" + if [ "-f $d/cib.xml" ]; then + found_dir "config files" "$d" return fi done @@ -181,8 +184,7 @@ detect_cib_dir() { # 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) - echo $d - info "Pacemaker config files located in: $d" + found_dir "config files" "$d" return done @@ -206,6 +208,28 @@ detect_state_dir() { 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 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 +} + detect_host() { local_state_dir=@localstatedir@ @@ -231,20 +255,7 @@ detect_host() { 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 / -maxdepth $maxdepth -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" From 5cedcaf260ef4f099f4eb7db596abde0bcade8f0 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 16:04:17 -0500 Subject: [PATCH 201/214] Fix: tools: improve crm_report's permissions.txt output --- tools/report.collector | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/report.collector b/tools/report.collector index 5ab70257e46..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` From 1e6a9068743acda2006f6f3d85d824a1cd3fbc71 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 13 Apr 2016 16:32:15 -0500 Subject: [PATCH 202/214] Fix: tools: improve crm_report help text --- tools/crm_report.in | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/crm_report.in b/tools/crm_report.in index ebfdf73c0e4..c2a1b5e585a 100755 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -25,6 +25,7 @@ TEMP=`getopt \ -n 'crm_report' -- "$@"` eval set -- "$TEMP" +progname=$(basename "$0") rsh="ssh -T" times="" tests="" @@ -41,12 +42,11 @@ sanitize_patterns="passw.*" log_patterns="CRIT: ERROR:" usage() { - cat< Date: Thu, 14 Apr 2016 12:06:20 +0200 Subject: [PATCH 203/214] Build: switch Publican branding symlink trick to XML catalog one Such an arrangement[*] (potentially) also adapts to alternative location of Publican installation if reflected in system-wide XML catalog, /etc/xml/catalog, accordingly. (Original symlink trick introduced with 37524ee). [*] also utilized natively by Publican since v3.0: https://bugzilla.redhat.com/800252 --- .gitignore | 2 +- doc/Makefile.am | 50 +++++++++++++++----- doc/publican-clusterlabs/xsl/html-single.xsl | 2 +- doc/publican-clusterlabs/xsl/html.xsl | 2 +- doc/publican-clusterlabs/xsl/pdf.xsl | 2 +- 5 files changed, 43 insertions(+), 15 deletions(-) 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/doc/Makefile.am b/doc/Makefile.am index e7f037e8e4d..959079edf6a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -74,10 +74,28 @@ EXTRA_DIST = $(docbook:%=%.xml) %.html: %.txt $(AM_V_ASCII)$(ASCIIDOC) --unsafe --backend=xhtml11 $< -# publican-clusterlabs/xsl/html-single.xsl imports that of Publican -# through this link during the build -../xsl: - ln -s /usr/share/publican/xsl "$@" +# publican-clusterlabs/xsl/{html,html-single,pdf}.xsl refer to URIs +# requiring Internet access, hence we shadow that with a XML catalog-based +# redirect to local files brought with Publican installation; +# this is what newer Publican normally does with the system-wide catalog +# upon its installation, but let's provide a compatibility for older +# or badly installed instances (via adding the created file into +# XML_CATALOG_FILES for libxml2 backing Publican as a fallback); +# note that nextCatalog arrangement needed so as to overcome +# https://rt.cpan.org/Public/Bug/Display.html?id=113781 +publican-catalog-fallback: + @exec >$@-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) @@ -92,10 +110,13 @@ $(CFS_XML): $(CFS_SHARED_XML) # 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-catalog $(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) --brand_dir=../publican-clusterlabs $(PCMK_quiet) + $(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) rm -rf $(@:%.build=%)/tmp touch $@ @@ -109,10 +130,13 @@ $(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-catalog $(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) --brand_dir=../publican-clusterlabs $(PCMK_quiet) + $(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) rm -rf $(@:%.build=%)/tmp touch $@ @@ -122,10 +146,13 @@ 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-catalog $(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) --brand_dir=../publican-clusterlabs $(PCMK_quiet) + $(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) rm -rf $(@:%.build=%)/tmp touch $@ @@ -201,6 +228,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/publican-clusterlabs/xsl/html-single.xsl b/doc/publican-clusterlabs/xsl/html-single.xsl index c55bf35db5b..0a4839b54c9 100644 --- a/doc/publican-clusterlabs/xsl/html-single.xsl +++ b/doc/publican-clusterlabs/xsl/html-single.xsl @@ -19,6 +19,6 @@ - + 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 @@ - + From 70394ab8e770ccab86771bb5cc6636a1edfdaf59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 14 Apr 2016 12:50:46 +0200 Subject: [PATCH 204/214] Build: emit selected Publican brand in ./configure output --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c97a8dc8391..b4f98ec7faf 100644 --- a/configure.ac +++ b/configure.ac @@ -613,7 +613,7 @@ AM_CONDITIONAL([BUILD_DOCBOOK], if test x"${PUBLICAN_BRAND}" != x"" \ && test x"${PUBLICAN}" != x"" \ && test x"${INKSCAPE}" != x""; then - AC_MSG_NOTICE(Enabling publican) + AC_MSG_NOTICE([Enabling Publican-generated documentation using ${PUBLICAN_BRAND} brand]) PCMK_FEATURES="$PCMK_FEATURES publican-docs" fi From b4fa518d0fc26345f105e1a0ccb2b91fe5f5c308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 14 Apr 2016 18:12:16 +0200 Subject: [PATCH 205/214] Build: extra Publican arrangement only for in-tree brand if usable In other words, if and only if: configured using "--with-brand=clusterlabs" AND NOT clusterlabs brand -- installed in the system AND Publican recognizing "--brand_dir" / If the last sub-clause is not met (under short circuiting evaluation), "common" is used as a fallback brand (no special treatment required). Ability to explicitly prevent Publican generated documentation even if it would otherwise be (using "--with-brand=" to ./configure) is retained. --- configure.ac | 23 +++++++++++++++++++---- doc/Makefile.am | 32 +++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index b4f98ec7faf..73f96343ed7 100644 --- a/configure.ac +++ b/configure.ac @@ -606,16 +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_BRAND}" != x"" \ - && test x"${PUBLICAN}" != x"" \ - && test x"${INKSCAPE}" != x""]) +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 diff --git a/doc/Makefile.am b/doc/Makefile.am index 959079edf6a..9771293048e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -108,15 +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) publican-catalog +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/* +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 $@ @@ -130,13 +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) publican-catalog +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/* +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 $@ @@ -146,13 +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) publican-catalog +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/* +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 $@ From 50b617f090259a6dc00b26d525418019e6159d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 15 Apr 2016 15:45:10 +0200 Subject: [PATCH 206/214] Build: --without-brand to ./configure is no-op ...rather than causing Publican to look up "no" brand --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 73f96343ed7..cbceff3a3d2 100644 --- a/configure.ac +++ b/configure.ac @@ -313,7 +313,7 @@ AC_ARG_WITH(coverage, PUBLICAN_BRAND="common" AC_ARG_WITH(brand, [ --with-brand=brand Brand to use for generated documentation (set empty for no docs) [$PUBLICAN_BRAND]], - [ PUBLICAN_BRAND="$withval" ]) + [ test x"$withval" = x"no" || PUBLICAN_BRAND="$withval" ]) AC_SUBST(PUBLICAN_BRAND) ASCIIDOC_CLI_TYPE="pcs" From 906dc8245c729ee63cc7fd3ae9942fa355ba04eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 15 Apr 2016 15:50:34 +0200 Subject: [PATCH 207/214] Build: spec: make Publican docs not depend on pre-existing packages ...namely publican and inkscape (and asciidoc). If one rpmbuilds using --without-doc, time consuming (roughly half of the overall build time) Publican backed documentation is now not built despite the necessary packages possibly being already present (may happen easily with "rpmbuild --rebuild"). --- pacemaker.spec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 5c77432b74f..9fa3be6748e 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -298,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} From 09c39b71127cb993357befc80d3364da3b2cffcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 15 Apr 2016 20:21:22 +0200 Subject: [PATCH 208/214] Low: ping resource: avoid undefined func w/ OCF_FUNCTIONS=/dev/null When generating man pages for the agents: pacemaker/extra/resources/ping: line 357: ocf_is_true: command not found Note that neither set of "true" indicators (those in ocf_is_true function of ocf-shellfuncs[*] file vs. those recognized as values of "debug" OCF parameter in the very script) is a subset of the other, but acknowledge that latter is a master on its own domain (at least for now, also to avoid regression when "True" is used). [*] as an aside, there's also an almost anecdotical "ja" Germanism --- extra/resources/ping | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extra/resources/ping b/extra/resources/ping index 763a8c34033..b57db4bfbf5 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -353,21 +353,21 @@ else : ${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 From bcf3347f205692a6cd65669ba089ef31d5360476 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Thu, 14 Apr 2016 14:16:25 +0200 Subject: [PATCH 209/214] Fix: pengine: Consider resource failed if any of the configured monitor operations failed Previously with d87de1b, if not all the configured monitor operations failed, the resource could be considered running well. This commit fixes it by conditionally "clear_past_failure". --- lib/pengine/unpack.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index bd865d7e71b..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); @@ -2140,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; @@ -2183,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 */ @@ -2567,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; @@ -2578,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; @@ -2945,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; @@ -2958,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); } @@ -2987,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); } @@ -3025,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; @@ -3176,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: @@ -3189,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: @@ -3206,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); @@ -3217,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, From dbf2ce94b3382c280ef27ac375d5023ff843b9ae Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Tue, 19 Apr 2016 13:29:57 +0200 Subject: [PATCH 210/214] Test: pengine: Consider resource failed if any of the configured monitor operations failed --- pengine/regression.sh | 1 + .../test10/multiple-monitor-one-failed.dot | 11 +++ .../test10/multiple-monitor-one-failed.exp | 62 +++++++++++++++ .../test10/multiple-monitor-one-failed.scores | 3 + .../multiple-monitor-one-failed.summary | 21 +++++ .../test10/multiple-monitor-one-failed.xml | 77 +++++++++++++++++++ 6 files changed, 175 insertions(+) create mode 100644 pengine/test10/multiple-monitor-one-failed.dot create mode 100644 pengine/test10/multiple-monitor-one-failed.exp create mode 100644 pengine/test10/multiple-monitor-one-failed.scores create mode 100644 pengine/test10/multiple-monitor-one-failed.summary create mode 100644 pengine/test10/multiple-monitor-one-failed.xml diff --git a/pengine/regression.sh b/pengine/regression.sh index c897964f0d3..e5a8135c4d7 100755 --- a/pengine/regression.sh +++ b/pengine/regression.sh @@ -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" 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2ae880b0417c7e4ab78756b2af709d00717fe640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= Date: Wed, 20 Apr 2016 11:05:00 +0200 Subject: [PATCH 211/214] Fix: ping resource: Use fping6 for IPv6 hosts --- extra/resources/ping | 53 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/extra/resources/ping b/extra/resources/ping index b57db4bfbf5..e2c5e9eefbf 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -218,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 @@ -225,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` @@ -232,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` @@ -281,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 @@ -311,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"} From cdcd1ad63acc4413114b88a6255c844e5353b8cc Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Mon, 7 Mar 2016 12:39:00 +0100 Subject: [PATCH 212/214] first implementation of integrated multi-agent, multi-target alerting mechanism --- configure.ac | 45 +- crmd/cib.c | 36 +- crmd/control.c | 29 + crmd/notify.c | 755 ++++++++++++++++-- crmd/notify.h | 5 +- .../pcmk_alert_sample.sh} | 13 +- extra/{ => alerts}/pcmk_snmp_helper.sh | 0 include/crm/msg_xml.h | 8 + xml/Makefile.am | 2 +- xml/alerts-2.5.rng | 49 ++ 10 files changed, 843 insertions(+), 99 deletions(-) rename extra/{pcmk_notify_sample.sh => alerts/pcmk_alert_sample.sh} (71%) rename extra/{ => alerts}/pcmk_snmp_helper.sh (100%) mode change 100644 => 100755 create mode 100644 xml/alerts-2.5.rng diff --git a/configure.ac b/configure.ac index b867da44da2..015ccd518f1 100644 --- a/configure.ac +++ b/configure.ac @@ -1717,6 +1717,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 @@ -1726,9 +1756,7 @@ else -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal - -Wformat=2 -Wformat-security - -Wformat-nonliteral -Wmissing-prototypes -Wmissing-declarations -Wnested-externs @@ -1740,6 +1768,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/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 53d850e0ab8..ac8bb1162a2 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -1061,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/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 131203834f8..406a108c61a 100644 --- a/crmd/notify.h +++ b/crmd/notify.h @@ -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/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/include/crm/msg_xml.h b/include/crm/msg_xml.h index d8c72c3ad53..a18776e73d8 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -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" @@ -344,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/xml/Makefile.am b/xml/Makefile.am index d10e0d2a591..0487cc67298 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -58,7 +58,7 @@ RNG_version_pairs_last = $(wordlist \ 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)) 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c52267dfbe67a89136d962a137e0973852b08a77 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" Date: Wed, 13 Apr 2016 12:57:44 +0200 Subject: [PATCH 213/214] Fix: fencing: Record the last known names of nodes to make sure fencing requested with nodeid works dlm_controld invokes dlm_stonith which calls stonith_api_kick_helper() to request fencing by nodeid. We need to translate the nodeid into the nodename when handling the fencing. Previously if the node had been lost, fencing would fail since the peer cache entry had been autoreaped. This commit fixes it by recording the last known names of the nodes in a dedicated hash table. This commit also switches the invocations of crm_get_peer() to crm_find_peer() to avoid recreating a node entry in the peer cache. --- fencing/commands.c | 9 ++++++--- fencing/internal.h | 4 ++++ fencing/main.c | 15 ++++++++++++++- fencing/remote.c | 41 ++++++++++++++++++++++++++++++++++------- 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/fencing/commands.c b/fencing/commands.c index 2ea223dc0a5..bc6f9c00ed7 100644 --- a/fencing/commands.c +++ b/fencing/commands.c @@ -2151,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 5538a3acc17..c6d006062fc 100644 --- a/fencing/internal.h +++ b/fencing/internal.h @@ -235,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 76107233121..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; @@ -1171,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); @@ -1250,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); @@ -1434,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 diff --git a/fencing/remote.c b/fencing/remote.c index ec16160e8f8..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); } } @@ -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; } From 0c84e679faa7722ed030165482c856a99951da41 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 22 Apr 2016 14:37:45 -0500 Subject: [PATCH 214/214] Fix: CTS: update for new alerts syntax At this point, CTS still uses its own --notification-agent and --notification-recipient options, and thus only supports one alert script, but it will create the CIB using the new alerts XML syntax. --- cts/CIB.py | 13 ++++++++----- cts/cib_xml.py | 19 +++++++++++++++++++ cts/environment.py | 4 ++-- 3 files changed, 29 insertions(+), 7 deletions(-) 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/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")