From 8a0a16c8ed72c74d656664694ebe36b76ff22498 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Wed, 30 Mar 2022 17:14:33 -0500 Subject: [PATCH] Test: cts-scheduler: add test for multiple-active=stop_unexpected --- cts/cts-scheduler.in | 1 + cts/scheduler/dot/stop-unexpected.dot | 40 ++++ cts/scheduler/exp/stop-unexpected.exp | 201 ++++++++++++++++++ cts/scheduler/scores/stop-unexpected.scores | 17 ++ cts/scheduler/summary/stop-unexpected.summary | 41 ++++ cts/scheduler/xml/stop-unexpected.xml | 131 ++++++++++++ 6 files changed, 431 insertions(+) create mode 100644 cts/scheduler/dot/stop-unexpected.dot create mode 100644 cts/scheduler/exp/stop-unexpected.exp create mode 100644 cts/scheduler/scores/stop-unexpected.scores create mode 100644 cts/scheduler/summary/stop-unexpected.summary create mode 100644 cts/scheduler/xml/stop-unexpected.xml diff --git a/cts/cts-scheduler.in b/cts/cts-scheduler.in index 3a8aeaca5..8c04687da 100644 --- a/cts/cts-scheduler.in +++ b/cts/cts-scheduler.in @@ -273,6 +273,7 @@ TESTS = [ [ "rec-rsc-6", "Resource Recover - multiple - restart" ], [ "rec-rsc-7", "Resource Recover - multiple - stop" ], [ "rec-rsc-8", "Resource Recover - multiple - block" ], + [ "stop-unexpected", "Resource Recover - multiple - stop unexpected" ], [ "rec-rsc-9", "Resource Recover - group/group" ], [ "monitor-recovery", "on-fail=block + resource recovery detected by recurring monitor" ], [ "stop-failure-no-quorum", "Stop failure without quorum" ], diff --git a/cts/scheduler/dot/stop-unexpected.dot b/cts/scheduler/dot/stop-unexpected.dot new file mode 100644 index 000000000..0f67eec54 --- /dev/null +++ b/cts/scheduler/dot/stop-unexpected.dot @@ -0,0 +1,40 @@ + digraph "g" { +"dgroup_running_0" [ style=bold color="green" fontcolor="orange"] +"dgroup_start_0" -> "dgroup_running_0" [ style = bold] +"dgroup_start_0" -> "dummy2_start_0 node2" [ style = bold] +"dgroup_start_0" -> "dummy3_start_0 node2" [ style = bold] +"dgroup_start_0" -> "dummy_start_0 node2" [ style = bold] +"dgroup_start_0" [ style=bold color="green" fontcolor="orange"] +"dgroup_stop_0" -> "dgroup_stopped_0" [ style = bold] +"dgroup_stop_0" -> "dummy2_stop_0 node2" [ style = bold] +"dgroup_stop_0" -> "dummy3_stop_0 node2" [ style = bold] +"dgroup_stop_0" -> "dummy_stop_0 node3" [ style = bold] +"dgroup_stop_0" [ style=bold color="green" fontcolor="orange"] +"dgroup_stopped_0" -> "dgroup_start_0" [ style = bold] +"dgroup_stopped_0" [ style=bold color="green" fontcolor="orange"] +"dummy2_monitor_10000 node2" [ style=bold color="green" fontcolor="black"] +"dummy2_start_0 node2" -> "dgroup_running_0" [ style = bold] +"dummy2_start_0 node2" -> "dummy2_monitor_10000 node2" [ style = bold] +"dummy2_start_0 node2" -> "dummy3_start_0 node2" [ style = bold] +"dummy2_start_0 node2" [ style=bold color="green" fontcolor="black"] +"dummy2_stop_0 node2" -> "dgroup_stopped_0" [ style = bold] +"dummy2_stop_0 node2" -> "dummy2_start_0 node2" [ style = bold] +"dummy2_stop_0 node2" -> "dummy_stop_0 node3" [ style = bold] +"dummy2_stop_0 node2" [ style=bold color="green" fontcolor="black"] +"dummy3_monitor_10000 node2" [ style=bold color="green" fontcolor="black"] +"dummy3_start_0 node2" -> "dgroup_running_0" [ style = bold] +"dummy3_start_0 node2" -> "dummy3_monitor_10000 node2" [ style = bold] +"dummy3_start_0 node2" [ style=bold color="green" fontcolor="black"] +"dummy3_stop_0 node2" -> "dgroup_stopped_0" [ style = bold] +"dummy3_stop_0 node2" -> "dummy2_stop_0 node2" [ style = bold] +"dummy3_stop_0 node2" -> "dummy3_start_0 node2" [ style = bold] +"dummy3_stop_0 node2" [ style=bold color="green" fontcolor="black"] +"dummy_monitor_10000 node2" [ style=bold color="green" fontcolor="black"] +"dummy_start_0 node2" -> "dgroup_running_0" [ style = bold] +"dummy_start_0 node2" -> "dummy2_start_0 node2" [ style = bold] +"dummy_start_0 node2" -> "dummy_monitor_10000 node2" [ style = bold] +"dummy_start_0 node2" [ style=bold color="green" fontcolor="orange"] +"dummy_stop_0 node3" -> "dgroup_stopped_0" [ style = bold] +"dummy_stop_0 node3" -> "dummy_start_0 node2" [ style = bold] +"dummy_stop_0 node3" [ style=bold color="green" fontcolor="black"] +} diff --git a/cts/scheduler/exp/stop-unexpected.exp b/cts/scheduler/exp/stop-unexpected.exp new file mode 100644 index 000000000..1f94532f7 --- /dev/null +++ b/cts/scheduler/exp/stop-unexpected.exp @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cts/scheduler/scores/stop-unexpected.scores b/cts/scheduler/scores/stop-unexpected.scores new file mode 100644 index 000000000..68f98e837 --- /dev/null +++ b/cts/scheduler/scores/stop-unexpected.scores @@ -0,0 +1,17 @@ + +pcmk__group_allocate: dgroup allocation score on node2: 0 +pcmk__group_allocate: dgroup allocation score on node3: 0 +pcmk__group_allocate: dummy allocation score on node2: 0 +pcmk__group_allocate: dummy allocation score on node3: 0 +pcmk__group_allocate: dummy2 allocation score on node2: 100 +pcmk__group_allocate: dummy2 allocation score on node3: 0 +pcmk__group_allocate: dummy3 allocation score on node2: 100 +pcmk__group_allocate: dummy3 allocation score on node3: 0 +pcmk__native_allocate: dummy allocation score on node2: 200 +pcmk__native_allocate: dummy allocation score on node3: 0 +pcmk__native_allocate: dummy2 allocation score on node2: 200 +pcmk__native_allocate: dummy2 allocation score on node3: -INFINITY +pcmk__native_allocate: dummy3 allocation score on node2: 100 +pcmk__native_allocate: dummy3 allocation score on node3: -INFINITY +pcmk__native_allocate: st-sbd allocation score on node2: 100 +pcmk__native_allocate: st-sbd allocation score on node3: 0 diff --git a/cts/scheduler/summary/stop-unexpected.summary b/cts/scheduler/summary/stop-unexpected.summary new file mode 100644 index 000000000..7c7fc68b6 --- /dev/null +++ b/cts/scheduler/summary/stop-unexpected.summary @@ -0,0 +1,41 @@ +Current cluster status: + * Node List: + * Online: [ node2 node3 ] + + * Full List of Resources: + * st-sbd (stonith:external/sbd): Started node2 + * Resource Group: dgroup: + * dummy (ocf:heartbeat:DummyTimeout): FAILED [ node2 node3 ] + * dummy2 (ocf:heartbeat:Dummy): Started node2 + * dummy3 (ocf:heartbeat:Dummy): Started node2 + +Transition Summary: + * Recover dummy ( node2 ) due to being multiply active + * Restart dummy2 ( node2 ) due to required dummy start + * Restart dummy3 ( node2 ) due to required dummy2 start + +Executing Cluster Transition: + * Pseudo action: dgroup_stop_0 + * Resource action: dummy3 stop on node2 + * Resource action: dummy2 stop on node2 + * Resource action: dummy stop on node3 + * Pseudo action: dgroup_stopped_0 + * Pseudo action: dgroup_start_0 + * Pseudo action: dummy_start_0 + * Resource action: dummy monitor=10000 on node2 + * Resource action: dummy2 start on node2 + * Resource action: dummy2 monitor=10000 on node2 + * Resource action: dummy3 start on node2 + * Resource action: dummy3 monitor=10000 on node2 + * Pseudo action: dgroup_running_0 + +Revised Cluster Status: + * Node List: + * Online: [ node2 node3 ] + + * Full List of Resources: + * st-sbd (stonith:external/sbd): Started node2 + * Resource Group: dgroup: + * dummy (ocf:heartbeat:DummyTimeout): Started node2 + * dummy2 (ocf:heartbeat:Dummy): Started node2 + * dummy3 (ocf:heartbeat:Dummy): Started node2 diff --git a/cts/scheduler/xml/stop-unexpected.xml b/cts/scheduler/xml/stop-unexpected.xml new file mode 100644 index 000000000..6e61aeba3 --- /dev/null +++ b/cts/scheduler/xml/stop-unexpected.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.27.0