Cookbook fails to upgrade
mengesb opened this issue · comments
Cookbook version
5.0.0
Chef-client version
12.8.1
Platform Details
AWS CentOS 6.7 x86_64
Scenario:
Upgrade chef-server via chef from 12.5.0 to 12.6.0
Steps to Reproduce:
Utilize chef-server cookbook with specified attributes.json including supermarket and analytics configurations
Expected Result:
detect and upgrade as the version is not specified
Actual Result:
Fails on config -- difficult to see a 'filesystem space issue'
[centos@chef-01 ~]$ sudo chef-client
Starting Chef Client, version 12.8.1
resolving cookbooks for run list: ["system::default", "chef-client::default", "chef-client::config", "chef-client::cron", "chef-client::delete_validation", "chef-server::default", "chef-server::addons"]
Synchronizing Cookbooks:
- system (0.10.1)
- apt (3.0.0)
- cron (1.7.6)
- hostsfile (2.4.5)
- chef-client (4.5.0)
- logrotate (1.9.2)
- windows (1.40.0)
- chef_handler (1.3.0)
- chef-server (5.0.0)
- chef-ingredient (0.18.4)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 31 resources
Recipe: system::update_package_list
* execute[sync macports tree] action run (skipped due to only_if)
Recipe: cron::default
* yum_package[cronie] action install (up to date)
* service[cron] action enable (up to date)
* service[cron] action start (up to date)
Recipe: system::timezone
* system_timezone[Etc/UTC] action set (up to date)
* log[tz-info (before set): +0000 UTC] action write (skipped due to only_if)
* execute[timedatectl set-timezone Etc/UTC] action run (skipped due to only_if)
* link[/etc/localtime] action create (up to date)
* ruby_block[verify newly-linked timezone] action nothing (skipped due to action :nothing)
Recipe: system::hostname
* system_hostname[chef-01] action set
* execute[run hostname] action run (skipped due to not_if)
* ruby_block[update hostname in /etc/rc.conf] action run (skipped due to only_if)
* hostsfile_entry[127.0.1.1_chef-01] action remove (up to date)
* hostsfile_entry[127.0.0.1_chef-01] action create (up to date)
* hostsfile_entry[10.0.254.204_chef-01] action create (up to date)
* hostsfile_entry[255.255.255.255_chef-01] action create (skipped due to only_if)
* hostsfile_entry[::1_chef-01] action create (up to date)
* hostsfile_entry[fe00::0_chef-01] action create (up to date)
* hostsfile_entry[ff00::0_chef-01] action create (up to date)
* hostsfile_entry[ff02::1_chef-01] action create (up to date)
* hostsfile_entry[ff02::2_chef-01] action create (up to date)
* service[network] action nothing (skipped due to action :nothing)
* execute[run hostname] action nothing (skipped due to action :nothing)
* ruby_block[update network sysconfig] action run (skipped due to not_if)
* ruby_block[show hostnamectl] action nothing (skipped due to action :nothing)
* execute[run hostnamectl] action run (skipped due to only_if)
* execute[run domainname] action nothing (skipped due to action :nothing)
* ruby_block[show host info] action nothing (skipped due to action :nothing)
* file[/etc/hostname] action create (up to date)
* execute[ensure hostname sync'd] action run (skipped due to not_if)
* execute[set rightscale server hostname tag] action run (skipped due to only_if)
Recipe: chef-client::service
* log[Could not determine service init style, manual intervention required to start up the chef-client service.] action write
Recipe: logrotate::default
* yum_package[logrotate] action install (up to date)
* directory[/etc/logrotate.d] action create (up to date)
Recipe: chef-client::config
* template[/etc/logrotate.d/chef-client] action create (up to date)
* directory[/var/run/chef] action create (up to date)
* directory[/var/cache/chef] action create (up to date)
* directory[/var/lib/chef] action create (up to date)
* directory[/var/log/chef] action create (up to date)
* directory[/etc/chef] action create (up to date)
* file[/var/log/chef/client.log] action create (up to date)
* template[/etc/chef/client.rb] action create (up to date)
* directory[/etc/chef/client.d] action create (up to date)
* ruby_block[reload_client_config] action nothing (skipped due to action :nothing)
Recipe: chef-client::cron
* template[/etc/init.d/chef-client] action create (up to date)
* template[/etc/sysconfig/chef-client] action create (up to date)
* service[chef-client] action disable (up to date)
* service[chef-client] action stop (up to date)
* cron_d[chef-client] action delete
* file[legacy named cron.d file] action delete (up to date)
* file[/etc/cron.d/chef-client] action delete (up to date)
(up to date)
* cron[chef-client] action create (up to date)
Recipe: chef-client::delete_validation
* file[/etc/chef/validation.pem] action delete (up to date)
Recipe: chef-server::default
* ruby_block[ensure node can resolve API FQDN] action run (skipped due to not_if)
* chef_ingredient[chef-server] action install
Recipe: <Dynamically Defined Resource>
* chef_gem[mixlib-install] action install (up to date)
- Download chef-server package from https://packages.chef.io/stable/el/6/chef-server-core-12.6.0-1.el6.x86_64.rpm
* ruby_block[stop chef run] action nothing (skipped due to action :nothing)
* remote_file[/var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm] action create (up to date)
* yum_package[chef-server] action install
================================================================================
Error executing action `install` on resource 'yum_package[chef-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
STDOUT:
STDERR: warning: /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
installing package chef-server-core-12.6.0-1.el6.x86_64 needs 291MB on the / filesystem
---- End output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
Ran rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm returned 2
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb
51: package new_resource.product_name do
52: action action_name
53: package_name ingredient_package_name
54: options new_resource.options
55: source local_path || new_resource.package_source
56: provider value_for_platform_family(
57: 'debian' => Chef::Provider::Package::Dpkg,
58: 'rhel' => Chef::Provider::Package::Rpm,
59: 'windows' => Chef::Provider::Package::Windows
60: )
61: if new_resource.product_name == 'chef'
62: # We define this resource in ChefIngredientProvider
63: notifies :run, 'ruby_block[stop chef run]', :immediately
64: end
65: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:51:in `configure_from_source_package'
yum_package("chef-server") do
package_name "chef-server-core"
provider Chef::Provider::Package::Rpm
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "chef-server"
source "/var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm"
version "12.6.0-1.el6"
end
================================================================================
Error executing action `install` on resource 'chef_ingredient[chef-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
yum_package[chef-server] (/var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
STDOUT:
STDERR: warning: /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
installing package chef-server-core-12.6.0-1.el6.x86_64 needs 291MB on the / filesystem
---- End output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
Ran rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm returned 2
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/chef-server/recipes/default.rb
29: chef_ingredient 'chef-server' do
30: extend ChefServerCookbook::Helpers
31: version node['chef-server']['version'] unless node['chef-server']['version'].nil?
32: package_source node['chef-server']['package_source']
33: config <<-EOS
34: topology "#{node['chef-server']['topology']}"
35: #{"api_fqdn \"#{node['chef-server']['api_fqdn']}\"" if api_fqdn_available?}
36: #{node['chef-server']['configuration']}
37: EOS
38: action :install
39: end
40:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/chef-server/recipes/default.rb:29:in `from_file'
chef_ingredient("chef-server") do
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :chef_ingredient
cookbook_name "chef-server"
recipe_name "default"
config "topology \"standalone\"\napi_fqdn \"chef-01.<<domain.tld>>\"\nnginx['ssl_certificate'] = '/var/chef/ssl/chef-01.<<domain.tld>>.pem'\nnginx['ssl_certificate_key'] = '/var/chef/ssl/chef-01.<<domain.tld>>.key'\nrabbitmq['vip'] = '10.0.254.204'\nrabbitmq['node_ip_address'] = '0.0.0.0'\noc_id['applications'] = {\n 'analytics' => {\n 'redirect_uri' => 'https://analytics-01.<<domain.tld>>/'\n },\n 'supermarket' => {\n 'redirect_uri' => 'https://supermarket-01.<<domain.tld>>/auth/chef_oauth2/callback'\n }\n}\n\n"
product_name "chef-server"
end
Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 09 seconds