Add a fixed IP to an instance failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
jichenjc | ||
Juno |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
+------
| ID | Label | CIDR |
+------
| be95de64-
| 0fd904f5-
| 7cd88ead-
+------
nova add-fixed-ip test15 0fd904f5-
failed with following logs
2014-03-19 03:29:30.546 7822 ERROR nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
2014-03-19 03:29:30.546 7822 TRACE nova.openstack.
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-1 → 2015.1.0 |
I am not using latest code (about 1-2 month) before
but I reviewed latest code and found same logic still exist
root cause is
def allocate_ fixed_ip( self, context, instance_id, network, **kwargs):
try to get an vif but it's not created yet
vif = vif_obj. VirtualInterfac e.get_by_ instance_ and_network(
context, instance_id, network['id'])
since objects/ virtual_ interface. py may return a NULL point
@base.remotable _classmethod instance_ and_network( cls, context, instance_uuid, network_id): interface_ get_by_ instance_ and_network( context,
instance_ uuid, network_id) db_object( context, cls(), db_vif)
def get_by_
db_vif = db.virtual_
if db_vif:
return cls._from_