I tried this link to set up a Chef Server, workstation and nodes. While bootstrapping a new node from a workstation to install a client on that node, I got the below error:
Chef Client failed. 0 resources updated in 14 seconds [2016-04-18T08:46:31+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2016-04-18T08:46:31+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2016-04-18T08:46:31+00:00] ERROR: 413 "Request Entity Too Large" [2016-04-18T08:46:31+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
This is my bootstrap command:
knife bootstrap server_name -x username -P password --sudo --use-sudo-password
I added Ohai::Config[:disabled_plugins] = ["passwd"] to /etc/chef/client.rb file on the node and re-ran the command from workstation but got the same error. Can someone help me with this?
Thanks in advance.
2 Answers
Answers 1
The knife bootstrap
command overwrites the whole client.rb
config every time you run it. You would either have to make a new bootstrap template including that snippet (if you're planning to do this one a large number of machines) or let it fail, edit the config, and then run sudo chef-client
on the machine to let it register.
Answers 2
If you're using Che-12.8.1 or later you can utilize the knife bootstrap client.d feature:
You should be able to create a file named .chef/bootstrap/client.d/disabled_plugins.rb
with the line:
Ohai::Config[:disabled_plugins] = ["passwd"]
If you're using the chef-client cookbook to manage your chef-client config during the run you'll need to watch your run to make sure those aren't getting into a fight and that the cookbook doesn't helpfully remove that file and re-run ohai and balloon your node size (I haven't played with this so don't know either way).
0 comments:
Post a Comment