Skip to content

Commit

Permalink
Fix: PE: Correctly observe requires=nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Jun 27, 2014
1 parent a364a39 commit 2a5bbf9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions pengine/native.c
Expand Up @@ -2845,10 +2845,12 @@ native_start_constraints(resource_t * rsc, action_t * stonith_op, gboolean is_st
for (gIter = rsc->actions; gIter != NULL; gIter = gIter->next) {
action_t *action = (action_t *) gIter->data;

if (action->needs == rsc_req_stonith) {
if(action->needs == rsc_req_nothing) {
} else if (action->needs == rsc_req_stonith) {
order_actions(stonith_done, action, pe_order_optional);

} else if (target != NULL && safe_str_eq(action->task, RSC_START)
} else if (target != NULL
&& safe_str_eq(action->task, RSC_START)
&& NULL == pe_hash_table_lookup(rsc->known_on, target->details->id)) {
/* if known == NULL, then we dont know if
* the resource is active on the node
Expand Down
3 changes: 0 additions & 3 deletions pengine/test10/rec-node-12.dot
Expand Up @@ -14,9 +14,6 @@ digraph "g" {
"DoFencing_start_0" -> "child_DoFencing:1_start_0 c001n01" [ style = bold]
"DoFencing_start_0" -> "child_DoFencing:2_start_0 c001n08" [ style = bold]
"DoFencing_start_0" [ style=bold color="green" fontcolor="orange" ]
"all_stopped" -> "child_DoFencing:0_start_0 c001n03" [ style = bold]
"all_stopped" -> "child_DoFencing:1_start_0 c001n01" [ style = bold]
"all_stopped" -> "child_DoFencing:2_start_0 c001n08" [ style = bold]
"all_stopped" [ style=bold color="green" fontcolor="orange" ]
"child_DoFencing:0_monitor_0 c001n01" -> "probe_complete c001n01" [ style = bold]
"child_DoFencing:0_monitor_0 c001n01" [ style=bold color="green" fontcolor="black" ]
Expand Down
9 changes: 0 additions & 9 deletions pengine/test10/rec-node-12.exp
Expand Up @@ -300,9 +300,6 @@
</rsc_op>
</action_set>
<inputs>
<trigger>
<pseudo_event id="1" operation="all_stopped" operation_key="all_stopped"/>
</trigger>
<trigger>
<pseudo_event id="2" operation="probe_complete" operation_key="probe_complete"/>
</trigger>
Expand Down Expand Up @@ -359,9 +356,6 @@
</rsc_op>
</action_set>
<inputs>
<trigger>
<pseudo_event id="1" operation="all_stopped" operation_key="all_stopped"/>
</trigger>
<trigger>
<pseudo_event id="2" operation="probe_complete" operation_key="probe_complete"/>
</trigger>
Expand Down Expand Up @@ -418,9 +412,6 @@
</rsc_op>
</action_set>
<inputs>
<trigger>
<pseudo_event id="1" operation="all_stopped" operation_key="all_stopped"/>
</trigger>
<trigger>
<pseudo_event id="2" operation="probe_complete" operation_key="probe_complete"/>
</trigger>
Expand Down

0 comments on commit 2a5bbf9

Please sign in to comment.