hw-cookbooks / lxc

Linux Containers via Chef
58 stars 49 forks source link

Use Chef::Config to get the default secret file #35

Closed aespinosa closed 11 years ago

aespinosa commented 11 years ago

Fixes undefined constant problems with Chef 11.6.0 upon convergence.

Fixes Chef not being able to fine the constant as shown in https://gist.github.com/aespinosa/6097207

portertech commented 11 years ago

Hmm, what if the LXC host doesn't specify a secret file path?

StephenKing commented 11 years ago

Then the default is used? See CHEF-4011

moved default encrypted data bag secret file path to Chef::Config[:encrypted_data_bag_secret]

+1 for this PR, works for me

aespinosa commented 11 years ago

Thanks @StephenKing for the feedback. To b honest though, I didn't test this with versions of chef prior to 11.6.0

chrisroberts commented 11 years ago

:+1: @StephenKing thanks for the link back to the ticket. Changeset shows that there won't be any issue here since it will just fall back to the constant if the config isn't in use (since it will just be a nil). @aespinosa I'll be cherry-picking this into develop. Thanks!

aespinosa commented 11 years ago

Thanks @chrisroberts

sorry i wasn't aware of the develop branch. i'll take note of this in future pull requsts

chrisroberts commented 11 years ago

Applied in latest release. Thanks!