New issue
Advanced search Search tips

Issue 864158 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 26
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

test_that :lab: inside chroot fails with somewhat cryptic message if build_externals was run from outside chroot

Project Member Reported by akes...@chromium.org, Jul 16

Issue description

$ test_that -b bob -p cq -i bob-paladin-tryjob/R69-10882.0.0-b27520 :lab: nosuchtest
INFO:root:About to start lab suite with command ['/mnt/host/source/src/third_party/autotest/files/site_utils/run_suite.py', '--board=bob', '--build=bob-paladin-tryjob/R69-10882.0.0-b2752740', '--model=', '--suite_name=test_that_wrapper', '--pool=cq', '--max_runtime_mins=20', "--suite_args={'tests': ['nosuchtest']}"].
Traceback (most recent call last):
  File "/mnt/host/source/src/third_party/autotest/files/site_utils/run_suite.py", line 73, in <module>
    from autotest_lib.site_utils import diagnosis_utils
  File "/mnt/host/source/src/third_party/autotest/files/site_utils/diagnosis_utils.py", line 17, in <module>
    from autotest_lib.server.lib import status_history
  File "/mnt/host/source/src/third_party/autotest/files/server/lib/status_history.py", line 40, in <module>
    from django.db import models as django_models
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/db/__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/db/utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/db/utils.py", line 27, in load_backend
    return import_module('.base', backend_name)
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/mnt/host/source/src/third_party/autotest/files/frontend/db/backends/afe/base.py", line 3, in <module>
    from django.db.backends.mysql.base import DatabaseCreation as MySQLCreation
  File "/mnt/host/source/src/third_party/autotest/files/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmariadbclient.so.18: cannot open shared object file: No such file or directory

We can add a try-catch to run_suite that at least translates the exception to a more helpful message.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/9eb5c896fd97cd43be8d50905cf0d6a7c55dbf3a

commit 9eb5c896fd97cd43be8d50905cf0d6a7c55dbf3a
Author: Aviv Keshet <akeshet@chromium.org>
Date: Fri Jul 20 22:10:13 2018

autotest: run_suite: add informative message for chroot package issue

BUG= chromium:864158 
TEST=manually ran test_that :lab: with and without a build_externals run
in the chroot, verified that message appeared when call failed

Change-Id: I06209d462c4b13e86751c538ca81774a5d1541e8
Reviewed-on: https://chromium-review.googlesource.com/1138862
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/9eb5c896fd97cd43be8d50905cf0d6a7c55dbf3a/site_utils/run_suite.py

Status: fox (was: Started)
Status: Fixed (was: fox)

Sign in to add a comment