rightscale-cookbooks / ephemeral_lvm

Configures available ephemeral devices on a cloud server

Home Page:http://community.opscode.com/cookbooks/ephemeral_lvm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

juliandunn opened this issue · comments

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

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

@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.

@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 #4

@juliandunn Is this still a problem?

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!

Thank you for validating.