Oddity when trying to pull for chef-solo


#1

I have a chef solo script running in a %post section for an el6 install.
Sometimes, I am getting the error shown here:

http://bpaste.net/show/R2cqYYci3fLLZzpyWiiE/

But this isn’t reliably reproducible (doesn’t happen every time, nor always on
the same machine). No errors show up in log of the web server serving up the
files. Running the command again once I’ve logged on succeeds, although I’ve
gotten it to fail even then once.

Any ideas?

j


Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A


#2

It’s hard to say with specificity since we can’t see the attribute file
referenced in that traceback:

/var/tmp/chef-solo/cookbooks/holland/attributes/default.rb

Without seeing the cookbook in context I’d just be guessing … but
rather than stall you with the asymmetrical nature of email while
waiting for that information, I’ll hazard a guess:

There could be a logic error in either your backup cookbook or in the
JSON attribute object you’re passing at the command line.

Hope that helps point you in the right direction. If not, post some code
and I bet the list can help you out.

(also, in the spirit of deduplicating effort, note that there’s a couple
holland cookbooks out there already … )

On Mon, Aug 5, 2013 at 5:26 PM, Joshua J. Kugler joshua@azariah.com wrote:

I have a chef solo script running in a %post section for an el6 install.
Sometimes, I am getting the error shown here:

http://bpaste.net/show/R2cqYYci3fLLZzpyWiiE/

But this isn’t reliably reproducible (doesn’t happen every time, nor
always on
the same machine). No errors show up in log of the web server serving up
the
files. Running the command again once I’ve logged on succeeds, although
I’ve
gotten it to fail even then once.

Any ideas?

j


Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A


#3

Thanks for your reply.

Attached is the contents of said file.

No, this is not a recipe we use on a regular basis, but this is also not
something that just got added to our repo: it’s been in there a long time, and
this repo has worked on dozens of other machines. And the error doesn’t
happen every time, so I am not quite sure how to go about pinning down the
cause.

Thanks!

j

On Monday, August 05, 2013 21:21:24 steve . wrote:

It’s hard to say with specificity since we can’t see the attribute file
referenced in that traceback:

/var/tmp/chef-solo/cookbooks/holland/attributes/default.rb

Without seeing the cookbook in context I’d just be guessing … but
rather than stall you with the asymmetrical nature of email while
waiting for that information, I’ll hazard a guess:

There could be a logic error in either your backup cookbook or in the
JSON attribute object you’re passing at the command line.

Hope that helps point you in the right direction. If not, post some code
and I bet the list can help you out.

(also, in the spirit of deduplicating effort, note that there’s a couple
holland cookbooks out there already … )

On Mon, Aug 5, 2013 at 5:26 PM, Joshua J. Kugler joshua@azariah.com wrote:

I have a chef solo script running in a %post section for an el6 install.
Sometimes, I am getting the error shown here:

http://bpaste.net/show/R2cqYYci3fLLZzpyWiiE/

But this isn’t reliably reproducible (doesn’t happen every time, nor
always on
the same machine). No errors show up in log of the web server serving up
the
files. Running the command again once I’ve logged on succeeds, although
I’ve
gotten it to fail even then once.

Any ideas?

j


Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A

Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A


#4

Either node[:config] or node[:config][:holland] is nil at the time that
this attribute file’s being parsed on this particular Chef run on this
particular node. If you pull out the failed-run-data.json from the busted
node, you can probably determine which it is.

But y’know, it might be easier/“more correct” to simply assert it in that
attribute file…

So, a real simple deep-dive-troubleshooting-free fix might be adding this
line to the top of the attribute file:

node.default[:config] = Mash.new

Good luck! :smiley:

On Tue, Aug 6, 2013 at 9:30 AM, Joshua J. Kugler joshua@azariah.com wrote:

Thanks for your reply.

Attached is the contents of said file.

No, this is not a recipe we use on a regular basis, but this is also not
something that just got added to our repo: it’s been in there a long time,
and
this repo has worked on dozens of other machines. And the error doesn’t
happen every time, so I am not quite sure how to go about pinning down the
cause.

Thanks!

j

On Monday, August 05, 2013 21:21:24 steve . wrote:

It’s hard to say with specificity since we can’t see the attribute file
referenced in that traceback:

/var/tmp/chef-solo/cookbooks/holland/attributes/default.rb

Without seeing the cookbook in context I’d just be guessing … but
rather than stall you with the asymmetrical nature of email while
waiting for that information, I’ll hazard a guess:

There could be a logic error in either your backup cookbook or in the
JSON attribute object you’re passing at the command line.

Hope that helps point you in the right direction. If not, post some code
and I bet the list can help you out.

(also, in the spirit of deduplicating effort, note that there’s a couple
holland cookbooks out there already … )

On Mon, Aug 5, 2013 at 5:26 PM, Joshua J. Kugler joshua@azariah.com
wrote:

I have a chef solo script running in a %post section for an el6
install.

Sometimes, I am getting the error shown here:

http://bpaste.net/show/R2cqYYci3fLLZzpyWiiE/

But this isn’t reliably reproducible (doesn’t happen every time, nor
always on
the same machine). No errors show up in log of the web server
serving up

the
files. Running the command again once I’ve logged on succeeds, although
I’ve
gotten it to fail even then once.

Any ideas?

j


Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A

Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A