-
Notifications
You must be signed in to change notification settings - Fork 28
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
Idempotency of machine resource is broken due to v1 vs v0 differences in clients API #56
Comments
Pin chef server api version to 0, fixes #56
@sersut @tyler-ball I am getting 400 errors with
|
Hey @poliva83 - what version of the ChefDK (or Chef and Cheffish) are you using and what version of Chef Server are you using? |
@tyler-ball This was my fault. Since I was passing chef_server attribute to chef_user I have to explicitly set the api version to be v1 in hash. I was using 12.2.0 chef-server I believe when I hit this. |
Idempotency of
machine
resource in chef-provisioning is broken when working against Hosted Chef due to the fact that v1 API now does not returnpublic_key
but the state comparison in cheffish checks for it.Repro Steps:
machine
resourceSince Server API v1, all keys must be updated via the keys endpoint.
Details:
The logic here will break when running against v1 API because (pry debug values from that point):
Possible Fix:
Talking to @stevendanna we need to either pin to v0 or update it's calls to be compatible with v1.
Update would probably be to check if the
new_json
has anypublic_key
and if it does call the/keys
endpoint to obtain the current keys and compare them with the ones incurrent_json
and if there are any differences call the/keys
endpoint to update them.Since this is somewhat complicated pinning to v0 might be a temporary fix until we fix this the right hard way.
The text was updated successfully, but these errors were encountered: