[chef] Re: Re: Re: Re: how to log-in to chef-server and create role normally?


Chronological Thread 
  • From: Ilya Maltsev < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: how to log-in to chef-server and create role normally?
  • Date: Wed, 07 Dec 2011 16:05:21 +0400

Spice log on POST query:

--- &id001 !str 
str: "{\"error\":[\"undefined method `name' for nil:NilClass\"]}"
"@args": 
  :method: :post
  :headers: 
    X-Ops-Content-Hash: k34CTSdz74bNt+5p/RFtYDJsoDI=
    X-Ops-Authorization-1: 
S8s3M7rdabSuu/hIoW/9a5RQsCpcMUi7sTLCZRWjxcb6B+Ng7RlTtPQxDbCp
    X-Ops-Userid: ilya-desktop
    X-Ops-Sign: version=1.0
    X-Ops-Authorization-2: 
+deLlWM6S+CPdcDG8b/JfsGQZ8r/axjkgUlXtTbIzNKbNLyHXFK/xXzktzgJ
    Content-Type: application/json
    X-Ops-Authorization-3: 
HYBQ8GsxrU5efWTuJsDNDVgOX7CWvcuXUPQlshdcXh3Rj5BF/nT3IVIqSE3j
    X-Chef-Version: 0.10.4
    Content-Length: "20"
    X-Ops-Authorization-4: 
UbCug/pbk+rhqoZjgub8xezbim6oYeCYQPdePs5PBONpkh2wcrpwxUwVEhzE
    X-Ops-Authorization-5: 
Ri0i4SI/s/3Kl2c/DY913qh3kQIf9QZ+pZnJJFh37wJ6DOKHoeLcwyWzrpiT
    Accept: application/json
    X-Ops-Authorization-6: 65DZbr4SVyqT4g8JoFWcHRfid+gsQGSBXnYn5yh5XQ==
    X-Ops-Timestamp: "2011-12-07T12:03:28Z"
    :host: 10.1.6.106:4000
  :url: http://10.1.6.106:4000/roles
  :payload: "{\"name\":\"spicehren\"}"
"@code": 500
"@net_http_res": !ruby/object:Net::HTTPInternalServerError 
  body: *id001
  body_exist: true
  code: "500"
  header: 
    connection: 
    - close
    content-type: 
    - application/json; charset=utf-8
    server: 
    - thin 1.2.4 codename Flaming Astroboy
  http_version: "1.1"
  message: Internal Server Error
  read: true
  socket: 

On Втр, 2011-12-06 at 08:31 -0800, Daniel DeLeo wrote:
> 
> 
> -- 
> Dan DeLeo
> 
> 
> On Tuesday, December 6, 2011 at 3:22 AM, Ilya wrote:
> 
> > it seems that some sort of signing going on, but not substituted for
> the required headers (see attached screenshot)
> 
> Here's an example using RestClient:
> https://github.com/opscode/chef/blob/master/chef/lib/chef/cookbook_uploader.rb#L123-139
> 
> You can also try Dan Ryan's spice:
> https://github.com/danryan/spice/tree/
> 
> And Chef::REST should be working, try checking
> Chef::REST#sign_requests? to see if the object thinks it should sign
> the requests.
> 
> HTH,
> Dan 
-- 
Best regards,
Ilya Maltsev




Archive powered by MHonArc 2.6.16.

§