Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server enforced required recipe #6032

Merged
merged 3 commits into from Apr 6, 2017
Merged

server enforced required recipe #6032

merged 3 commits into from Apr 6, 2017

Conversation

sdelano
Copy link

@sdelano sdelano commented Apr 6, 2017

when the chef-server is configured to serve a requried recipe,
chef-client shall load the recipe into the run context and
execute it as part of the converge phase.

if the chef-server is NOT configured, it will return a 404 and
chef-client will continue normally.

Signed-off-by: Stephen Delano stephen@chef.io

Description

See above.

See also:

Issues Resolved

Check List

@sdelano sdelano changed the title server enforced recuired recipe server enforced required recipe Apr 6, 2017
@@ -384,6 +384,8 @@ def data_collector_token
end

def add_resource_report(resource_report)
#require 'pry'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's get these removed please

when the chef-server is configured to serve a requried recipe,
chef-client shall load the recipe into the run context and
execute it as part of the converge phase.

if the chef-server is NOT configured, it will return a 404 and
chef-client will continue normally.

Signed-off-by: Stephen Delano <stephen@chef.io>
sdelano added 2 commits April 6, 2017 10:14
Signed-off-by: Stephen Delano <stephen@chef.io>
Signed-off-by: Stephen Delano <stephen@chef.io>
# to create your own rest client, perhaps we should do that
# here but it seems more appropriate to reuse one that we
# know is already created. for ease of testing, we'll pass
# the existing rest client in as a parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably use rest_clean here, so that JSON request/response is sanitized

we probably should have converted everything over to rest_clean for Chef-13

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments around #rest_clean indicate that it's used for API reporters. If it is indeed related to JSON sanitization, that's also non-applicable here because neither the request nor the response contain any JSON. This is simply a GET to retrieve a recipe file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess the point is that rest is kinda-sorta deprecated and rest_clean is the future -- at some point rest should just set the same options as rest_clean and then rest_clean should go away.

it might not make any difference at all, but that's kind of fine and useful to know...

@thommay thommay merged commit bb940e5 into master Apr 6, 2017
@lamont-granquist lamont-granquist deleted the sd/required-recipe branch April 6, 2017 20:04
danielsdeleo pushed a commit that referenced this pull request Apr 10, 2017
server enforced required recipe

Signed-off-by: Daniel DeLeo <dan@chef.io>
thommay added a commit that referenced this pull request Apr 11, 2017
Backport #6032 (required recipe) to Chef 12
@tas50 tas50 added the Type: Enhancement Adds new functionality. label Apr 13, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants