]> xenbits.xensource.com Git - osstest.git/commitdiff
host lifecycle: Record lifecycle in db and runvar
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 25 Aug 2020 19:13:22 +0000 (20:13 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 7 Oct 2020 17:39:48 +0000 (18:39 +0100)
This is just the calls to host_update_lifecycle_info.
Now the db table is Needed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm
schema/host-lifecycle.sql
ts-freebsd-host-install
ts-host-install
ts-host-reuse
ts-logs-capture

index 221419815fda7652adab06679596bcb9a415b5db..163862f80aa7116464659b2200127529a7d1e75b 100644 (file)
@@ -1418,6 +1418,8 @@ sub selecthost ($;$$) {
        }
     }
 
+    host_update_lifecycle_info($ho, $isprep ? 'selectprep' : 'select');
+
     return $ho;
 }
 
index 7f1f5bb0074487f885c8db49cb0e0117977b371f..7e4fc2aa44996ca8b3a0da11d35fa0b198ce4c55 100644 (file)
@@ -1,4 +1,4 @@
--- ##OSSTEST## 012 Preparatory
+-- ##OSSTEST## 012 Needed
 --
 -- Records the jobs which have touched a host, for host sharing/reuse
 -- The information here is ephemeral - it is cleared when a host is
index 9feb98cd622fd846bc8f75fd9aeba7c22d8118a7..31e14d5714374d9d25c6894d13a93e0c36493680 100755 (executable)
@@ -295,3 +295,4 @@ setup_netboot_local($ho);
 
 # Proceed with the install
 install();
+host_update_lifecycle_info($ho, 'wiped');
index 5badc70680dace02f752eb69615a1cbc5e57adf0..276c6af85a4bbd3b67e9c778db21d706eba4eb6f 100755 (executable)
@@ -297,3 +297,4 @@ END
 }
 
 install();
+host_update_lifecycle_info($ho, 'wiped');
index 0ecbb0bd1a23c2dc6a82111f461816a1d83f7fc2..85beb51e07d31521f378cc500f7eb829b4b6a429 100755 (executable)
@@ -158,6 +158,7 @@ sub act_post_test () {
     return unless $ho->{Shared};
     die unless $ho->{Shared}{State} eq 'mid-test';
     post_test_cleanup();
+    host_update_lifecycle_info($ho, 'final');
     host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready');
 }
 
index ec494fe15bb9d15481c4465deff273f712918cf8..0b0b6af6bcd948090df8ccbfcd05f3110d3e7d29 100755 (executable)
@@ -309,3 +309,4 @@ if (fetch_logs_host()) {
     }
 }
 logm("logs captured to $stash");
+host_update_lifecycle_info($ho, 'final');