Skip to content

Instantly share code, notes, and snippets.

@hughsaunders
Created August 6, 2013 13:51
Show Gist options
  • Save hughsaunders/6164599 to your computer and use it in GitHub Desktop.
Save hughsaunders/6164599 to your computer and use it in GitHub Desktop.
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/swift-private-cloud/recipes/admin-server.rb
================================================================================
ArgumentError
-------------
address family must be specified
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/osops-utils/libraries/ip_location.rb:92:in `new'
/var/chef/cache/cookbooks/osops-utils/libraries/ip_location.rb:92:in `get_if_ip_for_net'
/var/chef/cache/cookbooks/osops-utils/libraries/ip_location.rb:71:in `get_ip_for_net'
/var/chef/cache/cookbooks/swift-private-cloud/recipes/attr-remap.rb:68:in `from_file'
/var/chef/cache/cookbooks/swift-private-cloud/recipes/admin-server.rb:20:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/osops-utils/libraries/ip_location.rb:
85:
86: if !(nodeish.has_key?("osops_networks") and
87: nodeish["osops_networks"].has_key?(network)) then
88:
89: rcb_exit_error "Can't find network #{network}"
90: end
91:
92>> net = IPAddr.new(node["osops_networks"][network])
93: nodeish["network"]["interfaces"].each do |interface|
94: unless interface[1]['addresses'].nil?
95: interface[1]["addresses"].each do |k, v|
96: if v["family"] == "inet6" or v["family"] == "inet" then
97: addr=IPAddr.new(k)
98: if net.include?(addr) then
99: return [interface[0], k]
100: end
101: end
[2013-08-06T13:49:03+00:00] ERROR: Running exception handlers
[2013-08-06T13:49:03+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-08-06T13:49:03+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-08-06T13:49:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-08-06T13:49:03+00:00] FATAL: ArgumentError: address family must be specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment