]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
add another test case
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Mar 2015 15:39:56 +0000 (16:39 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Mar 2015 15:39:56 +0000 (16:39 +0100)
src/test/test-basic3/README [new file with mode: 0644]
src/test/test-basic3/cmdlist [new file with mode: 0644]
src/test/test-basic3/hardware_status [new file with mode: 0644]
src/test/test-basic3/log.expect [new file with mode: 0644]
src/test/test-basic3/manager_status [new file with mode: 0644]
src/test/test-basic3/service_config [new file with mode: 0644]

diff --git a/src/test/test-basic3/README b/src/test/test-basic3/README
new file mode 100644 (file)
index 0000000..40f0999
--- /dev/null
@@ -0,0 +1,4 @@
+Test total network failure.
+
+All nodes loose quorum at same time, so all nodes
+gets killed by self fencing (watchdog).
\ No newline at end of file
diff --git a/src/test/test-basic3/cmdlist b/src/test/test-basic3/cmdlist
new file mode 100644 (file)
index 0000000..e8e570e
--- /dev/null
@@ -0,0 +1,4 @@
+[
+    [ "power node1 on", "power node2 on", "power node3 on"],
+    [ "network node1 off", "network node2 off", "network node3 off" ]
+]
diff --git a/src/test/test-basic3/hardware_status b/src/test/test-basic3/hardware_status
new file mode 100644 (file)
index 0000000..119b81c
--- /dev/null
@@ -0,0 +1,5 @@
+{ 
+  "node1": { "power": "off", "network": "off" },
+  "node2": { "power": "off", "network": "off" },
+  "node3": { "power": "off", "network": "off" }
+}
\ No newline at end of file
diff --git a/src/test/test-basic3/log.expect b/src/test/test-basic3/log.expect
new file mode 100644 (file)
index 0000000..17fff52
--- /dev/null
@@ -0,0 +1,55 @@
+info      0     hardware: starting simulation
+info     20      cmdlist: execute power node1 on
+info     20    node1/crm: status change startup => wait_for_quorum
+info     20    node1/lrm: status change startup => wait_for_agent_lock
+info     20      cmdlist: execute power node2 on
+info     20    node2/crm: status change startup => wait_for_quorum
+info     20    node2/lrm: status change startup => wait_for_agent_lock
+info     20      cmdlist: execute power node3 on
+info     20    node3/crm: status change startup => wait_for_quorum
+info     20    node3/lrm: status change startup => wait_for_agent_lock
+info     20    node1/crm: got lock 'ha_manager_lock'
+info     20    node1/crm: status change wait_for_quorum => master
+info     20    node1/crm: node 'node1': state changed from 'unknown' => 'online'
+info     20    node1/crm: node 'node2': state changed from 'unknown' => 'online'
+info     20    node1/crm: node 'node3': state changed from 'unknown' => 'online'
+info     20    node1/crm: adding new service 'pvevm:101' on node 'node1'
+info     20    node1/crm: adding new service 'pvevm:102' on node 'node2'
+info     20    node1/crm: adding new service 'pvevm:103' on node 'node3'
+info     21    node1/lrm: got lock 'ha_agent_node1_lock'
+info     21    node1/lrm: status change wait_for_agent_lock => active
+info     21    node1/lrm: starting service pvevm:101
+info     21    node1/lrm: service status pvevm:101 started
+info     22    node2/crm: status change wait_for_quorum => slave
+info     23    node2/lrm: got lock 'ha_agent_node2_lock'
+info     23    node2/lrm: status change wait_for_agent_lock => active
+info     23    node2/lrm: starting service pvevm:102
+info     23    node2/lrm: service status pvevm:102 started
+info     24    node3/crm: status change wait_for_quorum => slave
+info     25    node3/lrm: got lock 'ha_agent_node3_lock'
+info     25    node3/lrm: status change wait_for_agent_lock => active
+info     25    node3/lrm: starting service pvevm:103
+info     25    node3/lrm: service status pvevm:103 started
+info    120      cmdlist: execute network node1 off
+info    120      cmdlist: execute network node2 off
+info    120      cmdlist: execute network node3 off
+info    120    node1/crm: status change master => lost_manager_lock
+info    120    node1/crm: status change lost_manager_lock => wait_for_quorum
+info    121    node1/lrm: status change active => lost_agent_lock
+info    122    node2/crm: status change slave => wait_for_quorum
+info    123    node2/lrm: status change active => lost_agent_lock
+info    124    node3/crm: status change slave => wait_for_quorum
+info    125    node3/lrm: status change active => lost_agent_lock
+info    162     watchdog: execute power node1 off
+info    161    node1/crm: killed by poweroff
+info    162    node1/lrm: killed by poweroff
+info    162     hardware: server 'node1' stopped by poweroff (watchdog)
+info    164     watchdog: execute power node2 off
+info    163    node2/crm: killed by poweroff
+info    164    node2/lrm: killed by poweroff
+info    164     hardware: server 'node2' stopped by poweroff (watchdog)
+info    166     watchdog: execute power node3 off
+info    165    node3/crm: killed by poweroff
+info    166    node3/lrm: killed by poweroff
+info    166     hardware: server 'node3' stopped by poweroff (watchdog)
+info    720     hardware: exit simulation - done
diff --git a/src/test/test-basic3/manager_status b/src/test/test-basic3/manager_status
new file mode 100644 (file)
index 0000000..9e26dfe
--- /dev/null
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/src/test/test-basic3/service_config b/src/test/test-basic3/service_config
new file mode 100644 (file)
index 0000000..370d3d5
--- /dev/null
@@ -0,0 +1,5 @@
+{
+    "pvevm:101": { "node": "node1", "state": "enabled" },
+    "pvevm:102": { "node": "node2", "state": "enabled" },
+    "pvevm:103": { "node": "node3", "state": "enabled" }
+}
\ No newline at end of file