OLD | NEW |
1 import os, sys, subprocess, logging | 1 import os, sys, subprocess, logging |
2 | 2 |
3 from autotest_lib.client.common_lib import utils, error | 3 from autotest_lib.client.common_lib import utils, error |
4 from autotest_lib.server import utils as server_utils | 4 from autotest_lib.server import utils as server_utils |
5 from autotest_lib.server.hosts import remote | 5 from autotest_lib.server.hosts import remote |
6 | 6 |
7 | 7 |
8 SiteHost = utils.import_site_class( | 8 SiteHost = utils.import_site_class( |
9 __file__, "autotest_lib.server.hosts.site_host", "SiteHost", | 9 __file__, "autotest_lib.server.hosts.site_host", "SiteHost", |
10 remote.RemoteHost) | 10 remote.RemoteHost) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 except error.AutoservShutdownError: | 158 except error.AutoservShutdownError: |
159 logging.warning(warning_msg, attempt+1, num_attempts) | 159 logging.warning(warning_msg, attempt+1, num_attempts) |
160 # re-send the hard reset command | 160 # re-send the hard reset command |
161 self.run_conmux(conmux_command) | 161 self.run_conmux(conmux_command) |
162 else: | 162 else: |
163 break | 163 break |
164 else: | 164 else: |
165 # Run on num_attempts=1 or last retry | 165 # Run on num_attempts=1 or last retry |
166 try: | 166 try: |
167 self.wait_for_restart(timeout, | 167 self.wait_for_restart(timeout, |
| 168 old_boot_id=old_boot_id, |
168 **wait_for_restart_kwargs) | 169 **wait_for_restart_kwargs) |
169 except error.AutoservShutdownError: | 170 except error.AutoservShutdownError: |
170 logging.warning(warning_msg, num_attempts, num_attempts) | 171 logging.warning(warning_msg, num_attempts, num_attempts) |
171 msg = "Host did not shutdown" | 172 msg = "Host did not shutdown" |
172 raise error.AutoservShutdownError(msg) | 173 raise error.AutoservShutdownError(msg) |
173 | 174 |
174 if self.job: | 175 if self.job: |
175 self.job.disable_warnings("POWER_FAILURE") | 176 self.job.disable_warnings("POWER_FAILURE") |
176 try: | 177 try: |
177 if wait: | 178 if wait: |
178 self.log_reboot(reboot) | 179 self.log_reboot(reboot) |
179 else: | 180 else: |
180 reboot() | 181 reboot() |
181 finally: | 182 finally: |
182 if self.job: | 183 if self.job: |
183 self.job.enable_warnings("POWER_FAILURE") | 184 self.job.enable_warnings("POWER_FAILURE") |
OLD | NEW |