Public bug reported:

https://review.opendev.org/#/c/684118/ recently merged and is causing an
issue because a variable used in the log message isn't in scope:

Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server [None req-72524ba6-86bf-479d-a09f-9a9d302f7d2f 
demo demo] Exception during message handling: UnboundLocalError: local variable 
'cell_uuid' referenced before assignment
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 
165, in _process_incoming
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 
274, in dispatch
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, 
ctxt, args)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 
194, in _do_dispatch
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     result = func(ctxt, **new_args)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 
235, in inner
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     return func(*args, **kwargs)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/manager.py", line 214, in 
select_destinations
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     allocation_request_version, 
return_alternates)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 96, in 
select_destinations
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     allocation_request_version, 
return_alternates)
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 152, in _schedule
Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     provider_summaries)
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 494, in 
_get_all_host_states
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     spec_obj)
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/host_manager.py", line 774, in 
get_host_states_by_uuids
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     context, cells, compute_uuids=compute_uuids)
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/host_manager.py", line 640, in 
_get_computes_for_cells
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     targeted_operation)
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server   File "/opt/stack/new/nova/nova/context.py", 
line 449, in scatter_gather_cells
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server     cell_uuid, exc_info=True)
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server UnboundLocalError: local variable 'cell_uuid' 
referenced before assignment
Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 nova-scheduler[28235]: 
ERROR oslo_messaging.rpc.server 

The fix is here: https://review.opendev.org/#/c/686996/

Apparently we don't have test coverage for that code.

** Affects: nova
     Importance: High
     Assignee: Rico Lin (rico-lin)
         Status: In Progress

** Changed in: nova
       Status: New => In Progress

** Changed in: nova
   Importance: Undecided => High

** Changed in: nova
     Assignee: (unassigned) => Rico Lin (rico-lin)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1847131

Title:
  UnboundLocalError: local variable 'cell_uuid' referenced before
  assignment

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  https://review.opendev.org/#/c/684118/ recently merged and is causing
  an issue because a variable used in the log message isn't in scope:

  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server [None 
req-72524ba6-86bf-479d-a09f-9a9d302f7d2f demo demo] Exception during message 
handling: UnboundLocalError: local variable 'cell_uuid' referenced before 
assignment
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server Traceback (most recent 
call last):
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 
165, in _process_incoming
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     res = 
self.dispatcher.dispatch(message)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 
274, in dispatch
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     return 
self._do_dispatch(endpoint, method, ctxt, args)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 
194, in _do_dispatch
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     result = func(ctxt, 
**new_args)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 
235, in inner
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     return func(*args, 
**kwargs)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/manager.py", line 214, in 
select_destinations
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     
allocation_request_version, return_alternates)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 96, in 
select_destinations
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     
allocation_request_version, return_alternates)
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 152, in _schedule
  Oct 07 07:16:51.372050 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     provider_summaries)
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/filter_scheduler.py", line 494, in 
_get_all_host_states
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     spec_obj)
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/host_manager.py", line 774, in 
get_host_states_by_uuids
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     context, cells, 
compute_uuids=compute_uuids)
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/scheduler/host_manager.py", line 640, in 
_get_computes_for_cells
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     targeted_operation)
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server   File 
"/opt/stack/new/nova/nova/context.py", line 449, in scatter_gather_cells
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server     cell_uuid, 
exc_info=True)
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server UnboundLocalError: local 
variable 'cell_uuid' referenced before assignment
  Oct 07 07:16:51.374461 ubuntu-bionic-ovh-bhs1-0012185489 
nova-scheduler[28235]: ERROR oslo_messaging.rpc.server 

  The fix is here: https://review.opendev.org/#/c/686996/

  Apparently we don't have test coverage for that code.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1847131/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to