From a61dac84e5b6b455739576aed185e2162414c63e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Jan 22 2021 12:12:42 +0000 Subject: Test: scheduler: add regression test for rules using value-source --- diff --git a/cts/cts-scheduler.in b/cts/cts-scheduler.in index 23e6a91..939f8c8 100644 --- a/cts/cts-scheduler.in +++ b/cts/cts-scheduler.in @@ -145,6 +145,7 @@ TESTS = [ [ "location-date-rules-1", "Use location constraints with ineffective date-based rules" ], [ "location-date-rules-2", "Use location constraints with effective date-based rules" ], [ "nvpair-date-rules-1", "Use nvpair blocks with a variety of date-based rules" ], + [ "value-source", "Use location constraints with node attribute expressions using value-source" ], [ "rule-dbl-as-auto-number-match", "Floating-point rule values default to number comparison: match" ], [ "rule-dbl-as-auto-number-no-match", diff --git a/cts/scheduler/value-source.dot b/cts/scheduler/value-source.dot new file mode 100644 index 0000000..dfb61e9 --- /dev/null +++ b/cts/scheduler/value-source.dot @@ -0,0 +1,29 @@ + digraph "g" { +"Fencing_monitor_120000 rhel7-1" [ style=bold color="green" fontcolor="black"] +"Fencing_start_0 rhel7-1" -> "Fencing_monitor_120000 rhel7-1" [ style = bold] +"Fencing_start_0 rhel7-1" [ style=bold color="green" fontcolor="black"] +"insane-rsc_monitor_10000 rhel7-4" [ style=bold color="green" fontcolor="black"] +"insane-rsc_start_0 rhel7-4" -> "insane-rsc_monitor_10000 rhel7-4" [ style = bold] +"insane-rsc_start_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"invert-match_monitor_10000 rhel7-1" [ style=bold color="green" fontcolor="black"] +"invert-match_start_0 rhel7-1" -> "invert-match_monitor_10000 rhel7-1" [ style = bold] +"invert-match_start_0 rhel7-1" [ style=bold color="green" fontcolor="black"] +"meta-rsc_monitor_10000 rhel7-5" [ style=bold color="green" fontcolor="black"] +"meta-rsc_start_0 rhel7-5" -> "meta-rsc_monitor_10000 rhel7-5" [ style = bold] +"meta-rsc_start_0 rhel7-5" [ style=bold color="green" fontcolor="black"] +"rsc1_monitor_10000 rhel7-4" [ style=bold color="green" fontcolor="black"] +"rsc1_start_0 rhel7-4" -> "rsc1_monitor_10000 rhel7-4" [ style = bold] +"rsc1_start_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"rsc2_monitor_10000 rhel7-5" [ style=bold color="green" fontcolor="black"] +"rsc2_start_0 rhel7-5" -> "rsc2_monitor_10000 rhel7-5" [ style = bold] +"rsc2_start_0 rhel7-5" [ style=bold color="green" fontcolor="black"] +"set-rsc1_monitor_10000 rhel7-3" [ style=bold color="green" fontcolor="black"] +"set-rsc1_start_0 rhel7-3" -> "set-rsc1_monitor_10000 rhel7-3" [ style = bold] +"set-rsc1_start_0 rhel7-3" [ style=bold color="green" fontcolor="black"] +"set-rsc2_monitor_10000 rhel7-4" [ style=bold color="green" fontcolor="black"] +"set-rsc2_start_0 rhel7-4" -> "set-rsc2_monitor_10000 rhel7-4" [ style = bold] +"set-rsc2_start_0 rhel7-4" [ style=bold color="green" fontcolor="black"] +"single-rsc_monitor_10000 rhel7-2" [ style=bold color="green" fontcolor="black"] +"single-rsc_start_0 rhel7-2" -> "single-rsc_monitor_10000 rhel7-2" [ style = bold] +"single-rsc_start_0 rhel7-2" [ style=bold color="green" fontcolor="black"] +} diff --git a/cts/scheduler/value-source.exp b/cts/scheduler/value-source.exp new file mode 100644 index 0000000..4bf469f --- /dev/null +++ b/cts/scheduler/value-source.exp @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cts/scheduler/value-source.scores b/cts/scheduler/value-source.scores new file mode 100644 index 0000000..1f781c4 --- /dev/null +++ b/cts/scheduler/value-source.scores @@ -0,0 +1,47 @@ +Allocation scores: +Using the original execution date of: 2020-11-12 21:28:08Z +pcmk__native_allocate: Fencing allocation score on rhel7-1: 0 +pcmk__native_allocate: Fencing allocation score on rhel7-2: 0 +pcmk__native_allocate: Fencing allocation score on rhel7-3: 0 +pcmk__native_allocate: Fencing allocation score on rhel7-4: 0 +pcmk__native_allocate: Fencing allocation score on rhel7-5: 0 +pcmk__native_allocate: insane-rsc allocation score on rhel7-1: 0 +pcmk__native_allocate: insane-rsc allocation score on rhel7-2: 0 +pcmk__native_allocate: insane-rsc allocation score on rhel7-3: 0 +pcmk__native_allocate: insane-rsc allocation score on rhel7-4: INFINITY +pcmk__native_allocate: insane-rsc allocation score on rhel7-5: 0 +pcmk__native_allocate: invert-match allocation score on rhel7-1: INFINITY +pcmk__native_allocate: invert-match allocation score on rhel7-2: 0 +pcmk__native_allocate: invert-match allocation score on rhel7-3: 0 +pcmk__native_allocate: invert-match allocation score on rhel7-4: 0 +pcmk__native_allocate: invert-match allocation score on rhel7-5: 0 +pcmk__native_allocate: meta-rsc allocation score on rhel7-1: 0 +pcmk__native_allocate: meta-rsc allocation score on rhel7-2: 0 +pcmk__native_allocate: meta-rsc allocation score on rhel7-3: 0 +pcmk__native_allocate: meta-rsc allocation score on rhel7-4: INFINITY +pcmk__native_allocate: meta-rsc allocation score on rhel7-5: INFINITY +pcmk__native_allocate: rsc1 allocation score on rhel7-1: 0 +pcmk__native_allocate: rsc1 allocation score on rhel7-2: 0 +pcmk__native_allocate: rsc1 allocation score on rhel7-3: 0 +pcmk__native_allocate: rsc1 allocation score on rhel7-4: INFINITY +pcmk__native_allocate: rsc1 allocation score on rhel7-5: INFINITY +pcmk__native_allocate: rsc2 allocation score on rhel7-1: 0 +pcmk__native_allocate: rsc2 allocation score on rhel7-2: 0 +pcmk__native_allocate: rsc2 allocation score on rhel7-3: 0 +pcmk__native_allocate: rsc2 allocation score on rhel7-4: 0 +pcmk__native_allocate: rsc2 allocation score on rhel7-5: INFINITY +pcmk__native_allocate: set-rsc1 allocation score on rhel7-1: 0 +pcmk__native_allocate: set-rsc1 allocation score on rhel7-2: 0 +pcmk__native_allocate: set-rsc1 allocation score on rhel7-3: INFINITY +pcmk__native_allocate: set-rsc1 allocation score on rhel7-4: 0 +pcmk__native_allocate: set-rsc1 allocation score on rhel7-5: 0 +pcmk__native_allocate: set-rsc2 allocation score on rhel7-1: 0 +pcmk__native_allocate: set-rsc2 allocation score on rhel7-2: 0 +pcmk__native_allocate: set-rsc2 allocation score on rhel7-3: 0 +pcmk__native_allocate: set-rsc2 allocation score on rhel7-4: INFINITY +pcmk__native_allocate: set-rsc2 allocation score on rhel7-5: 0 +pcmk__native_allocate: single-rsc allocation score on rhel7-1: 0 +pcmk__native_allocate: single-rsc allocation score on rhel7-2: INFINITY +pcmk__native_allocate: single-rsc allocation score on rhel7-3: 0 +pcmk__native_allocate: single-rsc allocation score on rhel7-4: 0 +pcmk__native_allocate: single-rsc allocation score on rhel7-5: 0 diff --git a/cts/scheduler/value-source.summary b/cts/scheduler/value-source.summary new file mode 100644 index 0000000..a9b0392 --- /dev/null +++ b/cts/scheduler/value-source.summary @@ -0,0 +1,60 @@ +Using the original execution date of: 2020-11-12 21:28:08Z + +Current cluster status: +Online: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] + + Fencing (stonith:fence_xvm): Stopped + rsc1 (ocf::pacemaker:Dummy): Stopped + rsc2 (ocf::pacemaker:Dummy): Stopped + invert-match (ocf::pacemaker:Dummy): Stopped + single-rsc (ocf::pacemaker:Dummy): Stopped + set-rsc1 (ocf::pacemaker:Dummy): Stopped + set-rsc2 (ocf::pacemaker:Dummy): Stopped + meta-rsc (ocf::pacemaker:Dummy): Stopped + insane-rsc (ocf::pacemaker:Dummy): Stopped + +Transition Summary: + * Start Fencing ( rhel7-1 ) + * Start rsc1 ( rhel7-4 ) + * Start rsc2 ( rhel7-5 ) + * Start invert-match ( rhel7-1 ) + * Start single-rsc ( rhel7-2 ) + * Start set-rsc1 ( rhel7-3 ) + * Start set-rsc2 ( rhel7-4 ) + * Start meta-rsc ( rhel7-5 ) + * Start insane-rsc ( rhel7-4 ) + +Executing cluster transition: + * Resource action: Fencing start on rhel7-1 + * Resource action: rsc1 start on rhel7-4 + * Resource action: rsc2 start on rhel7-5 + * Resource action: invert-match start on rhel7-1 + * Resource action: single-rsc start on rhel7-2 + * Resource action: set-rsc1 start on rhel7-3 + * Resource action: set-rsc2 start on rhel7-4 + * Resource action: meta-rsc start on rhel7-5 + * Resource action: insane-rsc start on rhel7-4 + * Resource action: Fencing monitor=120000 on rhel7-1 + * Resource action: rsc1 monitor=10000 on rhel7-4 + * Resource action: rsc2 monitor=10000 on rhel7-5 + * Resource action: invert-match monitor=10000 on rhel7-1 + * Resource action: single-rsc monitor=10000 on rhel7-2 + * Resource action: set-rsc1 monitor=10000 on rhel7-3 + * Resource action: set-rsc2 monitor=10000 on rhel7-4 + * Resource action: meta-rsc monitor=10000 on rhel7-5 + * Resource action: insane-rsc monitor=10000 on rhel7-4 +Using the original execution date of: 2020-11-12 21:28:08Z + +Revised cluster status: +Online: [ rhel7-1 rhel7-2 rhel7-3 rhel7-4 rhel7-5 ] + + Fencing (stonith:fence_xvm): Started rhel7-1 + rsc1 (ocf::pacemaker:Dummy): Started rhel7-4 + rsc2 (ocf::pacemaker:Dummy): Started rhel7-5 + invert-match (ocf::pacemaker:Dummy): Started rhel7-1 + single-rsc (ocf::pacemaker:Dummy): Started rhel7-2 + set-rsc1 (ocf::pacemaker:Dummy): Started rhel7-3 + set-rsc2 (ocf::pacemaker:Dummy): Started rhel7-4 + meta-rsc (ocf::pacemaker:Dummy): Started rhel7-5 + insane-rsc (ocf::pacemaker:Dummy): Started rhel7-4 + diff --git a/cts/scheduler/value-source.xml b/cts/scheduler/value-source.xml new file mode 100644 index 0000000..95e7d57 --- /dev/null +++ b/cts/scheduler/value-source.xml @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +