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

Update helper.rb #13

Closed autrejacoupa closed 10 years ago

autrejacoupa commented 10 years ago

fix_device_mapping should return nil where fixed_device does not match /dev/xvd. This should fix creating ephemeral for m2.2xlarge.

rs-cookbooks-ci commented 10 years ago

Can one of the admins verify this patch?

douglaswth commented 10 years ago

@rs-cookbooks-ci test this please

douglaswth commented 10 years ago

@autrejacoupa could you fix the spec so that it tests this behavior. I think it should be as easy as adding an and_return with whatever Chef::Log.warn might return to the "skips the devices that cannot be mapped" one.

autrejacoupa commented 10 years ago

@douglaswth regarding spec, not sure how to mock what Chef client on runtime was returning, which is /dev/xvdb and more stuff : ["/dev/xvdb", [#<Logger:0x00000003282000 progname=nil, level=2, default_formatter=...........mon_mutex=#>>>]]. I did change the spec "skips the devices that cannot be mapped" so that log output does not get into the array of return devices. Thanks

douglaswth commented 10 years ago

It looks like what Chef::Log.warn returns is an array, so could you have it just return an empty array instead?

autrejacoupa commented 10 years ago

Done

douglaswth commented 10 years ago

@rs-cookbooks-ci test this please

douglaswth commented 10 years ago

@rs-cookbooks-ci test this please, and don't fail for weird test-kitchen/vagrant bugs this time, please :frowning: