-
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
chef_server_api does not correctly handle MergedConfig #65
Comments
I see you retracted your PR. Have you figured this out? I am running into the same thing with chef-client -z utilizing chef-provisioning-vsphere: NoMethodError: machine[spacelab](vmware-provisioning::launchtest line 51) had an error: NoMethodError: chef_client[spacelab](basic_chef_client::block line 132) had an error: NoMethodError: Unexpected method merge! for MergedConfig with arguments [{:api_version=>"0"}] |
I am wondering, isn't "merge!" a typo for "merge" ? |
@asciifaceman |
So I am starting to think that something weird is going on here because my colleague has my exact same setup and versions but does not experience this when running his provisioning script... |
tested with a coworker, his worked fine on Debian without chefdk (just chef-client). I have Ubuntu 14 + full chefdk environment and it doesn't work. |
We have fixed this for now by downgrading out cheffish from 1.3.1 to 1.2.0:
We didn't have time to wait for a patch to fix this mistake. |
I don't think 53c8a24 is the problem: @echohack @asciifaceman Can you boil your code down to a repro case and a |
My gems after reverting cheffish to 1.2.0
I unfortunately have iterated my code too much for it to be relevant right at the moment, however I can say the error occurred on cheffish 1.3 and during the run_list portion after the machine had been built using chef/provisioning/vsphere_driver. I will see if I can spin up another dev environment and build a repro case but it might take a bit of time with my workload. |
Hmmm, based on what @randomcamel is saying and this, I bet something in the vsphere_driver is passing a MergedConfig incorrectly. Something smells funky here: https://github.com/CenturyLinkCloud/chef-provisioning-vsphere/blob/5c9bbba9999de7e0e58f99cccb3b365d7617f413/lib/chef/provisioning/vsphere_driver/driver.rb#L147 Turns out @mwrock (the creator of the vsphere driver) sits right next to me, so I'll chat with him about it. 👍 |
Okay, I'm going to close this because we don't think the original issue (chef_server_api expecting a merged_config) is accurate. If we need to open a new issue I am in favor of updating |
Just to clarify how this happened in this case for the sake of posterity. I reproduced this and its ocurring where the vsphere driver initializes the In the vshere driver I convert the It does seem like this may be |
chef-provisioning-vsphere 0.8.1 released to handle this |
Thank you so much. tomorrow when I have more of my work day available, I will un-downgrade cheffish and see if 1.3 is working for me now :) |
cool. verified 1.3.1 is working now on our side. |
53c8a24
This change causes a few issues:
1 - chef_server_api is expecting a MergedConfig object. When a MergedConfig object gets passed in, it dies on the merge! method because MergedConfig is not a hash. Like so:
2 -
chef_server[:options] ||= {}
is null coalescing to a hash, when it should be null coalescing to an empty MergedConfig.As a result, since chef-provisioning has a dependency on Cheffish of
cheffish ~> 1.1
, this breaks a number of resources in the live version of chef-provisioning.The text was updated successfully, but these errors were encountered: