Nova-manage fixed list fails to return correct information

Bug #1025827 reported by Tong Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Tong Li

Bug Description

after delete a network, then create a network, command "nova-manage fixed list " should return a list with newly created IPs, but currently that command returns with an error message as follows:

"Command failed, please check log for more info"

Here are the steps to reproduce.

$ nova-manage version list
2012.2-dev (2012.2-LOCALBRANCH:LOCALREVISION)

devstack install (July 17, 2012).

$nova-manage fixed list
network IP address hostname host
10.0.0.0/24 10.0.0.0 None None
10.0.0.0/24 10.0.0.1 None None
10.0.0.0/24 10.0.0.2 None None
10.0.0.0/24 10.0.0.3 None None
10.0.0.0/24 10.0.0.4 None None
........

$nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
1 10.0.0.0/24 None 10.0.0.2 8.8.4.4 None None None 0440a6eb-9407-4aeb-a9db-05c38211ee0a

$nova-manage network delete 10.0.0.0/24

$nova-manage fixed list
network IP address hostname host
Command failed, please check log for more info

$ nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
Command failed, please check log for more info

$ nova-manage network create private --fixed_range_v4=10.0.0.0/24

$ nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
2 10.0.0.0/24 None 10.0.0.2 8.8.4.4 None None None 94f61850-cccf-457e-b17b-b521db03b9aa

this is expected.

$ nova-manage fixed list
nova-manage fixed list
network IP address hostname host
Command failed, please check log for more info

The fixes should be in file nova/bin/nova-manage, the logic of getting fixed IP list does not seem to be quite right especially when the fixed_ips table contains IPs marked as being deleted.

Tong Li (litong01)
description: updated
description: updated
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/9966

Changed in nova:
assignee: nobody → Tong Li (litong01)
status: New → In Progress
Revision history for this message
Tong Li (litong01) wrote :

The fixed has been submitted for review,
https://review.openstack.org/#/c/9966/

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

Reviewed: https://review.openstack.org/9967
Committed: http://github.com/openstack/nova/commit/458a5d61eac5eb5cef34ab301b67fa37271ba407
Submitter: Jenkins
Branch: master

commit 458a5d61eac5eb5cef34ab301b67fa37271ba407
Author: Tong Li <email address hidden>
Date: Wed Jul 18 11:26:12 2012 -0400

    fixes for nova-manage network list if network has been deleted

    this fix addresses the bug #1021810
    Currently command 'nova-manage network list' or
    'nova-manage fixed list' will return 'Command failed.' message when
    there is no network defined or networks get deleted. This fix combined
    with fixes to bug 1025827 will fix both command problem.
    also change the print out message so that it can be translated.
    code structure changes according to the suggestion from comments.

    Change-Id: Id9a1a10217aac971cbbba9db5829c8478892db1a

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

Reviewed: https://review.openstack.org/9966
Committed: http://github.com/openstack/nova/commit/7343f79cbe9ecc62f81a0170a182cb5363b6df24
Submitter: Jenkins
Branch: master

commit 7343f79cbe9ecc62f81a0170a182cb5363b6df24
Author: Tong Li <email address hidden>
Date: Thu Jul 19 18:13:28 2012 -0400

    Fixes nova-manage fixed list with deleted networks

    The fix addresses the bug reported in bug 1025827
    currently command 'nova-manage fixed list' will return
    'Command failed.' message when there is no network defined or
    all networks have been deleted or even when a network gets
    deleted, then a new network gets created. In all these cases,
    the command produces the 'Command failed.' error message which
    does not really tell what went wrong. This fix will produce
    'No fixed IP found' in these conditions.
    changes made for globalization.
    changes made for based on the comments for patchset 7.

    Change-Id: I3c2e9bf3fa3c748e680c1df27d243a648ed47cf5

Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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.