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

Configure attributes for ohai to workaround empty node.platform_family #13

Merged
merged 2 commits into from Jan 15, 2014

Conversation

Projects
None yet
2 participants
@josacar
Contributor

josacar commented Jan 15, 2014

As the default behaviour doesn't include node.platform_family data, ChefSpec crashes when including build-essential recipe.

Cookbook Trace:
---------------
  /tmp/d20140115-14650-d4muwz/build-essential/recipes/default.rb:21:in `from_file'
  /tmp/d20140115-14650-d4muwz/dnsimple/recipes/default.rb:20:in `from_file'
Relevant File Content:
----------------------
/tmp/d20140115-14650-d4muwz/build-essential/recipes/default.rb:
 14:  # distributed under the License is distributed on an "AS IS" BASIS,
 15:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16:  # See the License for the specific language governing permissions and
 17:  # limitations under the License.
 18:  #
 19:  
 20:  begin
 21>>   include_recipe "build-essential::#{node['platform_family']}"
 22:  rescue Chef::Exceptions::RecipeNotFound
 23:    Chef::Log.warn "A build-essential recipe does not exist for the platform_family: #{node['platform_family']}"
 24:  end
 25:  

This tries to load build-essential::#{node['platform_family']} but fails when it's empty or nil.

dje added a commit that referenced this pull request Jan 15, 2014

Merge pull request #13 from josacar/master
Configure attributes for ohai to workaround empty node.platform_family

@dje dje merged commit 04ba4a2 into dnsimple:master Jan 15, 2014

1 check passed

default The Travis CI build passed
Details
@dje

This comment has been minimized.

Contributor

dje commented Jan 15, 2014

Thanks again @josacar

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