Knife bootstrap http request too large issue


#1

Hi,

when i run a knife bootstrap for a new client the chef client get installed
and run for first time but i get this error FATAL:
Net::HTTPServerException: 413 “Request Entity Too Large”

i know the issue is with the ohai – i hae to disable passwd in client.rb

Is there a way to fix it in the bootstrap itself as of now what i do it i
run knife bootstrap then i got to my client machine add the line
Ohai::Config[:disabled_plugins] = [“passwd”, “rackspace”, “dmi”,
“dmi_common”]

in client.rb and then run chef-client again which fix the issue,

but its painful to do it on every new node.

Thanks
Manoj


#2

Hey Manoj,

When you run knife bootstrap it uses one of the bootstrap templates
herehttps://github.com/opscode/chef/tree/master/lib/chef/knife/bootstrap
(by
default “chef-full”) If you need to customize some aspect of the bootstrap
process – for example the contents of your client.rb – you can copy one
of those templates with a custom name to ~/.chef/bootstrap/ or
<chef_repo>/.chef/bootstrap/ and use the–distro flag to specify your new
template name when you bootstrap.

You can see also how chef builds up the client.rb file
herehttps://github.com/opscode/chef/blob/master/lib/chef/knife/core/bootstrap_context.rb#L63-L90

–Matt Moretti

On Thu, Oct 31, 2013 at 2:24 AM, Manoj Thakkar manoj.thakkar@gmail.comwrote:

Hi,

when i run a knife bootstrap for a new client the chef client get
installed and run for first time but i get this error FATAL:
Net::HTTPServerException: 413 “Request Entity Too Large”

i know the issue is with the ohai – i hae to disable passwd in client.rb

Is there a way to fix it in the bootstrap itself as of now what i do it i
run knife bootstrap then i got to my client machine add the line
Ohai::Config[:disabled_plugins] = [“passwd”, “rackspace”, “dmi”,
“dmi_common”]

in client.rb and then run chef-client again which fix the issue,

but its painful to do it on every new node.

Thanks
Manoj