Git Product home page Git Product logo

knife-preflight's People

Contributors

8la avatar avleen avatar jonlives avatar mrtazz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

knife-preflight's Issues

Not finding roles constraints etc

when I perform a preflight against my nodes, the preflight doesn't find the constraints (or even where the recipe is applied)

example

$ knife preflight network

server.blah.com - in environment 'hello', no version constraint for 'network' cookbook

$ knife node show server.blah.com
Node Name:  server.blah.com
Environment: hello
FQDN:
IP:          <some IP>
Run List:    role[base]
Roles:       base 
Recipes:     network, network::default...

$ knife role show base
chef_type:           role
default_attributes:
description:         blah blah blah
env_run_lists:
json_class:          Chef::Role
name:                base
override_attributes:
run_list:
  recipe[[email protected]]


Chef run on the server:
# chef-client

Starting Chef Client, version 11.14.6
resolving cookbooks for run list: [ "[email protected]", ...]

doesn't work with today's chef SaaS?

Chef.io server produces 500 error.

$ knife preflight sdldap
Searching for nodes containing sdldap OR sdldap::default in their expanded run_list or added via include_recipe...
ERROR: Server returned error 500 for https://api.chef.io/organizations/myorg/search/node?q=recipes%253Asdldap%2520OR%2520recipes%253Asdldap%255C%253A%255C%253Adefault%2520OR%2520last_seen_recipes%253Asdldap%2520OR%2520last_seen_recipes%253Asdldap%255C%253A%255C%253Adefault&start=0&rows=0, retrying 1/5 in 4s

Extended output:

$ knife preflight -VV sdldap
INFO: Using configuration from /Users/timurb/.chef/config.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as tbatyrshin
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::APIVersions#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://api.chef.io/organizations/myorg/search/environment?q=NOT%20cookbook_versions:sdldap&start=0
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-Ops-Server-API-Version: 1
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.1;
DEBUG: X-OPS-USERID: tbatyrshin
DEBUG: X-OPS-TIMESTAMP: 2017-07-27T10:18:16Z
DEBUG: X-OPS-CONTENT-HASH: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
DEBUG: X-OPS-AUTHORIZATION-1: L+6DjK1TaFr7H2R0htZR8CUfQAeo4s8t7asBjwiPXKmB5
.............................
DEBUG: HOST: api.chef.io:443
DEBUG: X-REMOTE-REQUEST-ID: d79eb9dc-8ded-4238-b183-8ed0e11ed73b
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: content-encoding: gzip
DEBUG: content-type: application/json
DEBUG: date: Thu, 27 Jul 2017 10:18:17 GMT
DEBUG: server: openresty/1.11.2.1
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=12.15.8+20170629175019
DEBUG: x-ops-server-api-version: {"min_version":"0","max_version":"1","request_version":"1","response_version":"1"}
DEBUG: transfer-encoding: chunked
DEBUG: connection: Close
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: HTTP server did not include a Content-Length header in response, cannot identify truncated downloads.
DEBUG: Chef::HTTP calling Chef::HTTP::APIVersions#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Decompressing gzip response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
Searching for nodes containing sdldap OR sdldap::default in their expanded run_list or added via include_recipe...
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as tbatyrshin
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::APIVersions#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating POST to https://api.chef.io/organizations/myorg/search/node?q=recipes%253Asdldap%2520OR%2520recipes%253Asdldap%255C%253A%255C%253Adefault%2520OR%2520last_seen_recipes%253Asdldap%2520OR%2520last_seen_recipes%253Asdldap%255C%253A%255C%253Adefault&start=0&rows=0
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Content-Type: application/json
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-Ops-Server-API-Version: 1
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.1;
DEBUG: X-OPS-USERID: tbatyrshin
DEBUG: X-OPS-TIMESTAMP: 2017-07-27T10:18:21Z
DEBUG: X-OPS-CONTENT-HASH: 48u6iIP+dGxuNXg8lAS0vAx+6es=
DEBUG: X-OPS-AUTHORIZATION-1: 1pJFslQXlbuk06o5fwBKvSMCm5jr1jBa7Zkcmk/dMCwL
...........................................................
DEBUG: HOST: api.chef.io:443
DEBUG: X-REMOTE-REQUEST-ID: d79eb9dc-8ded-4238-b183-8ed0e11ed73b
DEBUG: Content-Length: 4
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 500 Internal Server Error
DEBUG: content-type: application/json
DEBUG: date: Thu, 27 Jul 2017 10:18:23 GMT
DEBUG: server: openresty/1.11.2.1
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=12.15.8+20170629175019
DEBUG: x-ops-server-api-version: {"min_version":"0","max_version":"1","request_version":"1","response_version":"1"}
DEBUG: content-length: 36
DEBUG: connection: Close
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: ---- HTTP Response Body ----
DEBUG: {"error":["internal service error"]}
DEBUG: ---- End HTTP Response Body -----
DEBUG: ---- HTTP Request Body ----
DEBUG: 1000
DEBUG: ---- End HTTP Request Body ----
ERROR: Server returned error 500 for https://api.chef.io/organizations/myorg/search/node?q=recipes%253Asdldap%2520OR%2520recipes%253Asdldap%255C%253A%255C%253Adefault%2520OR%2520last_seen_recipes%253Asdldap%2520OR%2520last_seen_recipes%253Asdldap%255C%253A%255C%253Adefault&start=0&rows=0, retrying 1/5 in 4s

I'm running ChefDK on MacOS:

$ chef --version
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1

It is teh br0ked on Chef 11!

Exception: Chef::Exceptions::ImmutableAttributeModification: Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.