<div dir="ltr">Hi all,<div><br></div><div>We are running Pacemaker 1.1.15 under Centos 6.9, and have a simple 3-node cluster with 6 sets of &quot;main&quot; and &quot;backup&quot; resources (just Dummy ones):</div><div><br></div><div>main1</div><div>backup1<br></div><div>main2</div><div>backup2</div><div>etc.</div><div><br></div><div>We have the following co-location constraint between main1 and backup1 (-200 because we don&#39;t want them to be on the same node, but under some circumstances they can end up on the same node)</div><div><br></div><div>pcs constraint colocation add backup1 with main1 -200<br></div><div><br></div><div>We also have the following order constraint between main1 and backup1.  This caters for the scenario where they end up on the same node - we want to make sure that &quot;main&quot; gets started before &quot;backup&quot; gets stopped, and started somewhere else (because of co-location score):</div><div><br></div><div>pcs constraint order start main1 then stop backup1 kind=Serialize<br></div><div><br></div><div><br></div><div>When the cluster is started, everything works fine:</div><div><br></div><div><div>main1   (ocf::heartbeat:Dummy): Started straddie1</div><div>main2   (ocf::heartbeat:Dummy): Started straddie2</div><div>main3   (ocf::heartbeat:Dummy): Started straddie3</div><div>main4   (ocf::heartbeat:Dummy): Started straddie1</div><div>main5   (ocf::heartbeat:Dummy): Started straddie2</div><div>main6   (ocf::heartbeat:Dummy): Started straddie3</div><div>backup1 (ocf::heartbeat:Dummy): Started straddie2</div><div>backup2 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup3 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup4 (ocf::heartbeat:Dummy): Started straddie2</div><div>backup5 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup6 (ocf::heartbeat:Dummy): Started straddie2</div></div><div><br></div><div>When we do a &quot;pcs cluster stop --all&quot;, things do not go so well.  pcs cluster stop hangs and the cluster state is as follows:</div><div><br></div><div><div>main1   (ocf::heartbeat:Dummy): Stopped</div><div>main2   (ocf::heartbeat:Dummy): Stopped</div><div>main3   (ocf::heartbeat:Dummy): Stopped</div><div>main4   (ocf::heartbeat:Dummy): Stopped</div><div>main5   (ocf::heartbeat:Dummy): Stopped</div><div>main6   (ocf::heartbeat:Dummy): Stopped</div><div>backup1 (ocf::heartbeat:Dummy): Started straddie2</div><div>backup2 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup3 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup4 (ocf::heartbeat:Dummy): Started straddie2</div><div>backup5 (ocf::heartbeat:Dummy): Started straddie1</div><div>backup6 (ocf::heartbeat:Dummy): Started straddie2</div></div><div><br></div><div>The corosync.log clearly shows why this is happening.  It looks like Pacemaker wants to stop the backup resources, but the order constraint states that the &quot;main&quot; resources should be started first.  At this stage the &quot;main&quot; resources have already been stopped, and because the cluster is shutting down, the &quot;main&quot; resources cannot be started, and we are stuck:</div><div><br></div><div><div><br></div><div>Sep 08 15:15:07 [23862] straddie3       crmd:     info: match_graph_event:      Action main1_stop_0 (14) confirmed on straddie1 (rc=0)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:  warning: run_graph:      Transition 48 (Complete=6, Pending=0, Fired=0, Skipped=0, Incomplete=10, Source=/var/lib/pacemaker/pengine/pe-input-496.bz2): Terminated</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:  warning: te_graph_trigger:       Transition failed: terminated</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_graph:    Graph 48 with 16 actions: batch-limit=0 jobs, network-delay=60000ms</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   14]: Completed rsc op main1_stop_0                      on straddie1 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   15]: Completed rsc op main4_stop_0                      on straddie1 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   16]: Pending rsc op backup2_stop_0                      on straddie1 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 31]: Unresolved dependency rsc op main2_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   17]: Pending rsc op backup3_stop_0                      on straddie1 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 32]: Unresolved dependency rsc op main3_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   18]: Pending rsc op backup5_stop_0                      on straddie1 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 34]: Unresolved dependency rsc op main5_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   19]: Completed rsc op main2_stop_0                      on straddie2 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   20]: Completed rsc op main5_stop_0                      on straddie2 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   21]: Pending rsc op backup1_stop_0                      on straddie2 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 30]: Unresolved dependency rsc op main1_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   22]: Pending rsc op backup4_stop_0                      on straddie2 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 33]: Unresolved dependency rsc op main4_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   23]: Pending rsc op backup6_stop_0                      on straddie2 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:   * [Input 35]: Unresolved dependency rsc op main6_start_0</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   24]: Completed rsc op main3_stop_0                      on straddie3 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   25]: Completed rsc op main6_stop_0                      on straddie3 (priority: 0, waiting: none)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   29]: Pending crm op do_shutdown-straddie3               on straddie3 (priority: 0, waiting:  27 28)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   28]: Pending crm op do_shutdown-straddie2               on straddie2 (priority: 0, waiting:  21 22 23)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   27]: Pending crm op do_shutdown-straddie1               on straddie1 (priority: 0, waiting:  16 17 18)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: print_synapse:  [Action   13]: Pending pseudo op all_stopped                      on N/A (priority: 0, waiting:  16 17 18 21 22 23)</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:     info: do_log: Input I_TE_SUCCESS received in state S_TRANSITION_ENGINE from notify_crmd</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:   notice: do_state_transition:    State transition S_TRANSITION_ENGINE -&gt; S_IDLE | input=I_TE_SUCCESS cause=C_FSA_INTERNAL origin=notify_crmd</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:     info: do_state_transition:    (Re)Issuing shutdown request now that we are the DC</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:     info: do_shutdown_req:        Sending shutdown request to straddie3</div><div>Sep 08 15:15:07 [23862] straddie3       crmd:     info: handle_shutdown_request:        Creating shutdown request for straddie3 (state=S_IDLE)</div></div><div><br></div><div><br></div><div>Our current workaround is to delete the constraints before calling &quot;pcs cluster stop --all&quot;, but we would prefer not to do that.</div><div><br></div><div>If I add &quot;symmetrical=false&quot; it seems to work fine, but we need the constraint to work in both directions.  I&#39;ve tried adding a separate order constraint for &quot;start backup then stop main kind=Serialized&quot;, but I hit the same issue.</div><div><br></div><div>I&#39;ve also added another optional order constraint between main and backup to say backup must be stopped first before stopping partition, but this didn&#39;t seem to work.</div><div><br></div><div>Does anyone have any ideas on how to solve this?</div><div><br></div><div>Thanks,</div><div>Leon</div><div><br></div><div><br></div><div><br></div><div>PS: The full script to create the resources on 3 nodes is:</div><div><br></div><div><div><br></div><div>echo &quot;Creating main and backup&quot;</div><div>pcs resource create main1 ocf:heartbeat:Dummy</div><div>pcs resource create main2 ocf:heartbeat:Dummy</div><div>pcs resource create main3 ocf:heartbeat:Dummy</div><div>pcs resource create main4 ocf:heartbeat:Dummy</div><div>pcs resource create main5 ocf:heartbeat:Dummy</div><div>pcs resource create main6 ocf:heartbeat:Dummy</div><div><br></div><div>pcs resource create backup1 ocf:heartbeat:Dummy</div><div>pcs resource create backup2 ocf:heartbeat:Dummy</div><div>pcs resource create backup3 ocf:heartbeat:Dummy</div><div>pcs resource create backup4 ocf:heartbeat:Dummy</div><div>pcs resource create backup5 ocf:heartbeat:Dummy</div><div>pcs resource create backup6 ocf:heartbeat:Dummy</div><div><br></div><div>pcs constraint order start main1 then stop backup1 kind=Serialize<br></div><div>pcs constraint order start main2 then stop backup2 kind=Serialize</div><div>pcs constraint order start main3 then stop backup3 kind=Serialize</div><div>pcs constraint order start main4 then stop backup4 kind=Serialize</div><div>pcs constraint order start main5 then stop backup5 kind=Serialize</div><div>pcs constraint order start main6 then stop backup6 kind=Serialize</div><div><br></div><div>pcs constraint colocation add backup1 with main1 -200<br></div><div>pcs constraint colocation add backup2 with main2 -200</div><div>pcs constraint colocation add backup3 with main3 -200</div><div>pcs constraint colocation add backup4 with main3 -200</div><div>pcs constraint colocation add backup5 with main3 -200</div><div>pcs constraint colocation add backup6 with main3 -200</div></div><div><br></div><div><br></div></div>