Add support to job.repair for host protections, specified through a
--host-protection command line parameter. If no parameter is
specified, default to FILESYSTEM_ONLY.
This replaces the existing repair behaviour with the following:
1. If DO_NOT_REPAIR is specified, do nothing.
2. If FILESYTEM_ONLY is specified, use the existing repair
procedure.
3. If NO_PROTECTION is specified, first try the existing repair
process, and if that fails try host.machine_install.
Note that this doesn't yet make changes to the scheduler to pass in
the host protection values stored in the database, it just adds the
command-line support to autoserv.
Risk: Medium
Visibility: Adds a new option to autoserv for specifying host protection levels
during repair operations.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1791 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autoserv b/server/autoserv
index 4d0f985..20fe89d 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -71,6 +71,7 @@
repair = parser.options.repair
no_tee = parser.options.no_tee
parse_job = parser.options.parse_job
+ host_protection = parser.options.host_protection
ssh_user = parser.options.ssh_user
ssh_port = parser.options.ssh_port
ssh_pass = parser.options.ssh_pass
@@ -123,7 +124,7 @@
exit_code = 0
try:
if repair:
- job.repair()
+ job.repair(host_protection)
elif verify:
job.verify()
else: