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

chef group resource/provider seems broken against chef 12 server #38

Closed
poliva83 opened this issue Feb 23, 2015 · 2 comments
Closed

chef group resource/provider seems broken against chef 12 server #38

poliva83 opened this issue Feb 23, 2015 · 2 comments

Comments

@poliva83
Copy link

When creating groups the server api endpoint used is https://localhost/groups/admins but I keep getting back 404 errors.

[2015-02-23T17:18:30+00:00] DEBUG: Re-raising exception: Net::HTTPServerException - chef_group[admins](bb_chef12::_manage_rbac line 65) had an error: Net::HTTPServerException: 404 "Not Found"

I think the organization endpoints used is wrong according to the docs.

https://docs.chef.io/api_chef_server.html#groups
(Request) GET /organizations/NAME/groups

https://docs.chef.io/api_chef_server.html#groups-group-name
(Request) GET /organizations/NAME/groups/GROUP_NAME

I think the LWRP needs to take in an organization name to figure out the endpoint correctly.

poliva83 pushed a commit to poliva83/cheffish that referenced this issue Feb 24, 2015
…o certain group of an organization. User must be part of organization already so had to patch chef_organization lwrp to add all users in members attribute to organization when create action is called. Changes needed for cheffish gem to work with lastest chef 12 chef-server-core package.
@andrewelizondo
Copy link

@poliva83 I've gotten around this by creating a hash with the organization I want to manage the group on.

e.g.

config_with_org = {
  config_with_org = {
    chef_server_url: "https://server.url/organizations/myorg",
    options: {
      client_name: 'client',
      signing_key_filename: '/path/to/key'
    }
  }
}

chef_group 'admins' do
    users 'blah'
    chef_server config_with_org
end

@poliva83
Copy link
Author

Thanks @andrewelizondo, @jkeiser mentioned something similar in #40 (comment). Going to close this issue off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants