lvm icon indicating copy to clipboard operation
lvm copied to clipboard

a bad patch to quiet the generate_field_data" from chef-ruby-lvm-attrib conflicts with /opt/chef/embedded/bin/generate_field_data issue

Open bby-bishopclark opened this issue 4 years ago • 1 comments

So RH updated their LVM package, which changes some paths, and the ruby seems fixated on paths. Thus, we need to update our LVM and we hope its compatibility window still includes Chef14 until CinC has a good repo.

This will be the familiar sight to RH/EL people (including PLOS):

hostname     STDOUT:
hostname     STDERR: ERROR:  Error installing chef-ruby-lvm-attrib:
hostname                  "generate_field_data" from chef-ruby-lvm-attrib conflicts with /opt/chef/embedded/bin/generate_field_data
hostname     ---- End output of /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.3.0" --clear-sources  --source=https://www.rubygems.org ----
hostname     Ran /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.3.0" --clear-sources --source=https://www.rubygems.org returned 1

There's a few layers of concern, here, and I'm wondering if it's worthwhile to take on some risk and end some pain:

diff --git a/libraries/lvm.rb b/libraries/lvm.rb
index ded1df5..3b13909 100644
--- a/libraries/lvm.rb
+++ b/libraries/lvm.rb
@@ -31,6 +31,7 @@ module LVMCookbook
       action :install
       version node['lvm']['chef-ruby-lvm-attrib']['version']
       source node['lvm']['rubysource']
+      options '--force'
       clear_sources true
       compile_time true
     end

Your call, but until the gem gets fixed to not clobber their predecessors' file on every upgrade I can't see a better way to avoid breaking the run.

Remember when 'breaking the build' incurred a latte or pizza debt and some mild heckling?

bby-bishopclark avatar Jul 31 '20 16:07 bby-bishopclark

Can confirm: still happens on 6.1.0 and 0.3.10 .

bby-bishopclark avatar Aug 25 '22 21:08 bby-bishopclark