update_engine: Use a second ActionProcessor for UpdateBootFlagsAction
The crrev.com/c/2519843 mistenly merged an ActionProcessor from
RealSystemState to the one in UpdateAttempter. This is problematic
because these two ActionProcessors used to run at different times (and
sometimes simultanously) and on different objects. But after they were
merge, they are colliding. For example UpdateAttempter::StartUpdater()
is adding Actions that run 45 seconds later, but the
UpdateAttempter::Update() starts the same ActionProcessor which is a
bug.
BUG=b:173251868
TEST=emerge and cros deployed, then run:
test_that --args="job_repo_url=http://100.115.168.195:8082/static/reef-release/R88-13591.0.0/autotest/packages" chromeos6-row3-rack10-host7.cros autoupdate_ForcedOOBEUpdate.full
Change-Id: I7716e9ae2e77bbc4caff5273cd3fbc22e1ed7f5b
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2542962
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/cros/update_attempter.cc b/cros/update_attempter.cc
index 0291199..6c96253 100644
--- a/cros/update_attempter.cc
+++ b/cros/update_attempter.cc
@@ -187,12 +187,12 @@
auto update_boot_flags_action = std::make_unique<UpdateBootFlagsAction>(
SystemState::Get()->boot_control());
- processor_->EnqueueAction(std::move(update_boot_flags_action));
+ aux_processor_.EnqueueAction(std::move(update_boot_flags_action));
// Update boot flags after 45 seconds.
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ActionProcessor::StartProcessing,
- base::Unretained(processor_.get())),
+ base::Unretained(&aux_processor_)),
base::TimeDelta::FromSeconds(45));
// Broadcast the update engine status on startup to ensure consistent system