[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 26/26] DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts



RFC.  Needs input on how to
 | check that this is the installer environment
as requested by the comment
 | in particular $await must only succeed if the host really did
 | reboot into the boot environment that $await expects.
near the top of power_reboot_attempts

CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-freebsd-host-install | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install
index 53daeefc..21f3b5a2 100755
--- a/ts-freebsd-host-install
+++ b/ts-freebsd-host-install
@@ -259,14 +259,14 @@ END
 }
 
 # Switch off, setup PXE and switch on to the installer
-power_state($ho, 0);
-setup_netboot_installer();
-power_cycle_sleep($ho);
-power_state($ho, 1);
-
-# Wait for the host to finish booting
-logm("Waiting for the installer to boot");
-await_tcp(get_timeout($ho,'reboot',$timeout), 5, $ho);
+power_reboot_attempts($ho, sub {
+    setup_netboot_installer();
+}, sub {
+    # Wait for the host to finish booting
+    logm("Waiting for the installer to boot");
+    await_tcp(get_timeout($ho,'reboot',$timeout), 5, $ho);
+    xxx check that this is the installer environment
+}, undef, 'install');
 
 if ($bootonly) {
     hostprop_putative_record($ho, "MemdiskAppend", $memdisk_append)
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.