lvm
lvm copied to clipboard
Upgrading lvm on long-running chef client conflicts with di-ruby-lvm-attrib
Cookbook version
4.1.12
Chef-client version
12.21.31
Platform Details
CentOS Linux release 7.4.1708 (Core)
Scenario:
Upgraded lvm cookbook with existing resource.
Steps to Reproduce:
Keep chef long enough to have multiple ruby version gems in chef install path.
Expected Result:
New gem gets installed/upgraded automatically.
Actual Result:
* chef_gem[data_di-ruby-lvm-attrib_removal] action remove[2018-05-02T10:13:57+02:00] INFO: Processing chef_gem[data_di-ruby-lvm-attrib_removal] action remove (/var/chef/cache/cookbooks/lvm/libraries/lvm.rb line 25)
(up to date)
* chef_gem[data_di-ruby-lvm_removal] action remove[2018-05-02T10:13:57+02:00] INFO: Processing chef_gem[data_di-ruby-lvm_removal] action remove (/var/chef/cache/cookbooks/lvm/libraries/lvm.rb line 32)
(up to date)
* chef_gem[chef-ruby-lvm-attrib] action install[2018-05-02T10:13:58+02:00] INFO: Processing chef_gem[chef-ruby-lvm-attrib] action install (/var/chef/cache/cookbooks/lvm/libraries/lvm.rb line 48)
================================================================================
Error executing action `install` on resource 'chef_gem[chef-ruby-lvm-attrib]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.2.2" --clear-sources --source=https://rubygems.org ----
STDOUT:
STDERR: ERROR: Error installing chef-ruby-lvm-attrib:
"generate_field_data" from chef-ruby-lvm-attrib conflicts with installed executable from di-ruby-lvm-attrib
---- End output of /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.2.2" --clear-sources --source=https://rubygems.org ----
Ran /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.2.2" --clear-sources --source=https://rubygems.org returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/lvm/libraries/lvm.rb:48:in `rescue in require_lvm_gems'
/var/chef/cache/cookbooks/lvm/libraries/lvm.rb:20:in `require_lvm_gems'
/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:46:in `action_create'
Running install command manually:
# /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.2.2" --clear-sources --source=https://rubygems.org
chef-ruby-lvm-attrib's executable "generate_field_data" conflicts with di-ruby-lvm-attrib
Overwrite the executable? [yN]
ERROR: Error installing chef-ruby-lvm-attrib:
"generate_field_data" from chef-ruby-lvm-attrib conflicts with installed executable from di-ruby-lvm-attrib
Seems to conflict with old ruby gems:
# find /opt/chef -name "generate_field_data"
/opt/chef/embedded/bin/generate_field_data
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/di-ruby-lvm-attrib-0.0.26/bin/generate_field_data
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/di-ruby-lvm-attrib-0.0.23/bin/generate_field_data
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-ruby-lvm-attrib-0.2.2/bin/generate_field_data
Probably similar to #121.