Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

Policyfile can normalize run list to an invalid value #625

Closed
danielsdeleo opened this issue Dec 10, 2015 · 1 comment
Closed

Policyfile can normalize run list to an invalid value #625

danielsdeleo opened this issue Dec 10, 2015 · 1 comment
Labels
Type: Bug Doesn't work as expected.

Comments

@danielsdeleo
Copy link
Contributor

I had a policyfile with the following:

run_list "recipe[cia_infra:base]"

That is incorrect because it should have two colons instead of one (i.e., it should be recipe[cia_infra::base]). If you run chef install with this, it normalizes the run list item to "recipe[cia_infra:base::default]" which the server will reject, with a curt error message:

Error: Failed to upload policy to policy group uwotmate
Reason: (Net::HTTPServerException) HTTP 400 Bad Request: Field 'run_list' is not a valid run list

Probably the best thing to do is to copy the server's validation and run that against the normalized run list, though this specific problem can be fixed by ensuring the cookbook name doesn't contain a colon.

@danielsdeleo
Copy link
Contributor Author

Fixed by: #635

@jkeiser jkeiser added the Bug label Feb 9, 2016
@thommay thommay added Type: Bug Doesn't work as expected. and removed Bug labels Feb 1, 2017
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Doesn't work as expected.
Development

No branches or pull requests

3 participants