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

Issue 864577 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 864371
Owner: ----
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Bad exception name in moblab_host.py

Reported by jrbarnette@chromium.org, Jul 17

Issue description

This run of moblab-generic-vm-paladin failed:
    https://luci-milo.appspot.com/buildbot/chromiumos/moblab-generic-vm-paladin/2111

The relevant exception was this:
Unhandled AttributeError: 'module' object has no attribute 'UpstartServiceNotRunning'
  Traceback (most recent call last):
    File "/build/moblab-generic-vm/usr/local/build/autotest/client/common_lib/test.py", line 598, in _exec
      _cherry_pick_call(self.initialize, *args, **dargs)
    File "/build/moblab-generic-vm/usr/local/build/autotest/client/common_lib/test.py", line 746, in _cherry_pick_call
      return func(*p_args, **p_dargs)
    File "/build/moblab-generic-vm/usr/local/build/autotest/server/cros/moblab_test.py", line 50, in initialize
      timeout_m=int(services_init_timeout_m))
    File "/build/moblab-generic-vm/usr/local/build/autotest/server/hosts/moblab_host.py", line 246, in verify_moblab_services
      raise error.UpstartServiceNotRunning(service)
  AttributeError: 'module' object has no attribute 'UpstartServiceNotRunning'

The problem is in this try block:
        try:
            # First service can take a long time to start, especially on first
            # boot where container setup can take 5-10 minutes, depending on the
            # device.
            self._verify_upstart_service(service, timeout_m)
        except error.TimeoutException:
            raise error.UpstartServiceNotRunning(service)

The name 'UpstartServiceNotRunning' is actually a local name in the
moblab_host module, not a name in the 'error' module, hence the failure.

References to `error.UpstartServiceNotRunning` can be found twice in the
same method, one on line 246, the other on line 253.

 
Cc: mattmallett@chromium.org
Mergedinto: 864371
Status: Duplicate (was: Untriaged)
There is a CL in flight for this 


Sign in to add a comment