Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EBS volume clean up #172

Closed
t5unamie opened this issue Dec 18, 2013 · 3 comments
Closed

EBS volume clean up #172

t5unamie opened this issue Dec 18, 2013 · 3 comments

Comments

@t5unamie
Copy link

When I restart my machine in opsworks. (Shutdown and then start up)

It reruns the elasticsearch:ebs cookbook and recreates the volume even thow it had already existed.

Is this intended behaviour? I can't see any check to confirm if the volume exists with in the code to simply remount it or attach it if it exists.

https://github.com/elasticsearch/cookbook-elasticsearch/blob/master/libraries/create_ebs.rb

Or am I just blind?

Also, when I set "delete_on_termination" : true, it does not delete the EBS volume when I delete the instance from the opsworks console.

I am also confused by the example for the ebs device location given in https://github.com/elasticsearch/cookbook-elasticsearch/blob/master/attributes/data.rb.

Why is the device name stated under bother device and ebs?

from what I have seen if you set it under devices. It will mount it on the Ec2 instance using the code you porovided. However it doesn't format that location. It will only format the location if the elasticsearch recipe is run after the ebs occurs.

@karmi
Copy link
Contributor

karmi commented Dec 19, 2013

I can't see any check to confirm if the volume exists with in the code to simply remount it or attach it if it exists.

The same volume shouldn't be created "twice".

when I set "delete_on_termination" : true, it does not delete the EBS volume when I delete the instance from the opsworks console.

This is a problem in Fog (fog/fog#1737) which I still haven't had time to solve.

@t5unamie
Copy link
Author

Thanks Karmi,

PS. This happens if you don't select EBS backed instances. As the code checd if the dev location exists on the local system. Which it won't if it's not EBS backed.

Would it be wise to change the check to a tag search and reattach the same one if the EBS is not mounted?

@martinb3
Copy link
Contributor

martinb3 commented Jul 6, 2015

Hello! We've re-written the cookbook from the ground up, and we decided it would be better to leave EBS volume creation to the AWS chef cookbook. Please give that one a try and/or report this bug to them, as I don't think we'll be adding the EBS functionality back in. Thank you!

@martinb3 martinb3 closed this as completed Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants