New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 907124 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

dut_status.py fails with exception: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

Project Member Reported by tbroch@google.com, Nov 20

Issue description

Chrome Version: N/A
OS: ToT source dir of autotest

What steps will reproduce the problem?
(1) site_utils/dut_status.py 


What is the expected result?
no exception

What happens instead?

Traceback (most recent call last):
  File "site_utils/dut_status.py", line 117, in <module>
    from autotest_lib.server.lib import status_history
  File "/usr/local/google/home/tbroch/cros1/src/third_party/autotest/files/server/lib/status_history.py", line 45, in <mo
    from autotest_lib.frontend.afe import models as afe_models
  File "/usr/local/google/home/tbroch/cros1/src/third_party/autotest/files/frontend/afe/models.py", line 17, in <module>
    from autotest_lib.frontend.afe import model_logic, model_attributes
  File "/usr/local/google/home/tbroch/cros1/src/third_party/autotest/files/frontend/afe/model_logic.py", line 14, in <mod
    from autotest_lib.frontend.afe import rdb_model_extensions
  File "/usr/local/google/home/tbroch/cros1/src/third_party/autotest/files/frontend/afe/rdb_model_extensions.py", line 16
<module>
    class AbstractHostModel(dbmodels.Model, ModelValidators):
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 110, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 247, in get_containing_app_config
    self.check_apps_ready()
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 125, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


This used to work for me <1month ago ... not sure whats missing on django side or how I correct as I've tried on two different source trees w/ same result.

As a workaround I'm mostly interested in discovering servo hostname for a particular lab DUT.  While I know many are <DUT>-servo.cros w/ advent of servo v4 and labstations or an unresponsive servo I'n not of any other way to find the servo hostname.  

Is there another DB I can query there?
 
Cc: ravisadineni@chromium.org
Looks like it works from cros_sdk,

site_utils/dut_status.py chromeos6-row3-rack2-host13
hostname                       S   last checked         URL
chromeos6-row3-rack2-host13    OK  2018-11-20 13:18:15  https://stainless.corp.google.com/browse/chromeos-autotest-results/hosts/chromeos6-row3-rack2-host13/3427276-repair/

Still unable to identify this particular duts servo other than looking through repair logs,

https://stainless.corp.google.com/browse/chromeos-autotest-results/hosts/chromeos6-row3-rack2-host13/3427276-repair/

To see its

chromeos6-row3-rack2-labstation w/ servod at port 9993


And then I found,

https://sites.google.com/a/google.com/chromeos/for-team-members/infrastructure/lab-tools

Looks like dut-servo-check is the right script ... perhaps I need to revisit how these are installed into my ~/bin/

Anyways I'm unblocked here but it does seem like the process for identifying failures here could be improved. 
Labels: OS-iOS
Owner: ----
Status: WontFix (was: Untriaged)
There's no plan to invest in lab-tools against Autotest at this point. We're focussing on making an equivalent suite of tools for Skylab instead.

This particular problem will not occur there because dut_status is completely rewritten, and calls a prpc API now.

Sign in to add a comment