Locally, I always want to reinstall hosts when I run a job. I imagine others might also like this. Given that reinstallation depends on profile availability (of which, "Do_not_install" and "N/A" are valid depending on the configuration), we can just always reinstall in the client and server control file templates.
Changes from v1: * Fix-up the unit-tests. * Adjust machine_install to no throw an exception if no install server is configured (just becomes a no-op) Signed-off-by: Nishanth Aravamudan <[email protected]> diff --git a/frontend/afe/control_file.py b/frontend/afe/control_file.py index 61e7f7d..0699cf7 100644 --- a/frontend/afe/control_file.py +++ b/frontend/afe/control_file.py @@ -86,6 +86,7 @@ def step_init(): # a host object we use solely for the purpose of finding out the booted # kernel version, we use machines[0] since we already check that the same # kernel has been booted on all machines + step_reinstall() if len(kernel_list) > 1: kernel_host = hosts.create_host(machines[0]) @@ -108,6 +109,12 @@ def step_init(): job.automatic_test_tag = kernel_host.get_kernel_ver() step_test() +def step_reinstall(): + def run(machine): + host = hosts.create_host(machine, initialize=False) + job.run_test('reinstall', host=host, disable_sysinfo=True) + + job.parallel_simple(run, machines) def step_test(): """ % CLIENT_KERNEL_TEMPLATE diff --git a/frontend/afe/doctests/003_misc_rpc_features.txt b/frontend/afe/doctests/003_misc_rpc_features.txt index d643b4e..47803e0 100644 --- a/frontend/afe/doctests/003_misc_rpc_features.txt +++ b/frontend/afe/doctests/003_misc_rpc_features.txt @@ -177,6 +177,7 @@ def step_init(): # a host object we use solely for the purpose of finding out the booted # kernel version, we use machines[0] since we already check that the same # kernel has been booted on all machines + step_reinstall() if len(kernel_list) > 1: kernel_host = hosts.create_host(machines[0]) for kernel_info in kernel_list: @@ -195,6 +196,11 @@ def step_init(): if len(kernel_list) > 1: job.automatic_test_tag = kernel_host.get_kernel_ver() step_test() +def step_reinstall(): + def run(machine): + host = hosts.create_host(machine, initialize=False) + job.run_test('reinstall', host=host, disable_sysinfo=True) + job.parallel_simple(run, machines) def step_test(): step0() def step0(): @@ -280,6 +286,7 @@ def step_init(): # a host object we use solely for the purpose of finding out the booted # kernel version, we use machines[0] since we already check that the same # kernel has been booted on all machines + step_reinstall() if len(kernel_list) > 1: kernel_host = hosts.create_host(machines[0]) for kernel_info in kernel_list: @@ -298,6 +305,11 @@ def step_init(): if len(kernel_list) > 1: job.automatic_test_tag = kernel_host.get_kernel_ver() step_test() +def step_reinstall(): + def run(machine): + host = hosts.create_host(machine, initialize=False) + job.run_test('reinstall', host=host, disable_sysinfo=True) + job.parallel_simple(run, machines) def step_test(): step0() def step0(): diff --git a/server/control_segments/client_wrapper b/server/control_segments/client_wrapper index 08e6018..c4c71cb 100644 --- a/server/control_segments/client_wrapper +++ b/server/control_segments/client_wrapper @@ -3,6 +3,7 @@ at = autotest_remote.Autotest() def run_client(machine): host = hosts.create_host(machine) + host.machine_install(timeout=3600) host.log_kernel() at.run(control, host=host) diff --git a/server/hosts/remote.py b/server/hosts/remote.py index 2cee2f1..26db100 100644 --- a/server/hosts/remote.py +++ b/server/hosts/remote.py @@ -95,9 +95,6 @@ class RemoteHost(base_classes.Host): server_interface.install_host(self, profile=profile, timeout=timeout, num_attempts=num_attempts) - else: - raise error.AutoservUnsupportedError("Empty install server setup " - "on global_config.ini") def hardreset(self, timeout=DEFAULT_REBOOT_TIMEOUT, wait=True, _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
