commit c64608ed859a7bb7ca371335124e7f19f2cf8d54
Author: Gao,Yan <ygao@suse.com>
Date:   Fri Jun 6 01:39:20 2014 +0800

    Test: pengine: cl#5200 - Before migrating utilization-using resources to a node, take off the load that will no longer run there if it's not introducing transition loop

diff --git a/pengine/test10/migrate-begin.dot b/pengine/test10/migrate-begin.dot
index 76d5a9d..1927f7f 100644
--- a/pengine/test10/migrate-begin.dot
+++ b/pengine/test10/migrate-begin.dot
@@ -1,5 +1,6 @@
 digraph "g" {
 "all_stopped" [ style=bold color="green" fontcolor="orange" ]
+"load_stopped_hex-13 hex-13" -> "test-vm_migrate_to_0 hex-14" [ style = bold]
 "load_stopped_hex-13 hex-13" -> "test-vm_start_0 hex-13" [ style = bold]
 "load_stopped_hex-13 hex-13" [ style=bold color="green" fontcolor="orange" ]
 "load_stopped_hex-14 hex-14" [ style=bold color="green" fontcolor="orange" ]
diff --git a/pengine/test10/migrate-begin.exp b/pengine/test10/migrate-begin.exp
index 1d6a898..c77e89c 100644
--- a/pengine/test10/migrate-begin.exp
+++ b/pengine/test10/migrate-begin.exp
@@ -19,7 +19,11 @@
         <attributes CRM_meta_migrate_source="hex-14" CRM_meta_migrate_target="hex-13" CRM_meta_record_pending="true" CRM_meta_timeout="600000"  name="test-vm" xmfile="/var/lib/xen/images/SLES_11_SP1_JeOS_Xen_Guest.x86_64-0.0.1.xenconfig"/>
       </rsc_op>
     </action_set>
-    <inputs/>
+    <inputs>
+      <trigger>
+        <pseudo_event id="3" operation="load_stopped_hex-13" operation_key="load_stopped_hex-13"/>
+      </trigger>
+    </inputs>
   </synapse>
   <synapse id="2">
     <action_set>
diff --git a/pengine/test10/migrate-begin.summary b/pengine/test10/migrate-begin.summary
index 3dea03a..b4b5870 100644
--- a/pengine/test10/migrate-begin.summary
+++ b/pengine/test10/migrate-begin.summary
@@ -10,8 +10,8 @@ Transition Summary:
  * Migrate test-vm	(Started hex-14 -> hex-13)
 
 Executing cluster transition:
- * Resource action: test-vm         migrate_to on hex-14
  * Pseudo action:   load_stopped_hex-13
+ * Resource action: test-vm         migrate_to on hex-14
  * Resource action: test-vm         migrate_from on hex-13
  * Resource action: test-vm         stop on hex-14
  * Pseudo action:   load_stopped_hex-14
diff --git a/pengine/test10/migrate-both-vms.dot b/pengine/test10/migrate-both-vms.dot
index 7402fd6..e883754 100644
--- a/pengine/test10/migrate-both-vms.dot
+++ b/pengine/test10/migrate-both-vms.dot
@@ -44,8 +44,10 @@ digraph "g" {
 "fs-libvirt-VM-xcm_stop_0 cvmh04" -> "all_stopped" [ style = bold]
 "fs-libvirt-VM-xcm_stop_0 cvmh04" -> "c-fs-libvirt-VM-xcm_stopped_0" [ style = bold]
 "fs-libvirt-VM-xcm_stop_0 cvmh04" [ style=bold color="green" fontcolor="black"]
+"load_stopped_cvmh01 cvmh01" -> "vm-compute-test_migrate_to_0 cvmh03" [ style = bold]
 "load_stopped_cvmh01 cvmh01" -> "vm-compute-test_start_0 cvmh01" [ style = bold]
 "load_stopped_cvmh01 cvmh01" [ style=bold color="green" fontcolor="orange"]
+"load_stopped_cvmh02 cvmh02" -> "vm-swbuildsl6_migrate_to_0 cvmh04" [ style = bold]
 "load_stopped_cvmh02 cvmh02" -> "vm-swbuildsl6_start_0 cvmh02" [ style = bold]
 "load_stopped_cvmh02 cvmh02" [ style=bold color="green" fontcolor="orange"]
 "load_stopped_cvmh03 cvmh03" [ style=bold color="green" fontcolor="orange"]
diff --git a/pengine/test10/migrate-both-vms.exp b/pengine/test10/migrate-both-vms.exp
index 63aa146..58dd01b 100644
--- a/pengine/test10/migrate-both-vms.exp
+++ b/pengine/test10/migrate-both-vms.exp
@@ -331,7 +331,11 @@
         <attributes CRM_meta_migrate_source="cvmh03" CRM_meta_migrate_target="cvmh01" CRM_meta_record_pending="true" CRM_meta_timeout="20000"  migration_network_suffix="-ib" migration_transport="ssh" nodename="compute-test"/>
       </rsc_op>
     </action_set>
-    <inputs/>
+    <inputs>
+      <trigger>
+        <pseudo_event id="31" operation="load_stopped_cvmh01" operation_key="load_stopped_cvmh01"/>
+      </trigger>
+    </inputs>
   </synapse>
   <synapse id="22">
     <action_set>
@@ -402,6 +406,9 @@
     </action_set>
     <inputs>
       <trigger>
+        <pseudo_event id="29" operation="load_stopped_cvmh02" operation_key="load_stopped_cvmh02"/>
+      </trigger>
+      <trigger>
         <rsc_op id="99" operation="migrate_from" operation_key="vm-compute-test_migrate_from_0" on_node="cvmh01" on_node_uuid="cvmh01"/>
       </trigger>
     </inputs>
diff --git a/pengine/test10/migrate-both-vms.summary b/pengine/test10/migrate-both-vms.summary
index 45a0a6e..531fd4c 100644
--- a/pengine/test10/migrate-both-vms.summary
+++ b/pengine/test10/migrate-both-vms.summary
@@ -37,14 +37,14 @@ Transition Summary:
 
 Executing cluster transition:
  * Pseudo action:   c-watch-ib0_stop_0
- * Resource action: vm-compute-test migrate_to on cvmh03
  * Pseudo action:   load_stopped_cvmh01
  * Pseudo action:   load_stopped_cvmh02
  * Resource action: p-watch-ib0     stop on cvmh03
- * Resource action: vm-compute-test migrate_from on cvmh01
- * Resource action: vm-swbuildsl6   migrate_to on cvmh04
+ * Resource action: vm-compute-test migrate_to on cvmh03
  * Resource action: p-watch-ib0     stop on cvmh04
  * Pseudo action:   c-watch-ib0_stopped_0
+ * Resource action: vm-compute-test migrate_from on cvmh01
+ * Resource action: vm-swbuildsl6   migrate_to on cvmh04
  * Resource action: vm-swbuildsl6   migrate_from on cvmh02
  * Resource action: vm-swbuildsl6   stop on cvmh04
  * Pseudo action:   load_stopped_cvmh04
diff --git a/pengine/test10/utilization-order3.dot b/pengine/test10/utilization-order3.dot
index a223d57..d330416 100644
--- a/pengine/test10/utilization-order3.dot
+++ b/pengine/test10/utilization-order3.dot
@@ -2,6 +2,7 @@ digraph "g" {
 "all_stopped" [ style=bold color="green" fontcolor="orange" ]
 "load_stopped_node1 node1" -> "rsc2_start_0 node1" [ style = bold]
 "load_stopped_node1 node1" [ style=bold color="green" fontcolor="orange" ]
+"load_stopped_node2 node2" -> "rsc1_migrate_to_0 node1" [ style = bold]
 "load_stopped_node2 node2" -> "rsc1_start_0 node2" [ style = bold]
 "load_stopped_node2 node2" [ style=bold color="green" fontcolor="orange" ]
 "probe_complete node1" [ style=bold color="green" fontcolor="black" ]
diff --git a/pengine/test10/utilization-order3.exp b/pengine/test10/utilization-order3.exp
index cec7487..4c23483 100644
--- a/pengine/test10/utilization-order3.exp
+++ b/pengine/test10/utilization-order3.exp
@@ -32,7 +32,11 @@
         <attributes CRM_meta_migrate_source="node1" CRM_meta_migrate_target="node2" CRM_meta_record_pending="true" CRM_meta_timeout="20000" />
       </rsc_op>
     </action_set>
-    <inputs/>
+    <inputs>
+      <trigger>
+        <pseudo_event id="2" operation="load_stopped_node2" operation_key="load_stopped_node2"/>
+      </trigger>
+    </inputs>
   </synapse>
   <synapse id="3">
     <action_set>
diff --git a/pengine/test10/utilization-order3.summary b/pengine/test10/utilization-order3.summary
index 23411ee..cfeea48 100644
--- a/pengine/test10/utilization-order3.summary
+++ b/pengine/test10/utilization-order3.summary
@@ -10,8 +10,8 @@ Transition Summary:
  * Migrate rsc1	(Started node1 -> node2)
 
 Executing cluster transition:
- * Resource action: rsc1            migrate_to on node1
  * Pseudo action:   load_stopped_node2
+ * Resource action: rsc1            migrate_to on node1
  * Resource action: rsc1            migrate_from on node2
  * Resource action: rsc1            stop on node1
  * Pseudo action:   load_stopped_node1
diff --git a/pengine/test10/utilization-order4.dot b/pengine/test10/utilization-order4.dot
index bb42636..9c7e244 100644
--- a/pengine/test10/utilization-order4.dot
+++ b/pengine/test10/utilization-order4.dot
@@ -34,6 +34,7 @@ digraph "g" {
 "grp-nfs:1_stopped_0" -> "clone-nfs_stopped_0" [ style = bold]
 "grp-nfs:1_stopped_0" -> "prim-ping:0_stop_0 deglxen002" [ style = bold]
 "grp-nfs:1_stopped_0" [ style=bold color="green" fontcolor="orange" ]
+"load_stopped_deglxen001 deglxen001" -> "degllx62-vm_migrate_to_0 deglxen002" [ style = bold]
 "load_stopped_deglxen001 deglxen001" -> "degllx62-vm_start_0 deglxen001" [ style = bold]
 "load_stopped_deglxen001 deglxen001" [ style=bold color="green" fontcolor="orange" ]
 "load_stopped_deglxen002 deglxen002" [ style=bold color="green" fontcolor="orange" ]
diff --git a/pengine/test10/utilization-order4.exp b/pengine/test10/utilization-order4.exp
index 13ed62a..24dda90 100644
--- a/pengine/test10/utilization-order4.exp
+++ b/pengine/test10/utilization-order4.exp
@@ -19,7 +19,11 @@
         <attributes CRM_meta_migrate_source="deglxen002" CRM_meta_migrate_target="deglxen001" CRM_meta_name="migrate_to" CRM_meta_record_pending="false" CRM_meta_timeout="1800000"  xmfile="/etc/xen/vm/degllx62"/>
       </rsc_op>
     </action_set>
-    <inputs/>
+    <inputs>
+      <trigger>
+        <pseudo_event id="13" operation="load_stopped_deglxen001" operation_key="load_stopped_deglxen001"/>
+      </trigger>
+    </inputs>
   </synapse>
   <synapse id="2" priority="4">
     <action_set>
diff --git a/pengine/test10/utilization-order4.summary b/pengine/test10/utilization-order4.summary
index 20fe903..124483b 100644
--- a/pengine/test10/utilization-order4.summary
+++ b/pengine/test10/utilization-order4.summary
@@ -22,9 +22,9 @@ Transition Summary:
  * Stop    prim-ping:1	(deglxen002)
 
 Executing cluster transition:
- * Resource action: degllx62-vm     migrate_to on deglxen002
  * Resource action: degllx61-vm     stop on deglxen001
  * Pseudo action:   load_stopped_deglxen001
+ * Resource action: degllx62-vm     migrate_to on deglxen002
  * Resource action: degllx62-vm     migrate_from on deglxen001
  * Resource action: degllx62-vm     stop on deglxen002
  * Pseudo action:   clone-nfs_stop_0
