autotest: Allow SSP to mount alternate site_packages for Trusty
See bug for context.
The SSP container has shared object libraries compiled against
Trusty's version of GLIBC, but we mount the host's site_packages
inside the SSP LXC container. The site_packages has Python packages
with compiled C extensions.
In k8s Docker drones, we use a newer base image than Trusty.
Therefore, the site_packages compiled on the host in k8s drones use an
incompatible version of GLIBC.
This is a workaround at the tail end of migrations off of Trusty, and
SSP is also slated to be deleted as it is built on Trusty, so this is
this simplest thing that could work, despite still being quite horrible.
BUG=chromium:1013241
TEST=None
Change-Id: I56f01d8ed78f201b93b75e32db03e159a071dedf
Reviewed-on: https://chromium-review.googlesource.com/1854742
Tested-by: Allen Li <ayatane@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/site_utils/lxc/constants.py b/site_utils/lxc/constants.py
index dcb999c..0ceb2d5 100644
--- a/site_utils/lxc/constants.py
+++ b/site_utils/lxc/constants.py
@@ -70,6 +70,10 @@
CONTAINER_SITE_PACKAGES_PATH = os.path.join(CONTAINER_AUTOTEST_DIR,
'site-packages')
+# This is an alternate site_packages that is built to be Trusty
+# compatible. crbug.com/1013241
+TRUSTY_SITE_PACKAGES_PATH = '/opt/trusty_site_packages'
+
# TODO(dshi): If we are adding more logic in how lxc should interact with
# different systems, we should consider code refactoring to use a setting-style
# object to store following flags mapping to different systems.