Skip to content

Instantly share code, notes, and snippets.

@slyness
Created August 27, 2014 23:11
Show Gist options
  • Select an option

  • Save slyness/b83c669010753154dcd3 to your computer and use it in GitHub Desktop.

Select an option

Save slyness/b83c669010753154dcd3 to your computer and use it in GitHub Desktop.
dns cookbook provider error
Recipe: dns::default
* ruby_block[Set dns name attribute] action run
- execute the ruby block Set dns name attribute
* dns[Node DNS entry] action create
================================================================================
Error executing action `create` on resource 'dns[Node DNS entry]'
================================================================================
ArgumentError
-------------
is not a recognized dns provider
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/dns/libraries/dns.rb:7:in `fog'
/var/chef/cache/cookbooks/dns/providers/default.rb:52:in `connection'
/var/chef/cache/cookbooks/dns/providers/default.rb:8:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/dns/recipes/default.rb
11: dns 'Node DNS entry' do
12: entry_name lazy{ node[:dns][:entry][:name] }
13: entry_value node[:dns][:entry][:value]
14: type node[:dns][:entry][:type]
15: not_if do
16: node[:dns][:disable] ||
17: begin
18: existing = Resolv::DNS.new(
19: :nameserver => File.readlines('/etc/resolv.conf').find_all{|s|
20: s.start_with?('nameserver')
21: }.map{|s|s.split.last}.uniq
22: ).getaddress(node[:dns][:entry][:name]).to_s
23: existing == node[:dns][:entry][:value]
24: rescue Resolv::ResolvError
25: false
26: end
27: end
28: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/dns/recipes/default.rb:11:in `from_file'
dns("Node DNS entry") do
provider "dnsimple"
action :create
retries 0
retry_delay 2
guard_interpreter :default
cookbook_name "dns"
recipe_name "default"
entry_name #<Chef::DelayedEvaluator:0x00000003ef3640@/var/chef/cache/cookbooks/dns/recipes/default.rb:12>
entry_value "50.56.187.93"
type "A"
credentials {"dnsimple_token"=>"8888988888888888", "dnsimple_key"=>"MY@EMAILACCOUNT.COM"}
not_if { #code block }
end
Running handlers:
[2014-08-27T23:09:43+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-08-27T23:09:43+00:00] ERROR: Exception handlers complete
[2014-08-27T23:09:43+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 13 resources updated in 31.534527438 seconds
[2014-08-27T23:09:44+00:00] ERROR: dns[Node DNS entry] (dns::default line 11) had an error: ArgumentError: is not a recognized dns provider
[2014-08-27T23:09:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment