Floating IPs don't have instance ids in Juno

Bug #1380965 reported by Björn Tillenius
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Matt Riedemann
Juno
Fix Released
Undecided
Unassigned
nova (Ubuntu)
Fix Released
High
Unassigned

Bug Description

In Icehouse, when I associate a floating IP with an instance, the Nova API for listing floating IPs (/os-floating-ips) gives you the instance ID of the associated instance:

  {"floating_ips": [{"instance_id": "82c2aff3-511b-4e9e-8353-79da86281dfd", "ip": "10.1.151.1", "fixed_ip": "10.10.0.4", "id": "8113e71b-7194-447a-ad37-98182f7be80a", "pool": "ext_net"}]}

With latest rc for Juno, the instance_id always seem to be null:

  {"floating_ips": [{"instance_id": null, "ip": "10.96.201.0", "fixed_ip": "10.10.0.8", "id": "00ffd9a0-5afe-4221-8913-7e275da7f82a", "pool": "ext_net"}]}

Tags: api
Revision history for this message
James Page (james-page) wrote :

Confirmed:

ubuntu@james-page-bastion:~/openstack-charm-testing⟫ nova floating-ip-list
+------------+-----------+--------------+---------+
| Ip | Server Id | Fixed Ip | Pool |
+------------+-----------+--------------+---------+
| 10.5.150.1 | - | 192.168.21.2 | ext_net |
+------------+-----------+--------------+---------+
ubuntu@james-page-bastion:~/openstack-charm-testing⟫ nova list
+--------------------------------------+------+--------+------------+-------------+----------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+----------------------------------+
| 47d46f8f-cdcc-4aa8-b6ac-b8033f6d4968 | test | ACTIVE | - | Running | private=192.168.21.2, 10.5.150.1 |
+--------------------------------------+------+--------+------------+-------------+----------------------------------+

Revision history for this message
James Page (james-page) wrote :

Looks like the structure of the fixed_ip data in the underlying view has change a little; working a fix now.

Changed in nova (Ubuntu):
status: New → Confirmed
tags: added: juno-rc-potential
Changed in nova:
assignee: nobody → James Page (james-page)
Changed in nova (Ubuntu):
importance: Undecided → High
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/128293

Changed in nova:
status: New → In Progress
Revision history for this message
James Page (james-page) wrote :

Hmm - I note that this behaviour was changed in https://bugs.launchpad.net/nova/+bug/1356051; my propose fix reverts some of that which seems wrong.

Thierry Carrez (ttx)
tags: added: juno-backport-potential
removed: juno-rc-potential
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nova - 1:2014.2-0ubuntu1

---------------
nova (1:2014.2-0ubuntu1) utopic; urgency=medium

  [ Chuck Short ]
  * New upstream release.

  [ James Page ]
  * d/p/neutron-floating-ip-list.patch: Cherry pick proposed fix for
    missing server uuids in floating-ip-list when using neutron networking
    (LP: #1380965).
 -- Chuck Short <email address hidden> Thu, 16 Oct 2014 13:44:25 -0400

Changed in nova (Ubuntu):
status: Confirmed → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: James Page (james-page) → Matt Riedemann (mriedem)
Revision history for this message
Matt Riedemann (mriedem) wrote :
tags: added: api network
tags: added: icehouse-backport-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :

Nevermind, not a problem in stable/icehouse because of this:

https://github.com/openstack/nova/blob/stable/icehouse/nova/api/openstack/compute/contrib/floating_ips.py#L109

So was regressed in stable/juno, and I was on the review that regressed it, damn.

tags: removed: icehouse-backport-potential network
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 48c24dbb6bc1e55973dce2b8bc3e74105b0020ce
Author: Matt Riedemann <email address hidden>
Date: Tue Jan 6 09:11:24 2015 -0800

    Return floating_ip['fixed_ip']['instance_uuid'] from neutronv2 API

    The os-floating-ips extension translates the floating IP information
    from the network API for the response but is only checking fields based
    on what comes back from nova-network, which is using the FloatingIP
    object. The neutronv2 API returns a different set of keys for the
    instance/instance_uuid which the API extension doesn't handle and
    therefore doesn't show the associated instance id for a given floating
    IP.

    The network APIs should return consistent data formats so this change
    adds the expected key to fix the bug in the API extension (since the API
    extensions shouldn't have to know the implementation details of the
    network API, there are some extensions actually checking if it's the
    neutron API and parsing the result set based on that).

    This change will be used to backport the fix to the stable branches.

    The longer term fix is to convert the neutronv2 get_floating_ip* API
    methods to use nova objects which will be done as part of blueprint
    kilo-objects in a separate change.

    Closes-Bug: #1380965

    Change-Id: I01df2096ced51eb9ebfd994cf8397f2fa094f6e3

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/145374

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by James Page (<email address hidden>) on branch: master
Review: https://review.openstack.org/128293
Reason: Alternative solution in progress...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/juno)

Reviewed: https://review.openstack.org/145374
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d9bcfab1e9310d6fa6aa4d060bec59c741e12ca4
Submitter: Jenkins
Branch: stable/juno

commit d9bcfab1e9310d6fa6aa4d060bec59c741e12ca4
Author: Matt Riedemann <email address hidden>
Date: Tue Jan 6 09:11:24 2015 -0800

    Return floating_ip['fixed_ip']['instance_uuid'] from neutronv2 API

    The os-floating-ips extension translates the floating IP information
    from the network API for the response but is only checking fields based
    on what comes back from nova-network, which is using the FloatingIP
    object. The neutronv2 API returns a different set of keys for the
    instance/instance_uuid which the API extension doesn't handle and
    therefore doesn't show the associated instance id for a given floating
    IP.

    The network APIs should return consistent data formats so this change
    adds the expected key to fix the bug in the API extension (since the API
    extensions shouldn't have to know the implementation details of the
    network API, there are some extensions actually checking if it's the
    neutron API and parsing the result set based on that).

    This change will be used to backport the fix to the stable branches.

    The longer term fix is to convert the neutronv2 get_floating_ip* API
    methods to use nova objects which will be done as part of blueprint
    kilo-objects in a separate change.

    Conflicts:
            nova/tests/unit/network/test_neutronv2.py

    NOTE(mriedem): The conflict is due to the test modules being
    moved in Kilo, otherwise the code is the same.

    Closes-Bug: #1380965

    Change-Id: I01df2096ced51eb9ebfd994cf8397f2fa094f6e3
    (cherry picked from commit 48c24dbb6bc1e55973dce2b8bc3e74105b0020ce)

tags: added: in-stable-juno
Chuck Short (zulcss)
Changed in nova:
milestone: none → 2014.2.2
Chuck Short (zulcss)
Changed in nova (Ubuntu):
status: Fix Released → Fix Committed
Chuck Short (zulcss)
Changed in nova (Ubuntu):
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: in-stable-juno juno-backport-potential
Changed in nova:
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.