rightscale-cookbooks / ephemeral_lvm

Configures available ephemeral devices on a cloud server
http://community.opscode.com/cookbooks/ephemeral_lvm
Other
13 stars 16 forks source link

misleading error message when EC2 node doesn't have ephemeral block devices #2

Closed juliandunn closed 8 years ago

juliandunn commented 10 years ago

Some EC2 instances don't have ephemeral block devices assigned at all, so there is no key node['ec2']['block_device_mapping_ephemeral']. Thus, this error message is misleading when the "else" code path is reached:

https://github.com/rightscale-cookbooks/ephemeral_lvm/blob/master/libraries/helper.rb#L73

arangamani commented 10 years ago

@juliandunn Thanks for reaching out to us. What instance type were you using?

juliandunn commented 10 years ago

@arangamani I used an m1.small, and curiously, although it's supposed to have instance storage, it didn't. I even curl'd the metadata API to make sure.

ryancragun commented 10 years ago

@juliandunn m1.small should have one 160GB ephemeral device attached no matter what. I know that if you use an EBS backed image only one ephemeral device will be attached unless you specify that you want the others attached on launch time, but that should affect an m1.small. I think it might not be properly detected because of the bug fixed in https://github.com/rightscale-cookbooks/ephemeral_lvm/pull/4

rshade commented 8 years ago

@juliandunn Is this still a problem?

juliandunn commented 8 years ago

Nah it's cool, I figured it out. Even though these instances have ephemeral devices assigned by default you still have to ask EC2 to attach them. I started up an m3.medium today and the cookbook works as expected. Thanks!

rshade commented 8 years ago

Thank you for validating.