the background cros_update process id is different with shell process id. |
||
Issue descriptionIn real test, when the devserver popen a background subprocess, the process id is different shell id, for example, the process id is 'sh -c python cros_update.py' is 1200, and the real process id of 'cros_update.py' is 1201, which leads to 'get_au_status_file' cannot read the status file, since the file identifier includes the process id.
,
Aug 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/2a0970aab6e5453a2747ac7b856e66798da21be4 commit 2a0970aab6e5453a2747ac7b856e66798da21be4 Author: xixuan <xixuan@google.com> Date: Wed Aug 10 19:12:44 2016 platform/dev: add 'chromite' import & process id handling. Current devserver does not have 'chromite' dependency. Also, in real devserver, the cros_update process's id is different from the shell id, and the path of 'stateful_update' is different from that in drone/shard. This CL: 1. add 'chromite' import 2. pass the 'devserver directory' to ChromiumOSUpdater. 3. Create a process group before newing the cros_update process. Use the process group id as the unique file identifier. Kill the whole process group if neccessary. BUG= chromium:636467 TEST=local autotest to trigger repair & provision. real test in devserver chromeos4-devserver2. pass testCROSAU in dev_integration_test. Change-Id: Iddf7fcbcaf508b516a8c09bbe7b09fd7209c14a4 Reviewed-on: https://chromium-review.googlesource.com/367741 Commit-Ready: Xixuan Wu <xixuan@chromium.org> Tested-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/2a0970aab6e5453a2747ac7b856e66798da21be4/devserver_integration_test.py [modify] https://crrev.com/2a0970aab6e5453a2747ac7b856e66798da21be4/cros_update.py [modify] https://crrev.com/2a0970aab6e5453a2747ac7b856e66798da21be4/__init__.py [modify] https://crrev.com/2a0970aab6e5453a2747ac7b856e66798da21be4/devserver.py
,
Sep 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/dev-util/+/cf58dd3207f58a5d54540237d0c885ddcef8526e commit cf58dd3207f58a5d54540237d0c885ddcef8526e Author: xixuan <xixuan@google.com> Date: Wed Aug 24 20:57:06 2016 platform/dev: add chromite import for internal use in package. If dev is called as a package, __init__.py can offer a chromite dependency for it. But __init__.py cannot handle the internal calls. dev/ __init__.py A.py B.py C.py import package dev, and call functions in A.py, it will succeed. But if B.py directly calls 'python A.py', or import A to call its funcions, it will fail. This CL handles this case. BUG= chromium:636467 TEST=locally run python cros_update.py, cros_update_progress.py. Run cros flash. Change-Id: I69d931b3a20a72a9e33f121f64382004f527cd42 Reviewed-on: https://chromium-review.googlesource.com/375040 Commit-Ready: Xixuan Wu <xixuan@chromium.org> Tested-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/cf58dd3207f58a5d54540237d0c885ddcef8526e/cros_update.py [modify] https://crrev.com/cf58dd3207f58a5d54540237d0c885ddcef8526e/Makefile [add] https://crrev.com/cf58dd3207f58a5d54540237d0c885ddcef8526e/setup_chromite.py [modify] https://crrev.com/cf58dd3207f58a5d54540237d0c885ddcef8526e/__init__.py [modify] https://crrev.com/cf58dd3207f58a5d54540237d0c885ddcef8526e/cros_update_progress.py
,
Oct 5 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Aug 13 2016