Cannot delete when there are no fixed ips available

Bug #1192893 reported by Yufang Zhang on 2013-06-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Yufang Zhang

Bug Description

After failing to create an instance due to no more fixed ips available, I try to delete the instance in error state. The instance cannot be deleted, and Traceback shows in the log:

s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m rval = self.proxy.dispatch(ctxt, version, method, **args)s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return getattr(proxyobj, method)(ctxt, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m temp_level, payload)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m self.gen.next()
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return function(self, context, instance_uuid, *args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m do_terminate_instance()
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m retval = f(*args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m self._delete_instance(context, instance)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m self._shutdown_instance(context, instance)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m instance)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m res = f(self, context, *args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return self._get_instance_nw_info(context, instance)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return _get_impl().call(cfg.CONF, context, topic, msg, timeout)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m rpc_amqp.get_connection_pool(conf, Connection))
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m rv = list(rv)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00mTraceback (most recent call last):
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m rval = self.proxy.dispatch(ctxt, version, method, **args)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return getattr(proxyobj, method)(ctxt, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return func(self, context, *args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 1017, in get_instance_nw_info
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m rxtx_factor, host)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 1038, in build_network_info_model
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m instance_host)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 1126, in _get_subnets_from_network
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m instance_host)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/utils.py", line 679, in inner
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m retval = f(*args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 808, in _get_dhcp_ip
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m host=host)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/db/api.py", line 434, in fixed_ip_associate_pool
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m instance_id, host)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 113, in wrapper
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m return f(*args, **kwargs)
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 1032, in fixed_ip_associate_pool
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m raise exception.NoMoreFixedIps()
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00mNoMoreFixedIps: Zero fixed ips available.
s2013-06-20 17:53:30 TRACE nova.openstack.common.rpc.amqp ^[[01;35m^[[00m
                                                                                                                           107,1 98

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

Changed in nova:
assignee: nobody → Yufang Zhang (yufang521247)
status: New → In Progress
Yufang Zhang (yufang521247) wrote :

Steps to reproduce:

1. Create a network
2. Reserve all fixed ips of the network
3. Try to create an instance but failed
4. Try to delete the instance

Results:
Cannot delete the instance due to the 'NoMoreFixedIps' exception.

Reviewed: https://review.openstack.org/33796
Committed: http://github.com/openstack/nova/commit/3d27a0e74bde3878af76414dc4020ac6f9f24e4e
Submitter: Jenkins
Branch: master

commit 3d27a0e74bde3878af76414dc4020ac6f9f24e4e
Author: Yufang Zhang <email address hidden>
Date: Thu Jun 20 18:17:49 2013 +0800

    Handle NoMoreFixedIps in _shutdown_instance.

    Bug 1192893

    If no fixed ips is found, continue to perform the rest of the instance
    shutdown, instead of propogating the exception.

    Steps to reproduce:
    1. Create a network
    2. Reserve all fixed ips of the network
    3. Try to create an instance but failed
    4. Try to delete the instance

    Results:
    Cannot delete the instance due to the 'NoMoreFixedIps' exception.

    Change-Id: I42776c427773f1f81c16062a9aaa54850ec68bfd

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-07-17
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in nova:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers