[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 69/82] host lifecycle: Record lifecycle in db and runvar
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> This is just the calls to host_update_lifecycle_info. Now the db table is Needed. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 2 ++ schema/host-lifecycle.sql | 2 +- ts-freebsd-host-install | 1 + ts-host-install | 1 + ts-host-reuse | 1 + ts-logs-capture | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 22141981..163862f8 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1418,6 +1418,8 @@ sub selecthost ($;$$) { } } + host_update_lifecycle_info($ho, $isprep ? 'selectprep' : 'select'); + return $ho; } diff --git a/schema/host-lifecycle.sql b/schema/host-lifecycle.sql index 7f1f5bb0..7e4fc2aa 100644 --- a/schema/host-lifecycle.sql +++ b/schema/host-lifecycle.sql @@ -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 diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 9feb98cd..31e14d57 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -295,3 +295,4 @@ setup_netboot_local($ho); # Proceed with the install install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-install b/ts-host-install index 5badc706..276c6af8 100755 --- a/ts-host-install +++ b/ts-host-install @@ -297,3 +297,4 @@ END } install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-reuse b/ts-host-reuse index 0ecbb0bd..85beb51e 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -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'); } diff --git a/ts-logs-capture b/ts-logs-capture index ec494fe1..0b0b6af6 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -309,3 +309,4 @@ if (fetch_logs_host()) { } } logm("logs captured to $stash"); +host_update_lifecycle_info($ho, 'final'); -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |