Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F4639252
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
35 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/crm/pengine/master.c b/crm/pengine/master.c
index 2866c26f59..92389efda3 100644
--- a/crm/pengine/master.c
+++ b/crm/pengine/master.c
@@ -1,632 +1,641 @@
/*
* Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2.1 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 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
*/
#include <lha_internal.h>
#include <crm/msg_xml.h>
#include <allocate.h>
#include <lib/crm/pengine/utils.h>
#include <utils.h>
#define VARIANT_CLONE 1
#include <lib/crm/pengine/variant.h>
#define NO_MASTER_PREFS 0
extern gint sort_clone_instance(gconstpointer a, gconstpointer b);
extern void clone_create_notifications(
resource_t *rsc, action_t *action, action_t *action_complete,
pe_working_set_t *data_set);
extern int master_score(resource_t *rsc, node_t *node, int not_set_value);
static void
child_promoting_constraints(
clone_variant_data_t *clone_data, enum pe_ordering type,
resource_t *rsc, resource_t *child, resource_t *last, pe_working_set_t *data_set)
{
/* if(clone_data->ordered */
/* || clone_data->self->restart_type == pe_restart_restart) { */
/* type = pe_order_implies_left; */
/* } */
if(child == NULL) {
if(clone_data->ordered && last != NULL) {
crm_debug_4("Ordered version (last node)");
/* last child promote before promoted started */
custom_action_order(
last, promote_key(last), NULL,
rsc, promoted_key(rsc), NULL,
type, data_set);
}
} else if(clone_data->ordered) {
crm_debug_4("Ordered version");
if(last == NULL) {
/* global promote before first child promote */
last = rsc;
} /* else: child/child relative promote */
order_start_start(last, child, type);
custom_action_order(
last, promote_key(last), NULL,
child, promote_key(child), NULL,
type, data_set);
} else {
crm_debug_4("Un-ordered version");
/* child promote before global promoted */
custom_action_order(
child, promote_key(child), NULL,
rsc, promoted_key(rsc), NULL,
type, data_set);
/* global promote before child promote */
custom_action_order(
rsc, promote_key(rsc), NULL,
child, promote_key(child), NULL,
type, data_set);
}
}
static void
child_demoting_constraints(
clone_variant_data_t *clone_data, enum pe_ordering type,
resource_t *rsc, resource_t *child, resource_t *last, pe_working_set_t *data_set)
{
/* if(clone_data->ordered */
/* || clone_data->self->restart_type == pe_restart_restart) { */
/* type = pe_order_implies_left; */
/* } */
if(child == NULL) {
if(clone_data->ordered && last != NULL) {
crm_debug_4("Ordered version (last node)");
/* global demote before first child demote */
custom_action_order(
rsc, demote_key(rsc), NULL,
last, demote_key(last), NULL,
pe_order_implies_left, data_set);
}
} else if(clone_data->ordered && last != NULL) {
crm_debug_4("Ordered version");
/* child/child relative demote */
custom_action_order(child, demote_key(child), NULL,
last, demote_key(last), NULL,
type, data_set);
} else if(clone_data->ordered) {
crm_debug_4("Ordered version (1st node)");
/* first child stop before global stopped */
custom_action_order(
child, demote_key(child), NULL,
rsc, demoted_key(rsc), NULL,
type, data_set);
} else {
crm_debug_4("Un-ordered version");
/* child demote before global demoted */
custom_action_order(
child, demote_key(child), NULL,
rsc, demoted_key(rsc), NULL,
type, data_set);
/* global demote before child demote */
custom_action_order(
rsc, demote_key(rsc), NULL,
child, demote_key(child), NULL,
type, data_set);
}
}
static void
master_update_pseudo_status(
resource_t *child, gboolean *demoting, gboolean *promoting)
{
CRM_ASSERT(demoting != NULL);
CRM_ASSERT(promoting != NULL);
slist_iter(
action, action_t, child->actions, lpc,
if(*promoting && *demoting) {
return;
} else if(action->optional) {
continue;
} else if(safe_str_eq(CRMD_ACTION_DEMOTE, action->task)) {
*demoting = TRUE;
} else if(safe_str_eq(CRMD_ACTION_PROMOTE, action->task)) {
*promoting = TRUE;
}
);
}
#define apply_master_location(list) \
slist_iter( \
cons, rsc_to_node_t, list, lpc2, \
cons_node = NULL; \
if(cons->role_filter == RSC_ROLE_MASTER) { \
crm_debug("Applying %s to %s", \
cons->id, child_rsc->id); \
cons_node = pe_find_node_id( \
cons->node_list_rh, chosen->details->id); \
} \
if(cons_node != NULL) { \
int new_priority = merge_weights( \
child_rsc->priority, cons_node->weight); \
crm_debug("\t%s: %d->%d", child_rsc->id, \
child_rsc->priority, new_priority); \
child_rsc->priority = new_priority; \
} \
);
#define apply_master_colocation(list) \
slist_iter( \
cons, rsc_colocation_t, list, lpc2, \
cons_node = cons->rsc_lh->allocated_to; \
if(cons->role_lh == RSC_ROLE_MASTER \
&& cons_node != NULL \
&& chosen->details == cons_node->details) { \
int new_priority = merge_weights( \
child_rsc->priority, cons->score); \
crm_debug("Applying %s to %s", \
cons->id, child_rsc->id); \
crm_debug("\t%s: %d->%d", child_rsc->id, \
child_rsc->priority, new_priority); \
child_rsc->priority = new_priority; \
} \
);
static node_t *
can_be_master(resource_t *rsc)
{
node_t *node = NULL;
node_t *local_node = NULL;
clone_variant_data_t *clone_data = NULL;
node = rsc->allocated_to;
if(rsc->priority < 0) {
crm_debug_2("%s cannot be master: preference",
rsc->id);
return NULL;
} else if(node == NULL) {
crm_debug_2("%s cannot be master: not allocated",
rsc->id);
return NULL;
} else if(can_run_resources(node) == FALSE) {
crm_debug_2("Node cant run any resources: %s",
node->details->uname);
return NULL;
}
get_clone_variant_data(clone_data, rsc->parent);
local_node = pe_find_node_id(
rsc->parent->allowed_nodes, node->details->id);
if(local_node == NULL) {
crm_err("%s cannot run on %s: node not allowed",
rsc->id, node->details->uname);
return NULL;
} else if(local_node->count < clone_data->master_node_max) {
return local_node;
} else {
crm_debug_2("%s cannot be master on %s: node full",
rsc->id, node->details->uname);
}
return NULL;
}
static gint sort_master_instance(gconstpointer a, gconstpointer b)
{
int rc;
const resource_t *resource1 = (const resource_t*)a;
const resource_t *resource2 = (const resource_t*)b;
CRM_ASSERT(resource1 != NULL);
CRM_ASSERT(resource2 != NULL);
rc = sort_rsc_priority(a, b);
if( rc != 0 ) {
return rc;
}
if(resource1->role > resource2->role) {
return -1;
} else if(resource1->role < resource2->role) {
return 1;
}
return sort_clone_instance(a, b);
}
int
master_score(resource_t *rsc, node_t *node, int not_set_value)
{
char *attr_name;
const char *attr_value;
int score = not_set_value, len = 0;
len = 8 + strlen(rsc->id);
crm_malloc0(attr_name, len);
sprintf(attr_name, "master-%s", rsc->id);
crm_debug_3("looking for %s on %s", attr_name,
node->details->uname);
attr_value = g_hash_table_lookup(
node->details->attrs, attr_name);
if(attr_value == NULL) {
crm_free(attr_name);
len = 8 + strlen(rsc->long_name);
crm_malloc0(attr_name, len);
sprintf(attr_name, "master-%s", rsc->long_name);
crm_debug_3("looking for %s on %s", attr_name,
node->details->uname);
attr_value = g_hash_table_lookup(
node->details->attrs, attr_name);
}
if(attr_value != NULL) {
crm_debug_2("%s[%s] = %s", attr_name,
- node->details->uname, crm_str(attr_value));
+ node->details->uname, crm_str(attr_value));
score = char2score(attr_value);
}
crm_free(attr_name);
return score;
}
#define max(a, b) a<b?b:a
static void
apply_master_prefs(resource_t *rsc)
{
int score, new_score;
clone_variant_data_t *clone_data = NULL;
get_clone_variant_data(clone_data, rsc);
if(clone_data->applied_master_prefs) {
/* Make sure we only do this once */
return;
}
clone_data->applied_master_prefs = TRUE;
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
slist_iter(
node, node_t, child_rsc->allowed_nodes, lpc,
if(can_run_resources(node) == FALSE) {
/* This node will never be promoted to master,
* so don't apply the master score as that may
* lead to clone shuffling
*/
continue;
}
score = master_score(child_rsc, node, 0);
new_score = merge_weights(node->weight, score);
if(new_score != node->weight) {
crm_debug("\t%s: Updating preference for %s (%d->%d)",
child_rsc->id, node->details->uname, node->weight, new_score);
node->weight = new_score;
}
new_score = max(child_rsc->priority, score);
if(new_score != child_rsc->priority) {
crm_debug("\t%s: Updating priority (%d->%d)",
child_rsc->id, child_rsc->priority, new_score);
child_rsc->priority = new_score;
}
);
);
}
node_t *
master_color(resource_t *rsc, pe_working_set_t *data_set)
{
int promoted = 0;
node_t *chosen = NULL;
node_t *cons_node = NULL;
clone_variant_data_t *clone_data = NULL;
get_clone_variant_data(clone_data, rsc);
apply_master_prefs(rsc);
clone_color(rsc, data_set);
/* count now tracks the number of masters allocated */
slist_iter(node, node_t, rsc->allowed_nodes, lpc,
node->count = 0;
);
/*
* assign priority
*/
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
crm_debug_2("Assigning priority for %s", child_rsc->id);
chosen = child_rsc->allocated_to;
if(chosen == NULL) {
continue;
} else if(child_rsc->role == RSC_ROLE_STARTED) {
child_rsc->role = RSC_ROLE_SLAVE;
}
switch(child_rsc->next_role) {
case RSC_ROLE_STARTED:
if(NO_MASTER_PREFS) {
child_rsc->priority =
clone_data->clone_max - lpc;
break;
}
CRM_CHECK(chosen != NULL, break);
- child_rsc->priority = master_score(child_rsc, chosen, -INFINITY);
+ /*
+ * Default to -1 if no value is set
+ *
+ * This allows master locations to be specified
+ * based solely on rsc_location constraints,
+ * but prevents anyone from being promoted if
+ * neither a constraint nor a master-score is present
+ */
+ child_rsc->priority = master_score(child_rsc, chosen, -1);
break;
case RSC_ROLE_SLAVE:
case RSC_ROLE_STOPPED:
child_rsc->priority = -INFINITY;
break;
case RSC_ROLE_MASTER:
/* the only reason we should be here is if
* we're re-creating actions after a stonith
*/
promoted++;
break;
default:
CRM_CHECK(FALSE/* unhandled */,
crm_err("Unknown resource role: %d for %s",
child_rsc->next_role, child_rsc->id));
}
apply_master_location(child_rsc->rsc_location);
apply_master_location(rsc->rsc_location);
apply_master_colocation(rsc->rsc_cons);
apply_master_colocation(child_rsc->rsc_cons);
);
/* sort based on the new "promote" priority */
clone_data->child_list = g_list_sort(
clone_data->child_list, sort_master_instance);
/* mark the first N as masters */
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
chosen = NULL;
crm_debug_2("Processing %s", child_rsc->id);
if(promoted < clone_data->master_max) {
chosen = can_be_master(child_rsc);
}
if(chosen == NULL) {
if(child_rsc->next_role == RSC_ROLE_STARTED) {
child_rsc->next_role = RSC_ROLE_SLAVE;
}
continue;
}
chosen->count++;
crm_info("Promoting %s", child_rsc->id);
child_rsc->next_role = RSC_ROLE_MASTER;
promoted++;
add_hash_param(child_rsc->parameters, crm_meta_name("role"),
role2text(child_rsc->next_role));
);
- crm_info("Promoted %d instances of a possible %d to master", promoted, clone_data->master_max);
+ crm_info("%s: Promoted %d instances of a possible %d to master",
+ rsc->id, promoted, clone_data->master_max);
return NULL;
}
void master_create_actions(resource_t *rsc, pe_working_set_t *data_set)
{
action_t *action = NULL;
action_t *action_complete = NULL;
gboolean any_promoting = FALSE;
gboolean any_demoting = FALSE;
resource_t *last_promote_rsc = NULL;
resource_t *last_demote_rsc = NULL;
clone_variant_data_t *clone_data = NULL;
get_clone_variant_data(clone_data, rsc);
crm_debug("Creating actions for %s", rsc->id);
/* create actions as normal */
clone_create_actions(rsc, data_set);
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
gboolean child_promoting = FALSE;
gboolean child_demoting = FALSE;
crm_debug_2("Creating actions for %s", child_rsc->id);
child_rsc->cmds->create_actions(child_rsc, data_set);
master_update_pseudo_status(
child_rsc, &child_demoting, &child_promoting);
any_demoting = any_demoting || child_demoting;
any_promoting = any_promoting || child_promoting;
);
/* promote */
action = promote_action(rsc, NULL, !any_promoting);
action_complete = custom_action(
rsc, promoted_key(rsc),
CRMD_ACTION_PROMOTED, NULL, !any_promoting, TRUE, data_set);
action->pseudo = TRUE;
action->runnable = TRUE;
action_complete->pseudo = TRUE;
action_complete->runnable = TRUE;
action_complete->priority = INFINITY;
child_promoting_constraints(clone_data, pe_order_optional,
rsc, NULL, last_promote_rsc, data_set);
clone_create_notifications(rsc, action, action_complete, data_set);
/* demote */
action = demote_action(rsc, NULL, !any_demoting);
action_complete = custom_action(
rsc, demoted_key(rsc),
CRMD_ACTION_DEMOTED, NULL, !any_demoting, TRUE, data_set);
action_complete->priority = INFINITY;
action->pseudo = TRUE;
action->runnable = TRUE;
action_complete->pseudo = TRUE;
action_complete->runnable = TRUE;
child_demoting_constraints(clone_data, pe_order_optional,
rsc, NULL, last_demote_rsc, data_set);
clone_create_notifications(rsc, action, action_complete, data_set);
}
void
master_internal_constraints(resource_t *rsc, pe_working_set_t *data_set)
{
resource_t *last_rsc = NULL;
clone_variant_data_t *clone_data = NULL;
get_clone_variant_data(clone_data, rsc);
clone_internal_constraints(rsc, data_set);
/* global demoted before start */
custom_action_order(
rsc, demoted_key(rsc), NULL,
rsc, start_key(rsc), NULL,
pe_order_optional, data_set);
/* global started before promote */
custom_action_order(
rsc, started_key(rsc), NULL,
rsc, promote_key(rsc), NULL,
pe_order_optional, data_set);
/* global demoted before stop */
custom_action_order(
rsc, demoted_key(rsc), NULL,
rsc, stop_key(rsc), NULL,
pe_order_optional, data_set);
/* global demote before demoted */
custom_action_order(
rsc, demote_key(rsc), NULL,
rsc, demoted_key(rsc), NULL,
pe_order_optional, data_set);
/* global demoted before promote */
custom_action_order(
rsc, demoted_key(rsc), NULL,
rsc, promote_key(rsc), NULL,
pe_order_optional, data_set);
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
/* child demote before promote */
custom_action_order(
child_rsc, demote_key(child_rsc), NULL,
child_rsc, promote_key(child_rsc), NULL,
pe_order_optional, data_set);
child_promoting_constraints(clone_data, pe_order_optional,
rsc, child_rsc, last_rsc, data_set);
child_demoting_constraints(clone_data, pe_order_optional,
rsc, child_rsc, last_rsc, data_set);
last_rsc = child_rsc;
);
}
void master_rsc_colocation_rh(
resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint)
{
clone_variant_data_t *clone_data = NULL;
get_clone_variant_data(clone_data, rsc_rh);
CRM_CHECK(rsc_rh != NULL, return);
if(rsc_rh->provisional) {
return;
} else if(constraint->role_rh == RSC_ROLE_UNKNOWN) {
crm_debug_3("Handling %s as a clone colocation", constraint->id);
clone_rsc_colocation_rh(rsc_lh, rsc_rh, constraint);
return;
}
CRM_CHECK(rsc_lh != NULL, return);
CRM_CHECK(rsc_lh->variant == pe_native, return);
crm_debug_2("Processing constraint %s: %d", constraint->id, constraint->score);
if(constraint->score < INFINITY) {
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
child_rsc->cmds->rsc_colocation_rh(rsc_lh, child_rsc, constraint);
);
} else {
GListPtr lhs = NULL, rhs = NULL;
lhs = rsc_lh->allowed_nodes;
slist_iter(
child_rsc, resource_t, clone_data->child_list, lpc,
crm_debug_3("Processing: %s", child_rsc->id);
if(child_rsc->allocated_to != NULL
&& child_rsc->next_role == constraint->role_rh) {
crm_debug_3("Applying: %s %s", child_rsc->id, role2text(child_rsc->next_role));
rhs = g_list_append(rhs, child_rsc->allocated_to);
}
);
rsc_lh->allowed_nodes = node_list_and(lhs, rhs, FALSE);
pe_free_shallow_adv(rhs, FALSE);
pe_free_shallow(lhs);
}
return;
}
diff --git a/crm/pengine/testcases/master-12.dot b/crm/pengine/testcases/master-12.dot
new file mode 100644
index 0000000000..c8bf18e747
--- /dev/null
+++ b/crm/pengine/testcases/master-12.dot
@@ -0,0 +1,7 @@
+digraph "g" {
+"ms-sf_promote_0" -> "sf:0_promote_0 sel3" [ style = bold]
+"ms-sf_promote_0" [ style=bold color="green" fontcolor="orange" ]
+"ms-sf_promoted_0" [ style=bold color="green" fontcolor="orange" ]
+"sf:0_promote_0 sel3" -> "ms-sf_promoted_0" [ style = bold]
+"sf:0_promote_0 sel3" [ style=bold color="green" fontcolor="black" ]
+}
diff --git a/crm/pengine/testcases/master-12.exp b/crm/pengine/testcases/master-12.exp
new file mode 100644
index 0000000000..2b9d68e7e4
--- /dev/null
+++ b/crm/pengine/testcases/master-12.exp
@@ -0,0 +1,36 @@
+ <transition_graph cluster-delay="60s" transition_id="0">
+ <synapse id="0" priority="99">
+ <action_set>
+ <rsc_op id="44" operation="promote" operation_key="sf:0_promote_0" on_node="sel3" on_node_uuid="1ee1b756-2292-49bf-aed2-8ff15e8cc503">
+ <primitive id="sf:0" long-id="ms-sf:sf:0" class="ocf" provider="heartbeat" type="Stateful"/>
+ <attributes crm_feature_set="1.0.9" CRM_meta_role="Master" CRM_meta_stateful="true" CRM_meta_timeout="20000" CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_master_max="1" CRM_meta_master_node_max="1"/>
+ </rsc_op>
+ </action_set>
+ <inputs>
+ <trigger>
+ <pseudo_event id="51" operation="promote" operation_key="ms-sf_promote_0"/>
+ </trigger>
+ </inputs>
+ </synapse>
+ <synapse id="1">
+ <action_set>
+ <pseudo_event id="51" operation="promote" operation_key="ms-sf_promote_0">
+ <attributes crm_feature_set="1.0.9" CRM_meta_stateful="true" CRM_meta_timeout="20000" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_master_max="1" CRM_meta_master_node_max="1"/>
+ </pseudo_event>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="2" priority="1000000">
+ <action_set>
+ <pseudo_event id="52" operation="promoted" operation_key="ms-sf_promoted_0">
+ <attributes crm_feature_set="1.0.9" CRM_meta_stateful="true" CRM_meta_timeout="20000" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_master_max="1" CRM_meta_master_node_max="1"/>
+ </pseudo_event>
+ </action_set>
+ <inputs>
+ <trigger>
+ <rsc_op id="44" operation="promote" operation_key="sf:0_promote_0" on_node="sel3" on_node_uuid="1ee1b756-2292-49bf-aed2-8ff15e8cc503"/>
+ </trigger>
+ </inputs>
+ </synapse>
+ </transition_graph>
+
diff --git a/crm/pengine/testcases/master-12.xml b/crm/pengine/testcases/master-12.xml
new file mode 100755
index 0000000000..7c4b695ed4
--- /dev/null
+++ b/crm/pengine/testcases/master-12.xml
@@ -0,0 +1,159 @@
+ <cib admin_epoch="0" have_quorum="true" ignore_dtd="false" num_peers="2" cib_feature_revision="1.3" epoch="13" ccm_transition="2" generated="true" dc_uuid="5d98a2ff-f9bf-45be-964b-27e4246c0085" num_updates="99">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <attributes/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes>
+ <node id="1ee1b756-2292-49bf-aed2-8ff15e8cc503" uname="sel3" type="normal"/>
+ <node id="5d98a2ff-f9bf-45be-964b-27e4246c0085" uname="sel4" type="normal"/>
+ </nodes>
+ <resources>
+ <master_slave id="ms-drbd0">
+ <meta_attributes id="ma-ms-drbd0">
+ <attributes>
+ <nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>
+ <nvpair id="ma-ms-drbd0-2" name="clone_node_max" value="1"/>
+ <nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>
+ <nvpair id="ma-ms-drbd0-4" name="master_node_max" value="1"/>
+ <nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>
+ <nvpair id="ma-ms-drbd0-6" name="globally_unique" value="false"/>
+ </attributes>
+ </meta_attributes>
+ <primitive id="drbd0" class="ocf" provider="heartbeat" type="drbd">
+ <instance_attributes id="ia-drbd0">
+ <attributes>
+ <nvpair id="ia-drbd0-1" name="drbd_resource" value="drbd0"/>
+ </attributes>
+ </instance_attributes>
+ </primitive>
+ </master_slave>
+ <master_slave id="ms-sf">
+ <meta_attributes id="ma-ms-sf">
+ <attributes>
+ <nvpair id="ma-ms-sf-1" name="clone_max" value="2"/>
+ <nvpair id="ma-ms-sf-2" name="clone_node_max" value="1"/>
+ <nvpair id="ma-ms-sf-3" name="master_max" value="1"/>
+ <nvpair id="ma-ms-sf-4" name="master_node_max" value="1"/>
+ </attributes>
+ </meta_attributes>
+ <primitive id="sf" class="ocf" provider="heartbeat" type="Stateful">
+ <instance_attributes id="ia-sf">
+ <attributes/>
+ </instance_attributes>
+ </primitive>
+ </master_slave>
+ <primitive class="ocf" provider="heartbeat" type="Filesystem" id="fs0">
+ <meta_attributes id="ma-fs0">
+ <attributes/>
+ </meta_attributes>
+ <instance_attributes id="ia-fs0">
+ <attributes>
+ <nvpair id="ia-fs0-1" name="fstype" value="ext3"/>
+ <nvpair id="ia-fs0-2" name="directory" value="/drbd"/>
+ <nvpair id="ia-fs0-3" name="device" value="/dev/drbd0"/>
+ </attributes>
+ </instance_attributes>
+ </primitive>
+ </resources>
+ <constraints>
+ <rsc_location id="rsc_location_group_0" rsc="ms-sf">
+ <rule id="prefered_location_group_0" role="Master" score="100">
+ <expression id="prefered_location_group_0_expr" attribute="#uname" operation="eq" value="sel3"/>
+ </rule>
+ </rsc_location>
+ <rsc_location id="rsc_location_group_1" rsc="ms-drbd0">
+ <rule id="prefered_location_group_1" role="Master" score="100">
+ <expression id="prefered_location_group_1_expr" attribute="#uname" operation="eq" value="sel3"/>
+ </rule>
+ </rsc_location>
+ <rsc_order id="drbd0_before_fs0" from="fs0" action="start" to="ms-drbd0" to_action="promote"/>
+ <rsc_order id="sf_before_fs0" from="fs0" action="start" to="ms-sf" to_action="promote"/>
+ <rsc_colocation id="fs0_on_drbd0" to="ms-drbd0" to_role="master" from="fs0" score="infinity"/>
+ </constraints>
+ </configuration>
+ <status>
+ <node_state uname="sel4" crmd="online" shutdown="0" in_ccm="true" ha="active" join="member" expected="member" id="5d98a2ff-f9bf-45be-964b-27e4246c0085">
+ <transient_attributes id="5d98a2ff-f9bf-45be-964b-27e4246c0085">
+ <instance_attributes id="status-5d98a2ff-f9bf-45be-964b-27e4246c0085">
+ <attributes>
+ <nvpair id="status-5d98a2ff-f9bf-45be-964b-27e4246c0085-default_ping_set" name="default_ping_set" value="100"/>
+ <nvpair id="status-5d98a2ff-f9bf-45be-964b-27e4246c0085-probe_complete" name="probe_complete" value="true"/>
+ </attributes>
+ </instance_attributes>
+ <instance_attributes id="master-5d98a2ff-f9bf-45be-964b-27e4246c0085">
+ <attributes>
+ <nvpair name="master-drbd0:1" id="status-master-drbd0:1-5d98a2ff-f9bf-45be-964b-27e4246c0085" value="75"/>
+ </attributes>
+ </instance_attributes>
+ </transient_attributes>
+ <lrm id="5d98a2ff-f9bf-45be-964b-27e4246c0085">
+ <lrm_resources>
+ <lrm_resource id="sf:1" type="Stateful" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="sf:1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="10:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;10:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="4" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ <lrm_rsc_op id="sf:1_start_0" operation="start" crm-debug-origin="do_update_resource" transition_key="33:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;33:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="7" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ </lrm_resource>
+ <lrm_resource id="sf:0" type="Stateful" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="sf:0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="9:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;9:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="3" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ </lrm_resource>
+ <lrm_resource id="fs0" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="11:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;11:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="5" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="fce792c58e596a12a9b098046d505dc8"/>
+ </lrm_resource>
+ <lrm_resource id="drbd0:0" type="drbd" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="drbd0:0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="8:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;8:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="2" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ </lrm_resource>
+ <lrm_resource id="drbd0:1" type="drbd" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="drbd0:1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="5:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;5:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="6" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:1_start_0" operation="start" crm-debug-origin="do_update_resource" transition_key="5:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;5:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="8" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:1_post_notify_start_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="56:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;56:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="9" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:1_pre_notify_promote_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="66:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;66:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="10" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:1_post_notify_promote_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="67:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;67:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="11" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ </lrm_resource>
+ </lrm_resources>
+ </lrm>
+ </node_state>
+ <node_state id="1ee1b756-2292-49bf-aed2-8ff15e8cc503" uname="sel3" crmd="online" crm-debug-origin="do_cib_replaced" in_ccm="true" ha="active" join="member" expected="member" shutdown="0">
+ <transient_attributes id="1ee1b756-2292-49bf-aed2-8ff15e8cc503">
+ <instance_attributes id="status-1ee1b756-2292-49bf-aed2-8ff15e8cc503">
+ <attributes>
+ <nvpair id="status-1ee1b756-2292-49bf-aed2-8ff15e8cc503-default_ping_set" name="default_ping_set" value="100"/>
+ <nvpair id="status-1ee1b756-2292-49bf-aed2-8ff15e8cc503-probe_complete" name="probe_complete" value="true"/>
+ </attributes>
+ </instance_attributes>
+ <instance_attributes id="master-1ee1b756-2292-49bf-aed2-8ff15e8cc503">
+ <attributes>
+ <nvpair id="status-master-drbd0:0-1ee1b756-2292-49bf-aed2-8ff15e8cc503" name="master-drbd0:0" value="75"/>
+ </attributes>
+ </instance_attributes>
+ </transient_attributes>
+ <lrm id="1ee1b756-2292-49bf-aed2-8ff15e8cc503">
+ <lrm_resources>
+ <lrm_resource id="sf:1" type="Stateful" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="sf:1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="5:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;5:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="4" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ </lrm_resource>
+ <lrm_resource id="sf:0" type="Stateful" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="sf:0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="4:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;4:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="3" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ <lrm_rsc_op id="sf:0_start_0" operation="start" crm-debug-origin="do_update_resource" transition_key="32:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;32:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="7" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+ </lrm_resource>
+ <lrm_resource id="fs0" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="6:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;6:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="5" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="fce792c58e596a12a9b098046d505dc8"/>
+ <lrm_rsc_op id="fs0_start_0" operation="start" crm-debug-origin="do_update_resource" transition_key="46:4:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;46:4:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="13" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="fce792c58e596a12a9b098046d505dc8"/>
+ </lrm_resource>
+ <lrm_resource id="drbd0:0" type="drbd" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="drbd0:0_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="3:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;3:0:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="2" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:0_start_0" operation="start" crm-debug-origin="do_update_resource" transition_key="4:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;4:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="8" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:0_post_notify_start_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="53:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;53:2:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="9" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:0_pre_notify_promote_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="58:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;58:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="10" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:0_promote_0" operation="promote" crm-debug-origin="do_update_resource" transition_key="6:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;6:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="11" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ <lrm_rsc_op id="drbd0:0_post_notify_promote_0" operation="notify" crm-debug-origin="do_update_resource" transition_key="59:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:0;59:3:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="12" crm_feature_set="1.0.9" rc_code="0" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ </lrm_resource>
+ <lrm_resource id="drbd0:1" type="drbd" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="drbd0:1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" transition_key="3:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" transition_magic="0:7;3:1:ab83eef1-2912-43cf-8a88-910f72f1f57b" call_id="6" crm_feature_set="1.0.9" rc_code="7" op_status="0" interval="0" op_digest="1243523f1dae58b4aafa2650a7f3d441"/>
+ </lrm_resource>
+ </lrm_resources>
+ </lrm>
+ </node_state>
+ </status>
+ </cib>
+
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jul 10, 2:25 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2009731
Default Alt Text
(35 KB)
Attached To
Mode
rP Pacemaker
Attached
Detach File
Event Timeline
Log In to Comment