Problem with chef-client


#1

I’ve been building a few small recipes with chef, and am hitting a problem with
chef-client. I’ve got a recipe that configures the system as a NIS client, and
once I put an /etc/nsswitch.conf on the system that pointed to “files nis” for
passwd/group, the chef-client runs started failing on me:

[Tue, 18 Oct 2011 15:48:03 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:48:03 -0400] ERROR: Server returned error for
http://10.145.32.230:4000/nodes/i-925f4af2, retrying 1/5 in 3s
[Tue, 18 Oct 2011 15:48:07 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:48:07 -0400] ERROR: Server returned error for
http://10.145.32.230:4000/nodes/i-925f4af2, retrying 2/5 in 8s
[Tue, 18 Oct 2011 15:48:17 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:48:17 -0400] ERROR: Server returned error for
http://10.145.32.230:4000/nodes/i-925f4af2, retrying 3/5 in 15s
[Tue, 18 Oct 2011 15:48:34 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:48:34 -0400] ERROR: Server returned error for
http://10.145.32.230:4000/nodes/i-925f4af2, retrying 4/5 in 29s
[Tue, 18 Oct 2011 15:49:06 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:49:06 -0400] ERROR: Server returned error for
http://10.145.32.230:4000/nodes/i-925f4af2, retrying 5/5 in 53s
[Tue, 18 Oct 2011 15:50:01 -0400] INFO: HTTP Request Returned 500 Internal
Server Error: 400 “Bad Request”
[Tue, 18 Oct 2011 15:50:01 -0400] ERROR: Running exception handlers
[Tue, 18 Oct 2011 15:50:01 -0400] FATAL: Saving node information to
/var/chef/cache/failed-run-data.json
[Tue, 18 Oct 2011 15:50:01 -0400] ERROR: Exception handlers complete
[Tue, 18 Oct 2011 15:50:01 -0400] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Tue, 18 Oct 2011 15:50:01 -0400] FATAL: Net::HTTPFatalError: 500 “Internal
Server Error”

If I change /etc/nsswitch.conf so that it just looks to files, then the
chef-client runs cleanly, but will then fix nsswitch to use NIS for user
lookups, so subsequent runs will fail. I’m guessing that the problem is that
either there’s some sort of character in there that’s breaking things (we have
some European users, so there may well be some funky characters to account for
accents, umlauts, etc.), or else that the size of the data being pushed back is
too big. Is there a way to get chef/ohai to ignore the NIS users?

-Mike

steeves@raingods.net