Network Host isn't being set without restarting service

Bug #812489 reported by Antony Messerli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Trey Morris

Bug Description

Host isn't being set in network record and tosses the first exception which then causes the other since the hosts field hasn't been populated. If I restart the network worker, it will then apply the network host to the networks table.

2011-07-18 18:52:49,320 ERROR nova [-] in looping call
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 458, in _inner
(nova): TRACE: self.f(*self.args, **self.kw)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 266, in periodic_tasks
(nova): TRACE: self.manager.periodic_tasks(context.get_admin_context())
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 327, in periodic_tasks
(nova): TRACE: self.set_network_hosts(context)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 347, in set_network_hosts
(nova): TRACE: for network in networks:
(nova): TRACE: UnboundLocalError: local variable 'networks' referenced before assignment
(nova): TRACE:
2011-07-18 18:56:54,395 DEBUG nova.rpc [-] received {u'_msg_id': u'd0e74c04750b4e4b9eacdf40876682f0', u'_context_read_deleted': False, u'_context_request_id': u'VE-KSUQSY8P1SDGTMK7U', u'args': {u'instance_id': 9, u'vpn': False, u'project_id': u'ozone', u'instance_type_id': 2}, u'_context_is_admin': True, u'_context_timestamp': u'2011-07-18T18:56:51Z', u'_context_user': u'ant', u'method': u'allocate_for_instance', u'_context_project': u'ozone', u'_context_remote_address': None} from (pid=25770) process_data /usr/lib/pymodules/python2.6/nova/rpc.py:202
2011-07-18 18:56:54,395 DEBUG nova.rpc [-] unpacked context: {'timestamp': u'2011-07-18T18:56:51Z', 'msg_id': u'd0e74c04750b4e4b9eacdf40876682f0', 'remote_address': None, 'project': u'ozone', 'is_admin': True, 'user': u'ant', 'request_id': u'VE-KSUQSY8P1SDGTMK7U', 'read_deleted': False} from (pid=25770) _unpack_context /usr/lib/pymodules/python2.6/nova/rpc.py:451
2011-07-18 18:56:54,396 DEBUG nova.network.manager [VE-KSUQSY8P1SDGTMK7U ant ozone] network allocations for instance 9 from (pid=25770) allocate_for_instance /usr/lib/pymodules/python2.6/nova/network/manager.py:379
2011-07-18 18:56:54,407 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc.py", line 232, in _process_data
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 408, in allocate_for_instance
(nova): TRACE: return self.get_instance_nw_info(context, instance_id, type_id)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 438, in get_instance_nw_info
(nova): TRACE: fixed_ips = self.db.fixed_ip_get_by_instance(context, instance_id)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 376, in fixed_ip_get_by_instance
(nova): TRACE: return IMPL.fixed_ip_get_by_instance(context, instance_id)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 117, in wrapper
(nova): TRACE: return f(*args, **kwargs)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 798, in fixed_ip_get_by_instance
(nova): TRACE: raise exception.FixedIpNotFoundForInstance(instance_id=instance_id)
(nova): TRACE: FixedIpNotFoundForInstance: Instance 9 has zero fixed ips.
(nova): TRACE:
2011-07-18 18:56:54,416 ERROR nova.rpc [-] Returning exception Instance 9 has zero fixed ips. to caller

Rev. 1281

Related branches

Trey Morris (tr3buchet)
Changed in nova:
assignee: nobody → Trey Morris (tr3buchet)
Thierry Carrez (ttx)
Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
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.