Skip to content

Commit

Permalink
Merge branch 'rikkotec-debian-ha/patches'
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed May 11, 2015
2 parents 56a10c1 + 6b2e5fd commit d900bb8
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion crmd/messages.c
Expand Up @@ -252,7 +252,7 @@ delete_fsa_input(fsa_data_t * fsa_data)

case fsa_dt_none:
if (fsa_data->data != NULL) {
crm_err("Dont know how to free %s data from %s",
crm_err("Don't know how to free %s data from %s",
fsa_cause2string(fsa_data->fsa_cause), fsa_data->origin);
crmd_exit(pcmk_err_generic);
}
Expand Down
2 changes: 1 addition & 1 deletion crmd/te_events.c
Expand Up @@ -342,7 +342,7 @@ match_graph_event(crm_action_t *action, xmlNode *event, int op_status,
break;
case PCMK_LRM_OP_CANCELLED:
/* do nothing?? */
crm_err("Dont know what to do for cancelled ops yet");
crm_err("Don't know what to do for cancelled ops yet");
break;
default:
/*
Expand Down
4 changes: 2 additions & 2 deletions crmd/throttle.c
Expand Up @@ -414,7 +414,7 @@ throttle_handle_load(float load, const char *desc, int cores)
return throttle_med;

} else if(adjusted_load > THROTTLE_FACTOR_LOW * throttle_load_target) {
crm_debug("Noticable %s detected: %f", desc, load);
crm_debug("Noticeable %s detected: %f", desc, load);
return throttle_low;
}

Expand Down Expand Up @@ -470,7 +470,7 @@ throttle_mode(void)
mode |= throttle_med;

} else if(load > cib_max_cpu * 0.8) {
crm_debug("Noticable %s detected: %f", desc, load);
crm_debug("Noticeable %s detected: %f", desc, load);
mode |= throttle_low;

} else {
Expand Down
3 changes: 2 additions & 1 deletion extra/resources/remote
Expand Up @@ -44,7 +44,8 @@ meta_data() {
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="remote" version="0.1">
<version>0.1</version>
<version>0.1</version>
<shortdesc lang="en">remote resource agent</shortdesc>
<parameters>
<parameter name="server" unique="1">
<longdesc lang="en">
Expand Down
4 changes: 2 additions & 2 deletions fencing/commands.c
Expand Up @@ -856,15 +856,15 @@ status_search_cb(GPid pid, int rc, const char *output, gpointer user_data)
dev->active_pid = 0;
mainloop_set_trigger(dev->work);

if (rc == 1 /* unkown */ ) {
if (rc == 1 /* unknown */ ) {
crm_trace("Host %s is not known by %s", search->host, dev->id);

} else if (rc == 0 /* active */ || rc == 2 /* inactive */ ) {
crm_trace("Host %s is known by %s", search->host, dev->id);
can = TRUE;

} else {
crm_notice("Unkown result when testing if %s can fence %s: rc=%d", dev->id, search->host,
crm_notice("Unknown result when testing if %s can fence %s: rc=%d", dev->id, search->host,
rc);
}
search_devices_record_result(search, dev->id, can);
Expand Down
2 changes: 1 addition & 1 deletion lib/pengine/unpack.c
Expand Up @@ -3057,7 +3057,7 @@ unpack_rsc_op(resource_t * rsc, node_t * node, xmlNode * xml_op,
switch (status) {
case PCMK_LRM_OP_CANCELLED:
/* do nothing?? */
pe_err("Dont know what to do for cancelled ops yet");
pe_err("Don't know what to do for cancelled ops yet");
break;

case PCMK_LRM_OP_PENDING:
Expand Down
10 changes: 5 additions & 5 deletions lib/pengine/utils.c
Expand Up @@ -1772,7 +1772,7 @@ order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order

crm_trace("Ordering Action %s before %s", lh_action->uuid, rh_action->uuid);

/* Ensure we never create a dependancy on ourselves... its happened */
/* Ensure we never create a dependency on ourselves... its happened */
CRM_ASSERT(lh_action != rh_action);

/* Filter dups, otherwise update_action_states() has too much work to do */
Expand Down Expand Up @@ -2098,7 +2098,7 @@ pe_fence_op(node_t * node, const char *op, bool optional, pe_working_set_t * dat

void
trigger_unfencing(
resource_t * rsc, node_t *node, const char *reason, action_t *dependancy, pe_working_set_t * data_set)
resource_t * rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t * data_set)
{
if(is_not_set(data_set->flags, pe_flag_enable_unfencing)) {
/* No resources require it */
Expand All @@ -2115,8 +2115,8 @@ trigger_unfencing(
action_t *unfence = pe_fence_op(node, "on", FALSE, data_set);

crm_notice("Unfencing %s: %s", node->details->uname, reason);
if(dependancy) {
order_actions(unfence, dependancy, pe_order_optional);
if(dependency) {
order_actions(unfence, dependency, pe_order_optional);
}

} else if(rsc) {
Expand All @@ -2125,7 +2125,7 @@ trigger_unfencing(
g_hash_table_iter_init(&iter, rsc->allowed_nodes);
while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) {
if(node->details->online && node->details->unclean == FALSE && node->details->shutdown == FALSE) {
trigger_unfencing(rsc, node, reason, dependancy, data_set);
trigger_unfencing(rsc, node, reason, dependency, data_set);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/services/services_linux.c
Expand Up @@ -220,7 +220,7 @@ recurring_action_timer(gpointer data)
{
svc_action_t *op = data;

crm_debug("Scheduling another invokation of %s", op->id);
crm_debug("Scheduling another invocation of %s", op->id);

/* Clean out the old result */
free(op->stdout_data);
Expand Down
4 changes: 2 additions & 2 deletions lib/transition/utils.c
Expand Up @@ -200,10 +200,10 @@ print_synapse(unsigned int log_level, crm_graph_t * graph, synapse_t * synapse)

if (find_action(graph, input->id) == NULL) {
if (host == NULL) {
do_crm_log(log_level, " * [Input %2d]: Unresolved dependancy %s op %s",
do_crm_log(log_level, " * [Input %2d]: Unresolved dependency %s op %s",
input->id, actiontype2text(input->type), key);
} else {
do_crm_log(log_level, " * [Input %2d]: Unresolved dependancy %s op %s on %s",
do_crm_log(log_level, " * [Input %2d]: Unresolved dependency %s op %s on %s",
input->id, actiontype2text(input->type), key, host);
}
}
Expand Down
2 changes: 1 addition & 1 deletion mcp/pacemaker.c
Expand Up @@ -324,7 +324,7 @@ start_child(pcmk_child_t * child)

/* Keep the root group (so we can access corosync), but add the haclient group (so we can access ipc) */
} else if (initgroups(child->uid, gid) < 0) {
crm_err("Cannot initalize groups for %s: %s (%d)", child->uid, pcmk_strerror(errno), errno);
crm_err("Cannot initialize groups for %s: %s (%d)", child->uid, pcmk_strerror(errno), errno);
}
}

Expand Down
8 changes: 4 additions & 4 deletions pengine/graph.c
Expand Up @@ -548,7 +548,7 @@ update_action(action_t * then)
changed |= graph_update_action(first, then, node, first_flags, otype);

/* 'first' was for a complex resource (clone, group, etc),
* create a new dependancy if necessary
* create a new dependency if necessary
*/
} else if (order_actions(first, then, other->type)) {
/* This was the first time 'first' and 'then' were associated,
Expand Down Expand Up @@ -629,7 +629,7 @@ shutdown_constraints(node_t * node, action_t * shutdown_op, pe_working_set_t * d
} else if (action->node->details != node->details) {
continue;
} else if (is_set(action->rsc->flags, pe_rsc_maintenance)) {
pe_rsc_trace(action->rsc, "Skipping %s: maintainence mode", action->uuid);
pe_rsc_trace(action->rsc, "Skipping %s: maintenance mode", action->uuid);
continue;
} else if (node->details->maintenance) {
pe_rsc_trace(action->rsc, "Skipping %s: node %s is in maintenance mode",
Expand Down Expand Up @@ -976,12 +976,12 @@ should_dump_action(action_t * action)
} else if (safe_str_neq(wrapper->action->task, RSC_START)) {
/* Only interested in start operations */
} else if (is_set(wrapper->action->flags, pe_action_dumped)) {
crm_trace("action %d (%s) dependancy of %s",
crm_trace("action %d (%s) dependency of %s",
action->id, action->uuid, wrapper->action->uuid);
return TRUE;

} else if (should_dump_action(wrapper->action)) {
crm_trace("action %d (%s) dependancy of %s",
crm_trace("action %d (%s) dependency of %s",
action->id, action->uuid, wrapper->action->uuid);
return TRUE;
}
Expand Down
22 changes: 11 additions & 11 deletions tools/crm_resource.c
Expand Up @@ -632,7 +632,7 @@ set_resource_attr(const char *rsc_id, const char *attr_set, const char *attr_id,
}
}

crm_debug("Looking for dependancies %p", rsc->rsc_cons_lhs);
crm_debug("Looking for dependencies %p", rsc->rsc_cons_lhs);
set_bit(rsc->flags, pe_rsc_allocating);
for (lpc = rsc->rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data;
Expand All @@ -641,7 +641,7 @@ set_resource_attr(const char *rsc_id, const char *attr_set, const char *attr_id,
crm_debug("Checking %s %d", cons->id, cons->score);
if (cons->score > 0 && is_not_set(peer->flags, pe_rsc_allocating)) {
/* Don't get into colocation loops */
crm_debug("Setting %s=%s for dependant resource %s", attr_name, attr_value, peer->id);
crm_debug("Setting %s=%s for dependent resource %s", attr_name, attr_value, peer->id);
set_resource_attr(peer->id, NULL, NULL, attr_name, attr_value, recursive, cib, data_set);
}
}
Expand Down Expand Up @@ -1218,7 +1218,7 @@ show_location(resource_t * rsc, const char *prefix)
}

static void
show_colocation(resource_t * rsc, gboolean dependants, gboolean recursive, int offset)
show_colocation(resource_t * rsc, gboolean dependents, gboolean recursive, int offset)
{
char *prefix = NULL;
GListPtr lpc = NULL;
Expand All @@ -1227,7 +1227,7 @@ show_colocation(resource_t * rsc, gboolean dependants, gboolean recursive, int o
prefix = calloc(1, (offset * 4) + 1);
memset(prefix, ' ', offset * 4);

if (dependants) {
if (dependents) {
list = rsc->rsc_cons_lhs;
}

Expand All @@ -1245,26 +1245,26 @@ show_colocation(resource_t * rsc, gboolean dependants, gboolean recursive, int o
char *score = NULL;
resource_t *peer = cons->rsc_rh;

if (dependants) {
if (dependents) {
peer = cons->rsc_lh;
}

if (is_set(peer->flags, pe_rsc_allocating)) {
if (dependants == FALSE) {
if (dependents == FALSE) {
fprintf(stdout, "%s%-*s (id=%s - loop)\n", prefix, 80 - (4 * offset), peer->id,
cons->id);
}
continue;
}

if (dependants && recursive) {
show_colocation(peer, dependants, recursive, offset + 1);
if (dependents && recursive) {
show_colocation(peer, dependents, recursive, offset + 1);
}

score = score2char(cons->score);
if (cons->role_rh > RSC_ROLE_STARTED) {
fprintf(stdout, "%s%-*s (score=%s, %s role=%s, id=%s)\n", prefix, 80 - (4 * offset),
peer->id, score, dependants ? "needs" : "with", role2text(cons->role_rh),
peer->id, score, dependents ? "needs" : "with", role2text(cons->role_rh),
cons->id);
} else {
fprintf(stdout, "%s%-*s (score=%s, id=%s)\n", prefix, 80 - (4 * offset),
Expand All @@ -1273,8 +1273,8 @@ show_colocation(resource_t * rsc, gboolean dependants, gboolean recursive, int o
show_location(peer, prefix);
free(score);

if (!dependants && recursive) {
show_colocation(peer, dependants, recursive, offset + 1);
if (!dependents && recursive) {
show_colocation(peer, dependents, recursive, offset + 1);
}
}
free(prefix);
Expand Down

0 comments on commit d900bb8

Please sign in to comment.