← Back to team overview

registry team mailing list archive

[Bug 613383] [NEW] euca-terminate-instances fails to remove instance

 

Public bug reported:

I get the following exception:

2010-08-04 11:42:36+0100 [-] (root): INFO Deleting instance files at /home/openstack/openstack/nova/data/instances/i-09mdf4sw
2010-08-04 11:42:36+0100 [-] Unhandled error in Deferred:
2010-08-04 11:42:36+0100 [-] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 117, in maybeDeferred
            result = f(*args, **kw)
          File "/home/openstack/openstack/nova/trunk/nova/virt/libvirt_conn.py", line 102, in _wait_for_shutdown
            d.callback(None)
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 280, in callback
            self._startRunCallbacks(result)
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 354, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 371, in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File "/home/openstack/openstack/nova/trunk/nova/virt/libvirt_conn.py", line 87, in <lambda>
            d.addCallback(lambda _: self._cleanup(instance))
          File "/home/openstack/openstack/nova/trunk/nova/virt/libvirt_conn.py", line 111, in _cleanup
            shutil.rmtree(target)
          File "/usr/lib/python2.6/shutil.py", line 208, in rmtree
            onerror(os.listdir, path, sys.exc_info())
          File "/usr/lib/python2.6/shutil.py", line 206, in rmtree
            names = os.listdir(path)
        exceptions.OSError: [Errno 2] No such file or directory: '~/openstack/nova/data/instances/i-09mdf4sw'

When the directory of the instance I am trying to terminate no longer
exist (or has never been created due to errors on startup). However,
euca-describe-instances still shows the instance in the list. In order
to work this around (and remove the instance from the list) I create an
empty directory under 'instances' and launch euca-terminate-instances
again. I then get the following output:

2010-08-04 11:50:28+0100 [-] (root): DEBUG Got told to terminate instance i-09mdf4sw
2010-08-04 11:50:28+0100 [-] (root): DEBUG Finished init of Instance with id of i-09mdf4sw
2010-08-04 11:50:28+0100 [-] (root): INFO Deleting instance files at /home/openstack/openstack/nova/data/instances/i-09mdf4sw
2010-08-04 11:50:28+0100 [-] (root): INFO Destroying datamodel for Instance i-09mdf4sw

and the directory being removed under 'instances'

** Affects: nova
     Importance: Undecided
         Status: New

-- 
euca-terminate-instances fails to remove instance
https://bugs.launchpad.net/bugs/613383
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.



Follow ups

References