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

Chef diff trying to use native endpoints in compatability mode #367

Closed
tyler-ball opened this issue Apr 30, 2015 · 3 comments
Closed

Chef diff trying to use native endpoints in compatability mode #367

tyler-ball opened this issue Apr 30, 2015 · 3 comments

Comments

@tyler-ball
Copy link
Contributor

I successfully uploaded my local policyfile (in compatablity mode) with chef push one. Then I modified the Policyfile.rb, updated the lock and uploaded it again with chef push two. Running chef diff one...two raises the following errors:

Error: No policyfile lock named 'tyler_demo' found in policy_group 'one' at https://api.chef.io/organizations/tyler2
Reason: (Net::HTTPServerException) HTTP 404 Not Found: 404 - Not Found: Sorry, I can't find what you are looking for.

This is the bug I'm filing for the issue that my policyfile was successfully uploaded twice, but the diff command fails to find the groups. It fails in the same way if I run chef diff one and try to diff the local lock to the one policy group.

@tyler-ball tyler-ball added the Bug label Apr 30, 2015
@tyler-ball
Copy link
Contributor Author

Enabling debug output, it looks like it is trying to use the native API even though I have compatibility mode enabled.

--- REQUEST DATA ----
GET /organizations/tyler2/policy_groups/one/policies/tyler_demo

@tyler-ball tyler-ball changed the title Chef diff fails to diff two policy groups that are on the chef server Chef diff trying to use native endpoints in compatability mode Apr 30, 2015
@tyler-ball
Copy link
Contributor Author

Closing as wont-fix. Diffing is only supported on native endpoints.

@legal90
Copy link

legal90 commented Nov 17, 2015

I've run into the similar issue, with the same output. But the reason was the fact that I haven't specified organization name in chef_server_url directive in knife.rb.

It was:

chef_server_url          "https://chef.example.com/"

But it should be:

chef_server_url          "https://chef.example.com/organizations/my_org_name"

I hope it will help somebody :)

P.s. However, all other endpoints (nodes, cookbooks) worked fine without organization mentioning. Only policy-related queries failed.

ksubrama pushed a commit that referenced this issue Jan 11, 2016
Updated Test Kitchen with first-class Windows support
@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
None yet
Development

No branches or pull requests

2 participants