[autotest] Add autoserv's pid to the container's name
The PID info will be used to determine if a container is orphaned.
BUG=chromium:479383
TEST=sudo python site_utils/lxc_functional_test.py
local run a server side test
Change-Id: I4de2f7f266bcb793cfe1a97e412868aa49d53991
Reviewed-on: https://chromium-review.googlesource.com/266754
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
diff --git a/server/autoserv b/server/autoserv
index 709d38c..1489799 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -227,7 +227,7 @@
job_or_task_id = job_directories.get_job_id_or_task_id(
parser.options.results)
container_name = (lxc.TEST_CONTAINER_NAME_FMT %
- (job_or_task_id, time.time()))
+ (job_or_task_id, time.time(), os.getpid()))
# Implement SIGTERM handler
def handle_sigterm(signum, frame):