Nova Conductor fails because 'service_ref' no longer global

Bug #1102596 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned

Bug Description

Running the latest nova services as of 1/21/2013 and recorded the following error from nova-conductor:

2013-01-21 17:17:36.799 CRITICAL nova [-] global name 'service_ref' is not defined
2013-01-21 17:17:36.799 TRACE nova Traceback (most recent call last):
2013-01-21 17:17:36.799 TRACE nova File "/usr/local/bin/nova-conductor", line 7, in <module>
2013-01-21 17:17:36.799 TRACE nova execfile(__file__)
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/bin/nova-conductor", line 52, in <module>
2013-01-21 17:17:36.799 TRACE nova service.wait()
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/nova/service.py", line 667, in wait
2013-01-21 17:17:36.799 TRACE nova _launcher.wait()
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/nova/service.py", line 207, in wait
2013-01-21 17:17:36.799 TRACE nova super(ServiceLauncher, self).wait()
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/nova/service.py", line 177, in wait
2013-01-21 17:17:36.799 TRACE nova service.wait()
2013-01-21 17:17:36.799 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait
2013-01-21 17:17:36.799 TRACE nova return self._exit_event.wait()
2013-01-21 17:17:36.799 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-01-21 17:17:36.799 TRACE nova return hubs.get_hub().switch()
2013-01-21 17:17:36.799 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187, in switch
2013-01-21 17:17:36.799 TRACE nova return self.greenlet.switch()
2013-01-21 17:17:36.799 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
2013-01-21 17:17:36.799 TRACE nova result = function(*args, **kwargs)
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/nova/service.py", line 145, in run_server
2013-01-21 17:17:36.799 TRACE nova server.start()
2013-01-21 17:17:36.799 TRACE nova File "/opt/stack/nova/nova/service.py", line 426, in start
2013-01-21 17:17:36.799 TRACE nova self.service_id = service_ref['id']
2013-01-21 17:17:36.799 TRACE nova NameError: global name 'service_ref' is not defined
2013-01-21 17:17:36.799 TRACE nova

Corresponding to line 426 in nova/service.py: self.service_id = service_ref['id']

 def start(self):
        verstr = version.version_string_with_package()
        LOG.audit(_('Starting %(topic)s node (version %(version)s)'),
                  {'topic': self.topic, 'version': verstr})
        self.manager.init_host()
        self.model_disconnected = False
        ctxt = context.get_admin_context()
        try:
            self.service_ref = self.conductor_api.service_get_by_args(ctxt,
                    self.host, self.binary)
            self.service_id = service_ref['id']
        except exception.NotFound:
            self.service_ref = self._create_service_ref(ctxt)

I believe this can be fixed by calling: self.service_id = self.service_ref['id'] since service_ref is no longer global according to this commit:

https://github.com/openstack/nova/commit/e9d342637b78a4d2ef13852905ee4a2d88b48af2

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Looks like this was already a know bug and there is a patch up for review here:

https://review.openstack.org/#/c/20120/

Changed in nova:
status: New → Incomplete
status: Incomplete → New
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.