update_engine: Be more descriptive on the logs on get status failure.
It happens once in a while that the update-engine service is down or it
is applying a heavy operation and won't be able to respond to the DBus
mesasge. But this is confusing because we can't really figure out what
went wrong. Add a more descriptive comment so people would know better
how to diagnose the problem.
BUG=chromium:1032384
TEST=None
Change-Id: I04c59a74f70bf34ff305756c1b222f716ba39ee7
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1966513
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/update_engine_client.cc b/update_engine_client.cc
index e78eccf..3342592 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -156,7 +156,13 @@
if (--retry_count == 0) {
return false;
}
- LOG(WARNING) << "Will try " << retry_count << " more times!";
+ LOG(WARNING)
+ << "Failed to get the update_engine status. This can happen when the"
+ " update_engine is busy doing a heavy operation or if the"
+ " update-engine service is down. If it doesn't resolve, a restart of"
+ " the update-engine service is needed."
+ " Will try "
+ << retry_count << " more times!";
base::PlatformThread::Sleep(
base::TimeDelta::FromSeconds(kShowStatusRetryIntervalInSeconds));
}