sous-chefs / lvm

Development repository for the lvm cookbook
https://supermarket.chef.io/cookbooks/lvm
Apache License 2.0
56 stars 122 forks source link

Unable to load lvm attributes [lvs.yaml] for version [2.02.188(2)] #215

Open RoeeFabrikant opened 3 years ago

RoeeFabrikant commented 3 years ago

:pancakes: Cookbook version

5.2.0

:woman_cook: Chef-client Version

17.7.29

:tophat: Platform details

sles 12 sp5

Steps To Reproduce

lvm_volume_group vg01r1 do
  physical_volumes volumes
  physical_extent_size '32M'
  logical_volume 'data' do
    size '100%VG'
    filesystem 'ext3'
    mount_point location: '/data', options: 'noatime,nodiratime'
    stripes volumes.count
    stripe_size 4
  end
end

Error

[2021-11-21T13:11:08+00:00] FATAL: ArgumentError: lvm_volume_group[vg01r1] (litc-docker::database-disk-sliced line 18) had an error: ArgumentError: Unable to load lvm attributes [lvs.yaml] for version [2.02.188(2)]. The version/object may not be supported or you may need to upgrade the chef-ruby-lvm-attrib gem. Error [No such file or directory @ rb_sysopen - /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-ruby-lvm-attrib-0.3.3/lib/lvm/attributes/2.02.188(2)/lvs.yaml]

ramereth commented 3 years ago

@roee73 it looks like you're using an older chef-ruby-lvm-attrib gem. Can you please update it to the latest and confirm it's still not working? I think it will still not work but I wanted to confirm before making an upstream PR to resolve this. Thanks!

RoeeFabrikant commented 3 years ago

@roee73 it looks like you're using an older chef-ruby-lvm-attrib gem. Can you please update it to the latest and confirm it's still not working? I think it will still not work but I wanted to confirm before making an upstream PR to resolve this. Thanks!

Hi Lance, We are updating the chef-ruby-lvm-attrib gem to the latest version before we are running this block:

chef_gem 'chef-ruby-lvm-attrib' do
  action :upgrade
  clear_sources true
  compile_time true
end

include_recipe 'lvm'

lvm_volume_group vg01r1 do
  physical_volumes volumes
  physical_extent_size '32M'
  logical_volume 'data' do
    size '100%VG'
    filesystem 'ext3'
    mount_point location: '/data', options: 'noatime,nodiratime'
    stripes volumes.count
    stripe_size 4
  end
end

I have opened PR for chef-ruby-lvm-attrib repository , that may resolve the issue: https://github.com/chef/chef-ruby-lvm-attrib/pull/39

ramereth commented 3 years ago

Yeah, that should fix it once it's merged/released.