Devserver: delete execute_log file for provision.
Previously, execute_log for provision is preserved in devserver for possible
future investigating. However, experience shows that they're barely checked.
This CL deletes the provision execute_log after it's transferred back to
shard/drone.
BUG=chromium:654953
TEST=Run repair in local autotest with local devserver, to check whether the
file is transferred back and also deleted in /tmp/.
Change-Id: I62c6b1371eba5ca9b11c716ec1fcab111ce93efa
Reviewed-on: https://chromium-review.googlesource.com/398423
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/cros_update_progress.py b/cros_update_progress.py
index 17a60e0..9c69352 100644
--- a/cros_update_progress.py
+++ b/cros_update_progress.py
@@ -85,11 +85,21 @@
return TRACK_LOG_FILE_PATH % (host_name, pid)
+def ReadExecuteLogFile(host_name, pid):
+ """Return the content of execute log file."""
+ return osutils.ReadFile(GetExecuteLogFile(host_name, pid))
+
+
def DelTrackStatusFile(host_name, pid):
"""Delete the track status log."""
osutils.SafeUnlink(GetTrackStatusFile(host_name, pid))
+def DelExecuteLogFile(host_name, pid):
+ """Delete the track status log."""
+ osutils.SafeUnlink(GetExecuteLogFile(host_name, pid))
+
+
class AUProgress(object):
"""Used for tracking the CrOS auto-update progress."""