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

Update helper.rb #13

Merged
merged 3 commits into from Feb 20, 2014

Conversation

Projects
None yet
3 participants
@autrejacoupa
Contributor

autrejacoupa commented Feb 19, 2014

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

Update helper.rb
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

This comment has been minimized.

rs-cookbooks-ci commented Feb 19, 2014

Can one of the admins verify this patch?

@douglaswth

This comment has been minimized.

Contributor

douglaswth commented Feb 19, 2014

@rs-cookbooks-ci test this please

@douglaswth

This comment has been minimized.

Contributor

douglaswth commented Feb 19, 2014

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

Update ephemeral_lvm_helper_spec.rb
Update the test case to make sure Chef:Log return is not added to the list of devices.
@autrejacoupa

This comment has been minimized.

Contributor

autrejacoupa commented Feb 20, 2014

@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=#Mutex:0x00000003281a10>>>]]. 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

This comment has been minimized.

Contributor

douglaswth commented Feb 20, 2014

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

Update ephemeral_lvm_helper_spec.rb
Chef:Log:warn returns array, make sure that array is not part of device list.
@autrejacoupa

This comment has been minimized.

Contributor

autrejacoupa commented Feb 20, 2014

Done

@douglaswth

This comment has been minimized.

Contributor

douglaswth commented Feb 20, 2014

@rs-cookbooks-ci test this please

@douglaswth

This comment has been minimized.

Contributor

douglaswth commented Feb 20, 2014

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

douglaswth added a commit that referenced this pull request Feb 20, 2014

Merge pull request #13 from autrejacoupa/patch-1
fix_device_mapping should return nil where fixed_device does not match /dev/xvd. This should fix creating ephemeral for m2.2xlarge.

@douglaswth douglaswth merged commit de2d586 into rightscale-cookbooks:master Feb 20, 2014

1 check passed

default Merged build finished.
Details

@autrejacoupa autrejacoupa deleted the autrejacoupa:patch-1 branch Feb 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment