-
-
Notifications
You must be signed in to change notification settings - Fork 599
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
The version of elasticsearch can only be set via elasticsearch/settings databag #68
Comments
Hi, Chef |
The default.rb attributes file used Chef 11 incompatible syntax for setting the node default attribute, throwing the `Chef::Exceptions::ImmutableAttributeModification` exception. See: http://www.opscode.com/blog/2013/02/05/chef-11-in-depth-attributes-changes/ Related: #68, #69
OK, spent couple of hours hunting this. Notes:
With Chef Solo, the game is all the same: change configurations in Vagrant file or data bag, run With Chef Server (hosted at Opscode), this are the steps I took: First, upload all the cookbooks to Chef Server:
Create a new virtual machine in Vagrant:
Create a Then, bootstrap the machine via Chef:
Now, the important part, to change the version with a) environment, To change the version with environment, simply create it with Chef web console or knife,
I believe this will work the same with roles. To change the version by editing node attributes, edit it with:
and run chef. In all cases, the correct version is downloaded, symlinked, and Elasticsearch itself is restarted. Verify this workflow on your end, please, and get back to me. |
I was able to verify the latest code + chef 11 (client) resolves this issue. Using the latest code revision (ac4bb01) , Chef Server 10.? , and changing the version of chef on the client node. Chef: 10.24.0 (incorrectly downloads and installs the default version in the specified version directory)New install of 0.20.2 (version set via environment) notice the jar version in the lib directory:
Update to 0.20.3 (version set via environment) notice the jar version in the lib directory:
Chef: 11.4.0 (downloads and installs the correct version)New install of 0.20.2 (version set via environment):
Update to 0.20.3 (version set via environment):
Note: |
So, on Chef 10.24.0 it still downloads the incorrect version? Trying it with Chef Server now. Note: The |
Hmm... trying to repeat the test above, but specifying the version via the elasticsearch/settings data bag. It appears in both 10.x and 11.x then version is now being ignored: [2013-02-27T11:08:41-06:00] INFO: Loaded settings: data_bag_item["elasticsearch", "settings", {"id"=>"settings", "version"=>"0.20.2"}] Should i log a separate issue? |
I'll try also the |
Added a guard against overwriting the version by using the |
@jakelandis Could you verify the current master, please? |
Testing against 2.0.4 tag, with chef server (10.x) Chef: 11.4.0
Chef: 10.24.0
[1] It is downloading the prior version ... but there are stale values in the node (it would work if you delete and re-add back the node, or delete the node settings prior to running chef-client) [2] It is downloading the default version in the specified version's path [3] It is downloading the default version in the specified version's path |
Thanks for all this testing! I think what we're hitting here is this issue, where the node attributes are indeed “stale”. I think it's fair to advice using Chef 11 if anybody needs to configure the version attribute from role/environment... |
While trying to set the (non-default) version via a chef environment [1] attribute it does not actually install that version. It will install the default version, unless you set the version via the elasticsearch/settings.
To reproduce:
This was reproduced with the 0.20.0 version of the cookbook.
[1]
"elasticsearch" => {
"version" => "0.20.5"
The text was updated successfully, but these errors were encountered: