Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

boto.ec2.connection.delete_volume() does not work #3316

Open
hasnainv opened this issue Aug 24, 2015 · 2 comments
Open

boto.ec2.connection.delete_volume() does not work #3316

hasnainv opened this issue Aug 24, 2015 · 2 comments

Comments

@hasnainv
Copy link

After waiting for an instance to be terminated, I call boto.ec2.connection.delete_volume() on its associated volume, but this does not do anything. I have to manually delete the volume from the web interface.

@srri-zz
Copy link
Contributor

srri-zz commented Aug 24, 2015

Hi @hasnainv,
What version of python and boto are you using?
Do you get any error back?
Do you have example code to recreate this issue?

@hasnainv
Copy link
Author

Boto version is 2.34.0. Python version is 2.7.5

My code:

from boto import ec2
conn = ec2.connect_to_region(opts.region)
vols = conn.get_all_volumes(filters={'attachment.instance-id': instance_ids})

for volume in vols:
conn.delete_volume(volume.id)

I double check in the web interface that all the volumes in vols exist.
Here, conn.delete_volume(volume.id) throws no exception or error messages. It just doesn't delete the volume.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants