Cookbook version
5.4.0
Chef-client version
12.19.36
Platform Details
Ubuntu 14.04
Scenario:
Testing cookbook's upgrade capabilities
Steps to Reproduce:
-
Set ['chef-server']['version'] to, say, 12.10.0. Run chef-server::default recipe. Version 12.10.0 installs.
-
Change ['chef-server']['version'] to 12.11.0. Run chef-server::default recipe again.
Expected Result:
Expected chef-server to upgrade to version 12.11.0.
Actual Result:
Cookbook downloads the new package, however apt_package skips with (up to date). Looking at cookbook source, it seems chef_ingredient's action is hardcoded to install. chef_ingredient however, provides more actions (such as upgrade) both in the newest version and the version currently pinned by this cookbook.
Relevant lines from the (second) chef-client run:
Recipe: chef-server::default
* ruby_block[ensure node can resolve API FQDN] action run[2017-04-28T19:17:48+00:00] INFO: Processing ruby_block[ensure node can resolve API FQDN] action run (chef-server::default line 22)
(skipped due to not_if)
* chef_ingredient[chef-server] action install[2017-04-28T19:17:48+00:00] INFO: Processing chef_ingredient[chef-server] action install (chef-server::default line 29)
Recipe: <Dynamically Defined Resource>
* chef_gem[mixlib-install] action install[2017-04-28T19:17:48+00:00] INFO: Processing chef_gem[mixlib-install] action install (dynamically defined)
(up to date)
* ruby_block[stop chef run] action nothing[2017-04-28T19:17:50+00:00] INFO: Processing ruby_block[stop chef run] action nothing (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/helpers.rb line 263)
(skipped due to action :nothing)
* remote_file[/tmp/kitchen/cache/chef-server-core_12.11.0-1_amd64.deb] action create[2017-04-28T19:17:50+00:00] INFO: Processing remote_file[/tmp/kitchen/cache/chef-server-core_12.11.0-1_amd64.deb] action create (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 106)
(up to date)
* apt_package[chef-server] action install[2017-04-28T19:17:53+00:00] INFO: Processing apt_package[chef-server] action install (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 52)
(up to date)
(up to date)
Am I missing something, or is there no way of upgrading a current install to a newer version?
This of course can be triggered by modifying the resource in my wrapper cookbook:
include_recipe 'chef-server'
resources(chef_ingredient: 'chef-server').action(:upgrade)
But then I also need to take care of running the reconfigure, upgrade and cleanup steps.
In case the functionality does exist, could some info about it be added to the README?
Thank you!
Cookbook version
5.4.0
Chef-client version
12.19.36
Platform Details
Ubuntu 14.04
Scenario:
Testing cookbook's upgrade capabilities
Steps to Reproduce:
Set
['chef-server']['version']to, say, 12.10.0. Runchef-server::defaultrecipe. Version 12.10.0 installs.Change
['chef-server']['version']to 12.11.0. Runchef-server::defaultrecipe again.Expected Result:
Expected chef-server to upgrade to version 12.11.0.
Actual Result:
Cookbook downloads the new package, however apt_package skips with
(up to date). Looking at cookbook source, it seemschef_ingredient's action is hardcoded to install.chef_ingredienthowever, provides more actions (such as upgrade) both in the newest version and the version currently pinned by this cookbook.Relevant lines from the (second) chef-client run:
Am I missing something, or is there no way of upgrading a current install to a newer version?
This of course can be triggered by modifying the resource in my wrapper cookbook:
But then I also need to take care of running the
reconfigure,upgradeandcleanupsteps.In case the functionality does exist, could some info about it be added to the README?
Thank you!