euca-terminate-instances fails to remove instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I get the following exception:
2010-08-04 11:42:36+0100 [-] (root): INFO Deleting instance files at /home/openstack
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/
result = f(*args, **kw)
File "/home/
File "/usr/lib/
File "/usr/lib/
--- <exception caught here> ---
File "/usr/lib/
File "/home/
File "/home/
File "/usr/lib/
File "/usr/lib/
names = os.listdir(path)
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-
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
2010-08-04 11:50:28+0100 [-] (root): INFO Destroying datamodel for Instance i-09mdf4sw
and the directory being removed under 'instances'
Changed in nova: | |
status: | Fix Committed → Fix Released |
description: | updated |
The current code in LibvirtConnecti on._cleanup( ) is:
def _cleanup(self, instance): join(FLAGS. instances_ path, instance['name'])
logging. info('instance %s: deleting instance files %s',
instance[ 'name'] , target) exists( target) :
shutil. rmtree( target)
target = os.path.
if os.path.
Would you mind double-checking to see if this problem still exists, please, as it looks like the fix (checking for target directory existence before calling shutil.rmtree) is in trunk. Thanks!