fixed_ip_associate or FixedIP tables looks broken

Bug #943029 reported by Nachi Ueno
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Maru Newby

Bug Description

I got error RemoteError: Remote error: AttributeError 'FixedIp' object has no attribute 'instance'
Form here
if fixed_ip_ref.instance is not None:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L996

There is no instance attribute on FixedIP model
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L701

And,also
if not fixed_ip_ref.network: looks wrong
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L999

- Error Log
2012-02-29 10:46:42 INFO nova.rpc.common [-] Connected to AMQP server on unagi221:5672
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/greenpool.py", line 80, in _spawn_n_impl
    func(*args, **kwargs)
  File "/opt/stack/nova/nova/rpc/__init__.py", line 69, in call
    return _get_impl().call(context, topic, msg, timeout)
  File "/opt/stack/nova/nova/rpc/impl_kombu.py", line 671, in call
    return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
  File "/opt/stack/nova/nova/rpc/amqp.py", line 336, in call
    rv = list(rv)
  File "/opt/stack/nova/nova/rpc/amqp.py", line 304, in __iter__
    raise result
RemoteError: Remote error: AttributeError 'FixedIp' object has no attribute 'instance'
[u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/rpc/amqp.py", line 250, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/opt/stack/nova/nova/network/manager.py", line 229, in _rpc_allocate_fixed_ip\n return self.allocate_fixed_ip(context, instance_id, network, **kwargs)\n', u' File "/opt/stack/nova/nova/network/manager.py", line 1665, in allocate_fixed_ip\n network[\'id\'])\n', u' File "/opt/stack/nova/nova/db/api.py", line 428, in fixed_ip_associate\n reserved)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 101, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 996, in fixed_ip_associate\n if fixed_ip_ref.instance is not None:\n', u"AttributeError: 'FixedIp' object has no attribute 'instance'\n"].

-CommitID

commit e5ad06a8be11041f271cb9f727deb109e0413410
Merge: 0b99bc2 3f42e11
Author: Jenkins <email address hidden>
Date: Tue Feb 28 20:48:09 2012 +0000

    Merge "Make scheduler filters more pluggable"

Changed in nova:
status: New → In Progress
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → essex-rc1
Maru Newby (maru)
Changed in nova:
assignee: nobody → Maru Newby (maru)
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/4824

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/4824
Committed: http://github.com/openstack/nova/commit/84114e426f3973d78fc0f6766f3ad7577349da7a
Submitter: Jenkins
Branch: master

commit 84114e426f3973d78fc0f6766f3ad7577349da7a
Author: Maru Newby <email address hidden>
Date: Thu Mar 1 20:55:53 2012 -0800

    Update fixed_ip_associate to not use relationships

     * fixed_ip_associate was using the FixedIp.instance and FixedIp.network
       relationships, which were removed. This change updates the method to
       use instance_id and network_id instead.
     * Adds unit tests for fixed_ip_associate
     * Resolves bug 943029

    Change-Id: I0829d110058b8799a520ab68b5fa1b2370b9cc3e

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