When a floating IP is associated with an instance, nova-manage floating list fails

Bug #758975 reported by Kevin Bringard
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Tran

Bug Description

Similar to bug 701216 (https://bugs.launchpad.net/nova/+bug/701216), when attempting to list addresses using nova-manage floating list, an error is returned:

AttributeError: 'Instance' object has no attribute 'ec2_id'

Based on 701216, it seems that the attribute ec2_id should be changed to just id. The full stack trace is below:

2011-04-12 10:11:50,602 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.pyc'> from (pid=23596) __get_backend /usr/lib/pymodules/python2.6/nova/utils.py:427
2011-04-12 10:11:50,681 CRITICAL nova [-] 'Instance' object has no attribute 'ec2_id'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 1122, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 1111, in main
(nova): TRACE: fn(*argv)
(nova): TRACE: File "/usr/bin/nova-manage", line 509, in list
(nova): TRACE: instance = floating_ip['fixed_ip']['instance']['ec2_id']
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/models.py", line 74, in __getitem__
(nova): TRACE: return getattr(self, key)
(nova): TRACE: AttributeError: 'Instance' object has no attribute 'ec2_id'
(nova): TRACE:

Related branches

Revision history for this message
Hugo Kou (tonytkdk) wrote :

RESERVATION r-0yy4ypyf amipro default
INSTANCE i-00000030 ami-00000011 192.168.2.3 192.168.2.3 running ami1 (amipro, ubuntu3) 0 m1.tiny 2011-04-26T11:52:10Z nova

root@ubuntu1:~# nova-manage floating list
ubuntu2 192.168.2.101 None
ubuntu2 192.168.2.102 None
ubuntu2 192.168.2.103 None
ubuntu2 192.168.2.104 None
ubuntu2 192.168.2.100 None

root@ubuntu1:~# euca-associate-address -i i-00000030 192.168.2.101
ADDRESS 192.168.2.101 i-00000030

root@ubuntu1:~# nova-manage floating list
Command failed, please check log for more info

=================
log is same as Kevin Bringard

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → In Progress
Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 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.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.