From d3322b19c38200d4a7a535618fb8b4b6061386b4 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Thu, 4 May 2017 19:43:43 +0200 Subject: [PATCH 1/4] Fix: pengine: have guest-node connection-resources probed --- pengine/native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pengine/native.c b/pengine/native.c index d0cebb3..283772f 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -2737,7 +2737,7 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete, return any_created; - } else if (rsc->container) { + } else if ((rsc->container) && (!rsc->is_remote_node)) { pe_rsc_trace(rsc, "Skipping %s: it is within container %s", rsc->id, rsc->container->id); return FALSE; } -- 1.8.3.1 From bda2ddcfb1a4902c6fa9b6691eecc1230eb7dbcf Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Thu, 4 May 2017 23:08:40 +0200 Subject: [PATCH 2/4] Test: pengine: update regression tests for probes of guest-connections --- pengine/test10/bug-cl-5247.dot | 3 + pengine/test10/bug-cl-5247.exp | 286 +++++++++--------- pengine/test10/bug-cl-5247.summary | 6 +- pengine/test10/guest-node-host-dies.dot | 18 ++ pengine/test10/guest-node-host-dies.exp | 322 +++++++++++++-------- pengine/test10/guest-node-host-dies.summary | 6 + pengine/test10/whitebox-fail3.dot | 2 + pengine/test10/whitebox-fail3.exp | 72 +++-- pengine/test10/whitebox-fail3.summary | 3 +- pengine/test10/whitebox-migrate1.dot | 4 + pengine/test10/whitebox-migrate1.exp | 92 +++--- pengine/test10/whitebox-migrate1.summary | 1 + pengine/test10/whitebox-ms-ordering-move.dot | 16 + pengine/test10/whitebox-ms-ordering-move.exp | 194 +++++++++---- pengine/test10/whitebox-ms-ordering-move.summary | 8 + pengine/test10/whitebox-ms-ordering.dot | 12 + pengine/test10/whitebox-ms-ordering.exp | 262 +++++++++++------ pengine/test10/whitebox-ms-ordering.summary | 6 + pengine/test10/whitebox-nested-group.dot | 6 + pengine/test10/whitebox-nested-group.exp | 216 ++++++++------ pengine/test10/whitebox-nested-group.summary | 3 + pengine/test10/whitebox-unexpectedly-running.dot | 2 + pengine/test10/whitebox-unexpectedly-running.exp | 46 +-- .../test10/whitebox-unexpectedly-running.summary | 1 + 24 files changed, 1018 insertions(+), 569 deletions(-) diff --git a/pengine/test10/bug-cl-5247.dot b/pengine/test10/bug-cl-5247.dot index 0ab7893..44f788d 100644 --- a/pengine/test10/bug-cl-5247.dot +++ b/pengine/test10/bug-cl-5247.dot @@ -89,6 +89,9 @@ digraph "g" { "pgsql_stop_0 pgsr02" -> "all_stopped" [ style = bold] "pgsql_stop_0 pgsr02" -> "msPostgresql_stopped_0" [ style = bold] "pgsql_stop_0 pgsr02" [ style=bold color="green" fontcolor="orange"] +"pgsr01_monitor_0 bl460g8n4" [ style=bold color="green" fontcolor="black"] +"pgsr02_monitor_0 bl460g8n3" -> "pgsr02_stop_0 bl460g8n4" [ style = bold] +"pgsr02_monitor_0 bl460g8n3" [ style=bold color="green" fontcolor="black"] "pgsr02_stop_0 bl460g8n4" -> "all_stopped" [ style = bold] "pgsr02_stop_0 bl460g8n4" -> "prmDB2_stop_0 bl460g8n4" [ style = bold] "pgsr02_stop_0 bl460g8n4" [ style=bold color="green" fontcolor="black"] diff --git a/pengine/test10/bug-cl-5247.exp b/pengine/test10/bug-cl-5247.exp index 8ef8b9d..e7bac9c 100644 --- a/pengine/test10/bug-cl-5247.exp +++ b/pengine/test10/bug-cl-5247.exp @@ -8,28 +8,28 @@ - + - + - + - + - + @@ -37,7 +37,7 @@ - + @@ -46,32 +46,32 @@ - + - + - + - + - + @@ -87,10 +87,10 @@ - + - + @@ -109,22 +109,22 @@ - + - + - + - + @@ -132,7 +132,7 @@ - + @@ -141,32 +141,32 @@ - + - + - + - + - + @@ -182,10 +182,10 @@ - + - + @@ -204,349 +204,349 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -554,124 +554,133 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + @@ -679,11 +688,24 @@ + + + + + + + + + + + + + - + - + @@ -696,19 +718,19 @@ - + - + - + - + @@ -719,31 +741,31 @@ - + - + - + - + - + - + - + - + - + diff --git a/pengine/test10/bug-cl-5247.summary b/pengine/test10/bug-cl-5247.summary index 91ed8db..a13754f 100644 --- a/pengine/test10/bug-cl-5247.summary +++ b/pengine/test10/bug-cl-5247.summary @@ -32,8 +32,8 @@ Executing cluster transition: * Pseudo action: grpStonith2_stop_0 * Resource action: prmStonith2-2 stop on bl460g8n3 * Pseudo action: msPostgresql_pre_notify_demote_0 - * Resource action: pgsr02 stop on bl460g8n4 - * Resource action: prmDB2 stop on bl460g8n4 + * Resource action: pgsr01 monitor on bl460g8n4 + * Resource action: pgsr02 monitor on bl460g8n3 * Pseudo action: grpStonith1_stopped_0 * Pseudo action: grpStonith1_start_0 * Pseudo action: grpStonith2_stopped_0 @@ -41,6 +41,8 @@ Executing cluster transition: * Resource action: pgsql notify on pgsr01 * Pseudo action: msPostgresql_confirmed-pre_notify_demote_0 * Pseudo action: msPostgresql_demote_0 + * Resource action: pgsr02 stop on bl460g8n4 + * Resource action: prmDB2 stop on bl460g8n4 * Pseudo action: stonith-pgsr02-off on pgsr02 * Pseudo action: stonith_complete * Pseudo action: pgsql_post_notify_stop_0 diff --git a/pengine/test10/guest-node-host-dies.dot b/pengine/test10/guest-node-host-dies.dot index c1ced94..1fdec7b 100644 --- a/pengine/test10/guest-node-host-dies.dot +++ b/pengine/test10/guest-node-host-dies.dot @@ -63,6 +63,15 @@ digraph "g" { "lxc-ms_stop_0 lxc2" -> "lxc-ms-master_stopped_0" [ style = bold] "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_0 rhel7-3" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-3" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-3" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 rhel7-4" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-4" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 rhel7-5" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-5" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-5" [ 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] @@ -72,6 +81,15 @@ digraph "g" { "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="orange"] +"lxc2_monitor_0 rhel7-2" -> "lxc2_start_0 rhel7-3" [ style = bold] +"lxc2_monitor_0 rhel7-2" -> "lxc2_stop_0 rhel7-1" [ style = bold] +"lxc2_monitor_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 rhel7-4" -> "lxc2_start_0 rhel7-3" [ style = bold] +"lxc2_monitor_0 rhel7-4" -> "lxc2_stop_0 rhel7-1" [ style = bold] +"lxc2_monitor_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 rhel7-5" -> "lxc2_start_0 rhel7-3" [ style = bold] +"lxc2_monitor_0 rhel7-5" -> "lxc2_stop_0 rhel7-1" [ style = bold] +"lxc2_monitor_0 rhel7-5" [ style=bold color="green" fontcolor="black"] "lxc2_monitor_30000 rhel7-3" [ style=bold color="green" fontcolor="black"] "lxc2_start_0 rhel7-3" -> "lxc-ms_monitor_10000 lxc2" [ style = bold] "lxc2_start_0 rhel7-3" -> "lxc-ms_start_0 lxc2" [ style = bold] diff --git a/pengine/test10/guest-node-host-dies.exp b/pengine/test10/guest-node-host-dies.exp index 2029b60..5f49eb1 100644 --- a/pengine/test10/guest-node-host-dies.exp +++ b/pengine/test10/guest-node-host-dies.exp @@ -1,7 +1,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -39,258 +39,258 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -298,194 +298,284 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + - + - + + + + + + + - + - + - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -496,9 +586,9 @@ - + - + @@ -507,13 +597,13 @@ - + - + - + @@ -522,29 +612,29 @@ - + - + - + - + - + - + - + @@ -552,31 +642,31 @@ - + - + - + - + - + - + - + - + - + diff --git a/pengine/test10/guest-node-host-dies.summary b/pengine/test10/guest-node-host-dies.summary index 83af5ce..c6180ca 100644 --- a/pengine/test10/guest-node-host-dies.summary +++ b/pengine/test10/guest-node-host-dies.summary @@ -23,6 +23,12 @@ Transition Summary: Executing cluster transition: * Resource action: Fencing stop on rhel7-4 * Pseudo action: lxc-ms-master_demote_0 + * Resource action: lxc1 monitor on rhel7-5 + * Resource action: lxc1 monitor on rhel7-4 + * Resource action: lxc1 monitor on rhel7-3 + * Resource action: lxc2 monitor on rhel7-5 + * Resource action: lxc2 monitor on rhel7-4 + * Resource action: lxc2 monitor on rhel7-2 * Fencing rhel7-1 (reboot) * Pseudo action: rsc_rhel7-1_stop_0 * Pseudo action: lxc1_stop_0 diff --git a/pengine/test10/whitebox-fail3.dot b/pengine/test10/whitebox-fail3.dot index 123acd0..b3c1535 100644 --- a/pengine/test10/whitebox-fail3.dot +++ b/pengine/test10/whitebox-fail3.dot @@ -1,4 +1,6 @@ digraph "g" { +"18builder_monitor_0 dvossel-laptop2" -> "18builder_start_0 dvossel-laptop2" [ style = bold] +"18builder_monitor_0 dvossel-laptop2" [ style=bold color="green" fontcolor="black"] "18builder_monitor_30000 dvossel-laptop2" [ style=bold color="green" fontcolor="black"] "18builder_start_0 dvossel-laptop2" -> "18builder_monitor_30000 dvossel-laptop2" [ style = bold] "18builder_start_0 dvossel-laptop2" -> "FAKE_start_0 18builder" [ style = bold] diff --git a/pengine/test10/whitebox-fail3.exp b/pengine/test10/whitebox-fail3.exp index 1cbd24a..8ddaba0 100644 --- a/pengine/test10/whitebox-fail3.exp +++ b/pengine/test10/whitebox-fail3.exp @@ -1,7 +1,7 @@ - + @@ -10,23 +10,23 @@ - + - + - + - + @@ -35,54 +35,54 @@ - + - + - + - + - + - + - + - + - + - + @@ -90,54 +90,54 @@ - + - + - + - + - + - + - + - + - + - + @@ -145,39 +145,51 @@ - + - + - + - + + + + + + + + + + + + + - + diff --git a/pengine/test10/whitebox-fail3.summary b/pengine/test10/whitebox-fail3.summary index 7acf1b6..19b2e3d 100644 --- a/pengine/test10/whitebox-fail3.summary +++ b/pengine/test10/whitebox-fail3.summary @@ -24,8 +24,9 @@ Executing cluster transition: * Resource action: FAKE stop on dvossel-laptop2 * Pseudo action: W-master_start_0 * Pseudo action: X-master_start_0 - * Resource action: 18builder start on dvossel-laptop2 + * Resource action: 18builder monitor on dvossel-laptop2 * Pseudo action: all_stopped + * Resource action: 18builder start on dvossel-laptop2 * Resource action: FAKE start on 18builder * Resource action: W start on 18builder * Pseudo action: W-master_running_0 diff --git a/pengine/test10/whitebox-migrate1.dot b/pengine/test10/whitebox-migrate1.dot index b00e272..e54df2c 100644 --- a/pengine/test10/whitebox-migrate1.dot +++ b/pengine/test10/whitebox-migrate1.dot @@ -25,6 +25,10 @@ "rhel7-node1_migrate_from_0 rhel7-node3" [ style=bold color="green" fontcolor="black"] "rhel7-node1_migrate_to_0 rhel7-node2" -> "rhel7-node1_migrate_from_0 rhel7-node3" [ style = bold] "rhel7-node1_migrate_to_0 rhel7-node2" [ style=bold color="green" fontcolor="black"] +"rhel7-node1_monitor_0 rhel7-node3" -> "rhel7-node1_migrate_to_0 rhel7-node2" [ style = bold] +"rhel7-node1_monitor_0 rhel7-node3" -> "rhel7-node1_start_0 rhel7-node3" [ style = bold] +"rhel7-node1_monitor_0 rhel7-node3" -> "rhel7-node1_stop_0 rhel7-node2" [ style = bold] +"rhel7-node1_monitor_0 rhel7-node3" [ style=bold color="green" fontcolor="black"] "rhel7-node1_monitor_30000 rhel7-node3" [ style=bold color="green" fontcolor="black"] "rhel7-node1_start_0 rhel7-node3" -> "rhel7-node1_monitor_30000 rhel7-node3" [ style = bold] "rhel7-node1_start_0 rhel7-node3" [ style=bold color="green" fontcolor="orange"] diff --git a/pengine/test10/whitebox-migrate1.exp b/pengine/test10/whitebox-migrate1.exp index 6ce29eb..1b6c451 100644 --- a/pengine/test10/whitebox-migrate1.exp +++ b/pengine/test10/whitebox-migrate1.exp @@ -1,33 +1,33 @@ - + - + - + - + - + @@ -36,33 +36,33 @@ - + - + - + - + - + @@ -71,20 +71,20 @@ - + - + - + @@ -93,136 +93,154 @@ - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + + + + - + - + - + - + + + + + + + + + + + + + - + - + - + - + diff --git a/pengine/test10/whitebox-migrate1.summary b/pengine/test10/whitebox-migrate1.summary index 7cbe03d..a6e4c00 100644 --- a/pengine/test10/whitebox-migrate1.summary +++ b/pengine/test10/whitebox-migrate1.summary @@ -23,6 +23,7 @@ Executing cluster transition: * Resource action: shooter1 stop on rhel7-node3 * Resource action: FAKE3 stop on rhel7-node3 * Resource action: remote-rsc migrate_to on rhel7-node2 + * Resource action: rhel7-node1 monitor on rhel7-node3 * Resource action: shooter1 start on rhel7-node2 * Resource action: FAKE3 start on rhel7-node2 * Resource action: remote-rsc migrate_from on rhel7-node3 diff --git a/pengine/test10/whitebox-ms-ordering-move.dot b/pengine/test10/whitebox-ms-ordering-move.dot index 0e4df3c..fe0b0e8 100644 --- a/pengine/test10/whitebox-ms-ordering-move.dot +++ b/pengine/test10/whitebox-ms-ordering-move.dot @@ -40,6 +40,18 @@ digraph "g" { "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_0 rhel7-2" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-2" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 rhel7-3" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-3" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-3" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 rhel7-4" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-4" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 rhel7-5" -> "lxc1_start_0 rhel7-2" [ style = bold] +"lxc1_monitor_0 rhel7-5" -> "lxc1_stop_0 rhel7-1" [ style = bold] +"lxc1_monitor_0 rhel7-5" [ 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] @@ -49,4 +61,8 @@ digraph "g" { "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"] +"lxc2_monitor_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 rhel7-3" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 rhel7-5" [ style=bold color="green" fontcolor="black"] } diff --git a/pengine/test10/whitebox-ms-ordering-move.exp b/pengine/test10/whitebox-ms-ordering-move.exp index 54067f0..f8718de 100644 --- a/pengine/test10/whitebox-ms-ordering-move.exp +++ b/pengine/test10/whitebox-ms-ordering-move.exp @@ -1,118 +1,118 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -120,123 +120,135 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + @@ -246,25 +258,109 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + diff --git a/pengine/test10/whitebox-ms-ordering-move.summary b/pengine/test10/whitebox-ms-ordering-move.summary index 5777b84..d5f133b 100644 --- a/pengine/test10/whitebox-ms-ordering-move.summary +++ b/pengine/test10/whitebox-ms-ordering-move.summary @@ -36,6 +36,14 @@ Transition Summary: Executing cluster transition: * Pseudo action: lxc-ms-master_demote_0 + * Resource action: lxc1 monitor on rhel7-5 + * Resource action: lxc1 monitor on rhel7-4 + * Resource action: lxc1 monitor on rhel7-3 + * Resource action: lxc1 monitor on rhel7-2 + * Resource action: lxc2 monitor on rhel7-5 + * Resource action: lxc2 monitor on rhel7-4 + * Resource action: lxc2 monitor on rhel7-3 + * Resource action: lxc2 monitor on rhel7-2 * Resource action: lxc-ms demote on lxc1 * Pseudo action: lxc-ms-master_demoted_0 * Pseudo action: lxc-ms-master_stop_0 diff --git a/pengine/test10/whitebox-ms-ordering.dot b/pengine/test10/whitebox-ms-ordering.dot index bd77363..1a942f4 100644 --- a/pengine/test10/whitebox-ms-ordering.dot +++ b/pengine/test10/whitebox-ms-ordering.dot @@ -69,11 +69,23 @@ "lxc-ms_stop_0 lxc2" -> "lxc-ms-master_stopped_0" [ style = bold] "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_0 18node1" -> "lxc1_start_0 18node1" [ style = bold] +"lxc1_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 18node2" -> "lxc1_start_0 18node1" [ style = bold] +"lxc1_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"lxc1_monitor_0 18node3" -> "lxc1_start_0 18node1" [ style = bold] +"lxc1_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] "lxc1_monitor_30000 18node1" [ style=bold color="green" fontcolor="black"] "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] "lxc1_start_0 18node1" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 18node1" -> "lxc2_start_0 18node1" [ style = bold] +"lxc2_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 18node2" -> "lxc2_start_0 18node1" [ style = bold] +"lxc2_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"lxc2_monitor_0 18node3" -> "lxc2_start_0 18node1" [ style = bold] +"lxc2_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] "lxc2_monitor_30000 18node1" [ style=bold color="green" fontcolor="black"] "lxc2_start_0 18node1" -> "lxc-ms_monitor_10000 lxc2" [ style = bold] "lxc2_start_0 18node1" -> "lxc-ms_start_0 lxc2" [ style = bold] diff --git a/pengine/test10/whitebox-ms-ordering.exp b/pengine/test10/whitebox-ms-ordering.exp index 5d32d6f..de4f4d0 100644 --- a/pengine/test10/whitebox-ms-ordering.exp +++ b/pengine/test10/whitebox-ms-ordering.exp @@ -1,7 +1,7 @@ - + @@ -11,19 +11,19 @@ - + - + - + - + @@ -32,7 +32,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -60,19 +60,19 @@ - + - + - + - + @@ -81,7 +81,7 @@ - + @@ -99,54 +99,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -155,40 +155,40 @@ - + - + - + - + - + - + - + - + - + @@ -197,7 +197,7 @@ - + @@ -215,75 +215,75 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -291,91 +291,91 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -384,80 +384,152 @@ - + - + - + - + - + - + - + - + - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -466,9 +538,9 @@ - + - + @@ -477,22 +549,22 @@ - + - + - + - + - + @@ -500,13 +572,13 @@ - + - + - + diff --git a/pengine/test10/whitebox-ms-ordering.summary b/pengine/test10/whitebox-ms-ordering.summary index 5d7c042..365cf8d 100644 --- a/pengine/test10/whitebox-ms-ordering.summary +++ b/pengine/test10/whitebox-ms-ordering.summary @@ -27,6 +27,12 @@ Executing cluster transition: * Resource action: lxc-ms monitor on 18node2 * Resource action: lxc-ms monitor on 18node1 * Pseudo action: lxc-ms-master_demote_0 + * Resource action: lxc1 monitor on 18node3 + * Resource action: lxc1 monitor on 18node2 + * Resource action: lxc1 monitor on 18node1 + * Resource action: lxc2 monitor on 18node3 + * Resource action: lxc2 monitor on 18node2 + * Resource action: lxc2 monitor on 18node1 * Pseudo action: stonith-lxc2-reboot on lxc2 * Pseudo action: stonith-lxc1-reboot on lxc1 * Pseudo action: stonith_complete diff --git a/pengine/test10/whitebox-nested-group.dot b/pengine/test10/whitebox-nested-group.dot index 2e41e3e..e149f9a 100644 --- a/pengine/test10/whitebox-nested-group.dot +++ b/pengine/test10/whitebox-nested-group.dot @@ -1,4 +1,10 @@ digraph "g" { +"c7auto4_monitor_0 c7auto1" -> "c7auto4_start_0 c7auto1" [ style = bold] +"c7auto4_monitor_0 c7auto1" [ style=bold color="green" fontcolor="black"] +"c7auto4_monitor_0 c7auto2" -> "c7auto4_start_0 c7auto1" [ style = bold] +"c7auto4_monitor_0 c7auto2" [ style=bold color="green" fontcolor="black"] +"c7auto4_monitor_0 c7auto3" -> "c7auto4_start_0 c7auto1" [ style = bold] +"c7auto4_monitor_0 c7auto3" [ style=bold color="green" fontcolor="black"] "c7auto4_monitor_30000 c7auto1" [ style=bold color="green" fontcolor="black"] "c7auto4_start_0 c7auto1" -> "c7auto4_monitor_30000 c7auto1" [ style = bold] "c7auto4_start_0 c7auto1" -> "fake2_monitor_10000 c7auto4" [ style = bold] diff --git a/pengine/test10/whitebox-nested-group.exp b/pengine/test10/whitebox-nested-group.exp index 67767d3..e6b68f2 100644 --- a/pengine/test10/whitebox-nested-group.exp +++ b/pengine/test10/whitebox-nested-group.exp @@ -1,20 +1,20 @@ - + - + - + @@ -24,16 +24,16 @@ - + - + - + @@ -42,7 +42,7 @@ - + @@ -60,23 +60,23 @@ - + - + - + - + @@ -86,19 +86,19 @@ - + - + - + - + @@ -107,7 +107,7 @@ - + @@ -125,20 +125,20 @@ - + - + - + @@ -148,16 +148,16 @@ - + - + - + @@ -166,7 +166,7 @@ - + @@ -184,20 +184,20 @@ - + - + - + @@ -207,16 +207,16 @@ - + - + - + @@ -225,7 +225,7 @@ - + @@ -243,23 +243,23 @@ - + - + - + - + @@ -269,19 +269,19 @@ - + - + - + - + @@ -290,7 +290,7 @@ - + @@ -308,33 +308,33 @@ - + - + - + - + - + @@ -343,33 +343,33 @@ - + - + - + - + - + @@ -378,59 +378,59 @@ - + - + - + - + - + - + - + - + - + - + @@ -445,31 +445,31 @@ - + - + - + - + - + - + - + @@ -478,34 +478,34 @@ - + - + - + - + - + - + - + @@ -513,20 +513,20 @@ - + - + - + @@ -536,19 +536,19 @@ - + - + - + - + @@ -557,7 +557,7 @@ - + @@ -575,57 +575,93 @@ - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/whitebox-nested-group.summary b/pengine/test10/whitebox-nested-group.summary index 6e6287a..ca9c47f 100644 --- a/pengine/test10/whitebox-nested-group.summary +++ b/pengine/test10/whitebox-nested-group.summary @@ -52,6 +52,9 @@ Executing cluster transition: * Resource action: fake_fs monitor on c7auto3 * Resource action: fake_fs monitor on c7auto2 * Resource action: fake_fs monitor on c7auto1 + * Resource action: c7auto4 monitor on c7auto3 + * Resource action: c7auto4 monitor on c7auto2 + * Resource action: c7auto4 monitor on c7auto1 * Resource action: fake1 start on c7auto3 * Resource action: fake3 start on c7auto2 * Resource action: fake4 start on c7auto3 diff --git a/pengine/test10/whitebox-unexpectedly-running.dot b/pengine/test10/whitebox-unexpectedly-running.dot index 2915d77..0e2e5bb 100644 --- a/pengine/test10/whitebox-unexpectedly-running.dot +++ b/pengine/test10/whitebox-unexpectedly-running.dot @@ -8,6 +8,8 @@ "FAKE_stop_0 18builder" -> "stonith 'reboot' remote1" [ style = bold] "FAKE_stop_0 18builder" [ style=bold color="green" fontcolor="black"] "all_stopped" [ style=bold color="green" fontcolor="orange"] +"remote1_monitor_0 18builder" -> "remote1_start_0 18builder" [ style = bold] +"remote1_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] "remote1_monitor_30000 18builder" [ style=bold color="green" fontcolor="black"] "remote1_start_0 18builder" -> "remote1_monitor_30000 18builder" [ style = bold] "remote1_start_0 18builder" [ style=bold color="green" fontcolor="black"] diff --git a/pengine/test10/whitebox-unexpectedly-running.exp b/pengine/test10/whitebox-unexpectedly-running.exp index 17606ce..a0e5cae 100644 --- a/pengine/test10/whitebox-unexpectedly-running.exp +++ b/pengine/test10/whitebox-unexpectedly-running.exp @@ -1,33 +1,33 @@ - + - + - + - + - + @@ -36,33 +36,45 @@ - + - + - + - + + + + - + + + + + + + + + + @@ -71,23 +83,23 @@ - + - + - + - + - + @@ -95,10 +107,10 @@ - + - + diff --git a/pengine/test10/whitebox-unexpectedly-running.summary b/pengine/test10/whitebox-unexpectedly-running.summary index 7d5b908..0b5ca42 100644 --- a/pengine/test10/whitebox-unexpectedly-running.summary +++ b/pengine/test10/whitebox-unexpectedly-running.summary @@ -10,6 +10,7 @@ Transition Summary: Executing cluster transition: * Resource action: FAKE stop on 18builder + * Resource action: remote1 monitor on 18builder * Pseudo action: stonith-remote1-reboot on remote1 * Pseudo action: stonith_complete * Pseudo action: all_stopped -- 1.8.3.1 From 43450d8bfabc981b2637189e9872aaa0b7cdccb3 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Fri, 5 May 2017 00:50:33 +0200 Subject: [PATCH 3/4] Fix: pengine: unique ids for meta-attributes of guest-connection --- lib/pengine/unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 29a1013..0e9f2b1 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -463,7 +463,7 @@ expand_remote_rsc_meta(xmlNode *xml_obj, xmlNode *parent, pe_working_set_t *data if (remote_allow_migrate) { attr = create_xml_node(xml_tmp, XML_CIB_TAG_NVPAIR); - crm_xml_set_id(attr, "%s_%s", remote_name, "meta-attributes-container"); + crm_xml_set_id(attr, "%s_%s", remote_name, "meta-attributes-migrate"); crm_xml_add(attr, XML_NVPAIR_ATTR_NAME, XML_OP_ATTR_ALLOW_MIGRATE); crm_xml_add(attr, XML_NVPAIR_ATTR_VALUE, remote_allow_migrate); } -- 1.8.3.1 From f5a8c701b81b6e4bde989feeef93fb5b1e539d28 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Thu, 4 May 2017 19:48:06 +0200 Subject: [PATCH 4/4] Feature: pengine: unmanage guest-container puts guest in maintenance sync managed-state of connection-resource with container can be used to do - otherwise not possible - cleanup of connection Fixes rhbz#1303742 --- lib/pengine/unpack.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 0e9f2b1..6ec7daf 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -72,15 +72,21 @@ pe_fence_node(pe_working_set_t * data_set, node_t * node, const char *reason) resource_t *rsc = node->details->remote_rsc->container; if (is_set(rsc->flags, pe_rsc_failed) == FALSE) { - crm_warn("Guest node %s will be fenced (by recovering %s) %s", - node->details->uname, rsc->id, reason); + if (!is_set(rsc->flags, pe_rsc_managed)) { + crm_notice("Not fencing guest node %s because the container is " + "unmanaged, otherwise we would do so recovering %s " + "%s", node->details->uname, rsc->id, reason); + } else { + crm_warn("Guest node %s will be fenced (by recovering %s) %s", + node->details->uname, rsc->id, reason); - /* We don't mark the node as unclean, because that would prevent the - * node from running resources. We want to allow it to run resources - * in this transition if the recovery succeeds. - */ - node->details->remote_requires_reset = TRUE; - set_bit(rsc->flags, pe_rsc_failed); + /* We don't mark the node as unclean because that would prevent the + * node from running resources. We want to allow it to run resources + * in this transition if the recovery succeeds. + */ + node->details->remote_requires_reset = TRUE; + set_bit(rsc->flags, pe_rsc_failed); + } } } else if (is_dangling_container_remote_node(node)) { crm_info("Cleaning up dangling connection resource for guest node %s %s" @@ -409,6 +415,7 @@ expand_remote_rsc_meta(xmlNode *xml_obj, xmlNode *parent, pe_working_set_t *data const char *remote_port = NULL; const char *connect_timeout = "60s"; const char *remote_allow_migrate=NULL; + const char *container_managed = NULL; for (attr_set = __xml_first_child(xml_obj); attr_set != NULL; attr_set = __xml_next_element(attr_set)) { if (safe_str_neq((const char *)attr_set->name, XML_TAG_META_SETS)) { @@ -429,6 +436,8 @@ expand_remote_rsc_meta(xmlNode *xml_obj, xmlNode *parent, pe_working_set_t *data connect_timeout = value; } else if (safe_str_eq(name, "remote-allow-migrate")) { remote_allow_migrate=value; + } else if (safe_str_eq(name, XML_RSC_ATTR_MANAGED)) { + container_managed = value; } } } @@ -468,6 +477,13 @@ expand_remote_rsc_meta(xmlNode *xml_obj, xmlNode *parent, pe_working_set_t *data crm_xml_add(attr, XML_NVPAIR_ATTR_VALUE, remote_allow_migrate); } + if (container_managed) { + attr = create_xml_node(xml_tmp, XML_CIB_TAG_NVPAIR); + crm_xml_set_id(attr, "%s_%s", remote_name, "meta-attributes-managed"); + crm_xml_add(attr, XML_NVPAIR_ATTR_NAME, XML_RSC_ATTR_MANAGED); + crm_xml_add(attr, XML_NVPAIR_ATTR_VALUE, container_managed); + } + xml_tmp = create_xml_node(xml_rsc, "operations"); attr = create_xml_node(xml_tmp, XML_ATTR_OP); crm_xml_set_id(attr, "%s_%s", remote_name, "monitor-interval-30s"); -- 1.8.3.1