nova-network with multi-host and update_dns_entries crashes during instance termination

Bug #1427295 reported by Calvin Walton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Davanum Srinivas (DIMS)

Bug Description

I have Openstack Nova set up using nova-network in multi-host mode. I wanted all instances to be able to resolve each-other via dns, so I enabled update_dns_entries=True in nova.conf

Upon terminating an instance, I get the following traceback in nova-compute.log on the compute node hosting the instance:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
    incoming.message))

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
    result = getattr(endpoint, method)(ctxt, **new_args)

  File "/usr/lib/python2.7/dist-packages/nova/network/floating_ips.py", line 187, in deallocate_for_instance
    super(FloatingIP, self).deallocate_for_instance(context, **kwargs)

  File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 568, in deallocate_for_instance
    network_ids = [fixed_ip.network_id for fixed_ip in fixed_ips]

AttributeError: 'str' object has no attribute 'network_id'

Some spelunking reveals that this was introduced in the following commit:
https://github.com/openstack/nova/commit/03d34c975586788dc25249b5e0b962fc0634008c
which changed the "fixed_ips" array to contain a list of string ip address, rather than fixed_ip objects, but neglected to update the code under the CONF.update_dns_entries branch below to match.

Revision history for this message
Calvin Walton (kepstin) wrote :

A bit of further details - this is using the Ubuntu packages for Openstack juno on Ubuntu 14.04; the network type being used is FlatDHCPManager.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/160858

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Calvin, Thanks for the well written bug and the detective work :) please see if the review above helps.

Changed in nova:
importance: Undecided → Low
Matt Riedemann (mriedem)
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/160858
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f4c652949c9986af17637fb00276312798a270c4
Submitter: Jenkins
Branch: master

commit f4c652949c9986af17637fb00276312798a270c4
Author: Davanum Srinivas <email address hidden>
Date: Tue Mar 3 10:55:29 2015 -0500

    instance termination with update_dns_entries set fails

    In If9554a2e98397c5e63e929e1606d99dd2328262c, changed the "fixed_ips"
    array to contain a list of string ip address, rather than fixed_ip
    objects, but neglected to update the code under the
    CONF.update_dns_entries branch below to match. We need to
    build a list of unique network ids for update_dns_entries.

    Closes-Bug: #1427295
    Change-Id: I60e9148d1120d308d33d48a67912a595a3353d67

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-rc1 → 2015.1.0
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.