exception when deleting a port with gateway_ip

Bug #1032506 reported by dan wendlandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
dan wendlandt

Bug Description

2012-08-02 23:21:06 DEBUG [quantum.db.db_base_plugin_v2] Gateway address (10.0.0.1/c2e2a2e4-3241-4763-9605-c4c41caf2ada) is not recycled
2012-08-02 23:21:06 ERROR [quantum.api.v2.resource] delete failed
Traceback (most recent call last):
  File "/opt/stack/quantum/quantum/api/v2/resource.py", line 95, in resource
    result = method(request=request, **args)
  File "/opt/stack/quantum/quantum/api/v2/base.py", line 250, in delete
    obj_deleter(request.context, id)
  File "/opt/stack/quantum/quantum/db/db_base_plugin_v2.py", line 845, in delete_port
    context.session.delete(port)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 391, in __exit__
    self.commit()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 313, in commit
    self._prepare_impl()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 297, in _prepare_impl
    self.session.flush()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush
    self._flush(objects)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush
    flush_context.execute()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute
    rec.execute(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 428, in execute
    self.dependency_processor.process_deletes(uow, states)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/dependency.py", line 522, in process_deletes
    uowcommit, False)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/dependency.py", line 567, in _synchronize
    sync.clear(dest, self.mapper, self.prop.synchronize_pairs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/sync.py", line 50, in clear
    (r, mapperutil.state_str(dest))
AssertionError: Dependency rule tried to blank-out primary key column 'ipallocations.port_id' on instance '<IPAllocation at 0x28d4650>'

dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → High
assignee: nobody → dan wendlandt (danwent)
milestone: none → folsom-3
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

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

Reviewed: https://review.openstack.org/11048
Committed: http://github.com/openstack/quantum/commit/bcde97b48552072bda453e08f6a5c669b2838c05
Submitter: Jenkins
Branch: master

commit bcde97b48552072bda453e08f6a5c669b2838c05
Author: Dan Wendlandt <email address hidden>
Date: Wed Aug 8 15:30:48 2012 -0700

    fix missing deallocation of gateway ip

    bug 1032506

    when deleting a port that uses the gateway IP, we were not removing
    the IPAllocation entry, which resulted in a depedency issue when we
    deleted the port that the IPAllocation entry referenced.

    Change-Id: I272a6572c389ef8c12585f4b62204f5877cda078

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