Chef gem version mismatch?


#1

I have a client that tries to authenticate with the server, but it gets back a 500 response.

2010-06-24_18:25:00.78675 INFO: Starting Chef Run
2010-06-24_18:25:00.78676 DEBUG: Saving the current state of node cl1
2010-06-24_18:25:00.78676 DEBUG: Signing the request as cl1
2010-06-24_18:25:00.78677 DEBUG: String to sign: ‘Method:PUT
2010-06-24_18:25:00.78677 Hashed Path:e5Hk9FA6iAS0VzJrMFzzYkWiv80=
2010-06-24_18:25:00.78678 X-Ops-Content-Hash:eQH7iKxeglS00EOQ0zSCxWC4u6o=
2010-06-24_18:25:00.78678 X-Ops-Timestamp:2010-06-24T18:25:00Z
2010-06-24_18:25:00.78681 X-Ops-UserId:cl1’
2010-06-24_18:25:00.78682 Header hash: {“X-Ops-Content-Hash”=>“eQH7iKxeglS00EOQ0zSCxWC4u6o=”, “X-Ops-Authorization-1”=>“xhTtvc42mkv63D+JLTZTxFVhFIvIUYzqbJdWUBl0IP2UJ5LiPDGKMiGTawbU”, “X-Ops-Userid”=>“cl1”, “X-Ops-Sign”=>“version=1.0”, “X-Ops-Authorization-2”=>“5l7Y12kgPtnxqFHLmSDafssC+HQkH2YRvv4zKRITokWetAaJGr6tAp2HC9Em”, “X-Ops-Authorization-3”=>“ekzMNYYikvjcGFo0ZRsqambBUlUsLgYgH7eUyCZrEjN+tmtuL3BNA/Hd1nbI”, “X-Ops-Authorization-4”=>“5PKVqVNAk6liSwkDt3c66oZQXsJ9lGtguxHHYVFEbGHDi0//Gr429eKR1vAI”, “X-Ops-Authorization-5”=>“tKIp3fHpUNu2vmItFWYGjn8ZNHkhfqaLj6/BWwYzWlJD2Eb8PIUE7jIaiojA”, “X-Ops-Authorization-6”=>“Lzi7SBKmOXIePIw2phl17lawSUHAh5P5e8gPDr6ZMA==”, “X-Ops-Timestamp”=>“2010-06-24T18:25:00Z”}
2010-06-24_18:25:00.78683 DEBUG: Sending HTTP Request via PUT to XXX.com:4000/nodes/cl1
2010-06-24_18:25:00.78684 ERROR: Running exception handlers
2010-06-24_18:25:00.78684 ERROR: Exception handlers complete
2010-06-24_18:25:00.78685 ERROR: Re-raising exception: Net::HTTPFatalError - 500 "Internal Server Error"
2010-06-24_18:25:00.78685 /usr/lib/ruby/1.8/net/http.rb:2097:in error!' 2010-06-24_18:25:00.78686 /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:216:inapi_request’

This is what happens on the server side.

2010-06-24_18:25:00.77597 merb : worker (port 4000) ~ undefined method each' for nil:NilClass - (NoMethodError) 2010-06-24_18:25:00.77597 /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/lib/chef/node.rb:328:injson_create’

I do have a different version of the chef gem on the server and client, but I have lots of client machines with 0.9.0 and they seem to be just fine…

Any thoughts on what might be going on here?

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


#2

Hi,

Per the 0.9 notes:

Upgrading to 0.9 from 0.8 is a much smoother transition than from 0.7 to
0.8, but there are still some pitfalls to be aware of. First of all, 0.9
chef-clients can read from 0.8 servers, but cannot save to 0.8 servers.
0.8 chef-clients cannot read from 0.9 chef servers at all, so you will need
to upgrade your clients and server in lock-step.

Something tells me a 0.9 client will not work as intended (or, as we’ve
seen: at all) with a 0.8.10 server.

Regards,

AJ

On 25 June 2010 06:29, John Merrells john@merrells.com wrote:

I have a client that tries to authenticate with the server, but it gets
back a 500 response.

2010-06-24_18:25:00.78675 INFO: Starting Chef Run
2010-06-24_18:25:00.78676 DEBUG: Saving the current state of node cl1
2010-06-24_18:25:00.78676 DEBUG: Signing the request as cl1
2010-06-24_18:25:00.78677 DEBUG: String to sign: 'Method:PUT
2010-06-24_18:25:00.78677 Hashed Path:e5Hk9FA6iAS0VzJrMFzzYkWiv80=
2010-06-24_18:25:00.78678 X-Ops-Content-Hash:eQH7iKxeglS00EOQ0zSCxWC4u6o=
2010-06-24_18:25:00.78678 X-Ops-Timestamp:2010-06-24T18:25:00Z
2010-06-24_18:25:00.78681 X-Ops-UserId:cl1’
2010-06-24_18:25:00.78682 Header hash:
{“X-Ops-Content-Hash”=>“eQH7iKxeglS00EOQ0zSCxWC4u6o=”,
“X-Ops-Authorization-1”=>“xhTtvc42mkv63D+JLTZTxFVhFIvIUYzqbJdWUBl0IP2UJ5LiPDGKMiGTawbU”,
“X-Ops-Userid”=>“cl1”, “X-Ops-Sign”=>“version=1.0”,
“X-Ops-Authorization-2”=>“5l7Y12kgPtnxqFHLmSDafssC+HQkH2YRvv4zKRITokWetAaJGr6tAp2HC9Em”,
“X-Ops-Authorization-3”=>“ekzMNYYikvjcGFo0ZRsqambBUlUsLgYgH7eUyCZrEjN+tmtuL3BNA/Hd1nbI”,
“X-Ops-Authorization-4”=>“5PKVqVNAk6liSwkDt3c66oZQXsJ9lGtguxHHYVFEbGHDi0//Gr429eKR1vAI”,
“X-Ops-Authorization-5”=>“tKIp3fHpUNu2vmItFWYGjn8ZNHkhfqaLj6/BWwYzWlJD2Eb8PIUE7jIaiojA”,
“X-Ops-Authorization-6”=>“Lzi7SBKmOXIePIw2phl17lawSUHAh5P5e8gPDr6ZMA==”,
“X-Ops-Timestamp”=>“2010-06-24T18:25:00Z”}
2010-06-24_18:25:00.78683 DEBUG: Sending HTTP Request via PUT to
XXX.com:4000/nodes/cl1
2010-06-24_18:25:00.78684 ERROR: Running exception handlers
2010-06-24_18:25:00.78684 ERROR: Exception handlers complete
2010-06-24_18:25:00.78685 ERROR: Re-raising exception: Net::HTTPFatalError

  • 500 "Internal Server Error"
    2010-06-24_18:25:00.78685 /usr/lib/ruby/1.8/net/http.rb:2097:in error!' 2010-06-24_18:25:00.78686 /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:216:inapi_request’

This is what happens on the server side.

2010-06-24_18:25:00.77597 merb : worker (port 4000) ~ undefined method
each' for nil:NilClass - (NoMethodError) 2010-06-24_18:25:00.77597 /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/lib/chef/node.rb:328:injson_create’

I do have a different version of the chef gem on the server and client, but
I have lots of client machines with 0.9.0 and they seem to be just fine…

Any thoughts on what might be going on here?

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


#3

On Jun 24, 2010, at 2:34 PM, AJ Christensen wrote:

Per the 0.9 notes:

Upgrading to 0.9 from 0.8 is a much smoother transition than from 0.7 to 0.8, but there are still some pitfalls to be aware of. First of all, 0.9 chef-clients can read from 0.8 servers, but cannot save to 0.8 servers. 0.8 chef-clients cannot read from 0.9 chef servers at all, so you will need to upgrade your clients and server in lock-step.

Something tells me a 0.9 client will not work as intended (or, as we’ve seen: at all) with a 0.8.10 server.

rtfm i guess. so, ok, i’ll upgrade the server…

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


#4

On Jun 24, 2010, at 2:39 PM, John Merrells wrote:

On Jun 24, 2010, at 2:34 PM, AJ Christensen wrote:

Per the 0.9 notes:

Upgrading to 0.9 from 0.8 is a much smoother transition than from 0.7 to 0.8, but there are still some pitfalls to be aware of. First of all, 0.9 chef-clients can read from 0.8 servers, but cannot save to 0.8 servers. 0.8 chef-clients cannot read from 0.9 chef servers at all, so you will need to upgrade your clients and server in lock-step.

Something tells me a 0.9 client will not work as intended (or, as we’ve seen: at all) with a 0.8.10 server.

rtfm i guess. so, ok, i’ll upgrade the server…

So, yes, one needs the 0.9.0 server for the 0.9.0 client. It looks like I had a mix of 0.8.10 and 0.8.16 on my servers.

One curious thing is that when I upgraded the server all the cookbooks went missing. That foxed me for a while.

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


#5

From the release notes:

Another consequence of the new cookbook uploading and storage logic is that
you will need to re-upload your cookbooks after you upgrade your
chef-server.

For reference, the release notes are here:
http://blog.opscode.com/blog/2010/06/20/chef-0-9-0-and-ohai-0-5-6-released/

There is a section titled “Upgrading” in the release notes.

Hope that helps,
Barry

On Thu, Jun 24, 2010 at 4:01 PM, John Merrells john@merrells.com wrote:

On Jun 24, 2010, at 2:39 PM, John Merrells wrote:

On Jun 24, 2010, at 2:34 PM, AJ Christensen wrote:

Per the 0.9 notes:

Upgrading to 0.9 from 0.8 is a much smoother transition than from 0.7 to
0.8, but there are still some pitfalls to be aware of. First of all, 0.9
chef-clients can read from 0.8 servers, but cannot save to 0.8 servers.
0.8 chef-clients cannot read from 0.9 chef servers at all, so you will need
to upgrade your clients and server in lock-step.

Something tells me a 0.9 client will not work as intended (or, as we’ve
seen: at all) with a 0.8.10 server.

rtfm i guess. so, ok, i’ll upgrade the server…

So, yes, one needs the 0.9.0 server for the 0.9.0 client. It looks like I
had a mix of 0.8.10 and 0.8.16 on my servers.

One curious thing is that when I upgraded the server all the cookbooks went
missing. That foxed me for a while.

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


#6

Ah, that makes more sense, I was following this…

http://wiki.opscode.com/display/chef/Upgrading+Chef+0.8.x+RubyGems

john

On Jun 24, 2010, at 4:08 PM, Barry Steinglass wrote:

From the release notes:
Another consequence of the new cookbook uploading and storage logic is that you will need to re-upload your cookbooks after you upgrade your chef-server.

For reference, the release notes are here: http://blog.opscode.com/blog/2010/06/20/chef-0-9-0-and-ohai-0-5-6-released/

There is a section titled “Upgrading” in the release notes.

Hope that helps,
Barry

On Thu, Jun 24, 2010 at 4:01 PM, John Merrells john@merrells.com wrote:

On Jun 24, 2010, at 2:39 PM, John Merrells wrote:

On Jun 24, 2010, at 2:34 PM, AJ Christensen wrote:

Per the 0.9 notes:

Upgrading to 0.9 from 0.8 is a much smoother transition than from 0.7 to 0.8, but there are still some pitfalls to be aware of. First of all, 0.9 chef-clients can read from 0.8 servers, but cannot save to 0.8 servers. 0.8 chef-clients cannot read from 0.9 chef servers at all, so you will need to upgrade your clients and server in lock-step.

Something tells me a 0.9 client will not work as intended (or, as we’ve seen: at all) with a 0.8.10 server.

rtfm i guess. so, ok, i’ll upgrade the server…

So, yes, one needs the 0.9.0 server for the 0.9.0 client. It looks like I had a mix of 0.8.10 and 0.8.16 on my servers.

One curious thing is that when I upgraded the server all the cookbooks went missing. That foxed me for a while.

John


John Merrells
http://johnmerrells.com
+1.415.244.5808


John Merrells
http://johnmerrells.com
+1.415.244.5808