From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 84B6485DBA for ; Tue, 21 Dec 2021 16:14:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7B3B6B71A for ; Tue, 21 Dec 2021 16:13:40 +0100 (CET) Received: from bastionodiso.odiso.net (bastionodiso.odiso.net [185.151.191.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id D6897B6FF for ; Tue, 21 Dec 2021 16:13:38 +0100 (CET) Received: from kvmformation3.odiso.net (formationkvm3.odiso.net [10.3.94.12]) by bastionodiso.odiso.net (Postfix) with ESMTP id 80CBF1930A; Tue, 21 Dec 2021 16:13:32 +0100 (CET) Received: by kvmformation3.odiso.net (Postfix, from userid 0) id 712C414B402; Tue, 21 Dec 2021 16:13:32 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Tue, 21 Dec 2021 16:13:31 +0100 Message-Id: <20211221151331.623760-3-aderumier@odiso.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211221151331.623760-1-aderumier@odiso.com> References: <20211221151331.623760-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.125 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years NO_DNS_FOR_FROM 0.001 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH V3 pve-ha-manager 2/2] add test-basic0 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 15:14:10 -0000 --- src/test/test-basic0/README | 1 + src/test/test-basic0/cmdlist | 4 +++ src/test/test-basic0/hardware_status | 5 +++ src/test/test-basic0/log.expect | 52 ++++++++++++++++++++++++++++ src/test/test-basic0/manager_status | 1 + src/test/test-basic0/node_stats | 5 +++ src/test/test-basic0/service_config | 5 +++ src/test/test-basic0/service_stats | 5 +++ 8 files changed, 78 insertions(+) create mode 100644 src/test/test-basic0/README create mode 100644 src/test/test-basic0/cmdlist create mode 100644 src/test/test-basic0/hardware_status create mode 100644 src/test/test-basic0/log.expect create mode 100644 src/test/test-basic0/manager_status create mode 100644 src/test/test-basic0/node_stats create mode 100644 src/test/test-basic0/service_config create mode 100644 src/test/test-basic0/service_stats diff --git a/src/test/test-basic0/README b/src/test/test-basic0/README new file mode 100644 index 0000000..223c9dc --- /dev/null +++ b/src/test/test-basic0/README @@ -0,0 +1 @@ +Test failover after single node network failure. \ No newline at end of file diff --git a/src/test/test-basic0/cmdlist b/src/test/test-basic0/cmdlist new file mode 100644 index 0000000..eee0e40 --- /dev/null +++ b/src/test/test-basic0/cmdlist @@ -0,0 +1,4 @@ +[ + [ "power node1 on", "power node2 on", "power node3 on"], + [ "network node3 off" ] +] diff --git a/src/test/test-basic0/hardware_status b/src/test/test-basic0/hardware_status new file mode 100644 index 0000000..119b81c --- /dev/null +++ b/src/test/test-basic0/hardware_status @@ -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-basic0/log.expect b/src/test/test-basic0/log.expect new file mode 100644 index 0000000..c61850d --- /dev/null +++ b/src/test/test-basic0/log.expect @@ -0,0 +1,52 @@ +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 'vm:101' on node 'node1' +info 20 node1/crm: adding new service 'vm:102' on node 'node2' +info 20 node1/crm: adding new service 'vm: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 vm:101 +info 21 node1/lrm: service status vm: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 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 vm:103 +info 25 node3/lrm: service status vm:103 started +info 40 node1/crm: service 'vm:102': state changed from 'request_stop' to 'stopped' +info 120 cmdlist: execute network node3 off +info 120 node1/crm: node 'node3': state changed from 'online' => 'unknown' +info 124 node3/crm: status change slave => wait_for_quorum +info 125 node3/lrm: status change active => lost_agent_lock +info 160 node1/crm: service 'vm:103': state changed from 'started' to 'fence' +info 160 node1/crm: node 'node3': state changed from 'unknown' => 'fence' +emai 160 node1/crm: FENCE: Try to fence node 'node3' +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 240 node1/crm: got lock 'ha_agent_node3_lock' +info 240 node1/crm: fencing: acknowledged - got agent lock for node 'node3' +info 240 node1/crm: node 'node3': state changed from 'fence' => 'unknown' +emai 240 node1/crm: SUCCEED: fencing: acknowledged - got agent lock for node 'node3' +info 240 node1/crm: service 'vm:103': state changed from 'fence' to 'recovery' +info 240 node1/crm: recover service 'vm:103' from fenced node 'node3' to node 'node2' +info 240 node1/crm: service 'vm:103': state changed from 'recovery' to 'started' (node = node2) +info 243 node2/lrm: starting service vm:103 +info 243 node2/lrm: service status vm:103 started +info 720 hardware: exit simulation - done diff --git a/src/test/test-basic0/manager_status b/src/test/test-basic0/manager_status new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/src/test/test-basic0/manager_status @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/test/test-basic0/node_stats b/src/test/test-basic0/node_stats new file mode 100644 index 0000000..a5e654d --- /dev/null +++ b/src/test/test-basic0/node_stats @@ -0,0 +1,5 @@ +{ + "node1": { "cpu": 0.1, "maxcpu": 1,"mem": 20737418239,"maxmem": 107374182400 }, + "node2": { "cpu": 0.1, "maxcpu": 1,"mem": 22737418240,"maxmem": 107374182400 }, + "node3": { "cpu": 0.2, "maxcpu": 1,"mem": 10737418240,"maxmem": 107374182400 } +} \ No newline at end of file diff --git a/src/test/test-basic0/service_config b/src/test/test-basic0/service_config new file mode 100644 index 0000000..0e05ab4 --- /dev/null +++ b/src/test/test-basic0/service_config @@ -0,0 +1,5 @@ +{ + "vm:101": { "node": "node1", "state": "enabled" }, + "vm:102": { "node": "node2" }, + "vm:103": { "node": "node3", "state": "enabled" } +} \ No newline at end of file diff --git a/src/test/test-basic0/service_stats b/src/test/test-basic0/service_stats new file mode 100644 index 0000000..52f506d --- /dev/null +++ b/src/test/test-basic0/service_stats @@ -0,0 +1,5 @@ +{ + "101": { "cpu": 0.1, "maxcpu": 1,"mem": 1073741824,"maxmem": 1073741824 }, + "102": { "cpu": 0.1, "maxcpu": 1,"mem": 1073741824,"maxmem": 1073741824 }, + "103": { "cpu": 0.1, "maxcpu": 1,"mem": 1073741824,"maxmem": 1073741824 } +} \ No newline at end of file -- 2.30.2