Giter VIP home page Giter VIP logo

chef-ruby-lvm-attrib's Introduction

chef-ruby-lvm-attrib

Gem Version

This is a list of attributes for lvm objects. They are generated from the source code and broken down by version. See adding attributes below to contribute.

At their core these files exist to determine which arguments to pass lvs/vgs/pvs and the subsequent type conversions.

Currently this is split from the main ruby-lvm gem since these files require updating to follow LVM2 releases.

Usage

  require 'lvm/attributes'

  attributes = Attributes.load("2.0.36", "vgs.yaml")

Installation

sudo gem install chef-ruby-lvm-attrib

Updating for new LVM releases

To add attributes:

Use update-lvm.sh script to add new version. Find the interested LVM2 tag from LVM2 Repository.

  • Fork this repository
  • git clone your-forked-repo
  • cd your-forked-repo
  • ./update-lvm.sh v2_02_155

The script will add lib/lvm/attributes/LVM_VERSION where LVM_VERSION being something like 2.02.86(2) or 2.02.98(2).

If the script will not error, it will create new branch and commit Added LVM_VERSION attributes.

In case of error, see missing attribute type note below.

If all is well, publish the changes and make Pull Request from GitHub web:

  • git push origin mybranch
  • Submit PR to this repository.

Missing Attribute Type

If you get an error like the below:

Oops, missing type conversion data of column 'discards' use by 'SEGS' which says its going to return a 'discards'
Figure out the missing type and rerun.
  • Look in path/to/lvm-source/lib/report/columns.h for the column name in the 7th field.
  • If the 3rd field is NUM, type will be Integer. If 3rd field is STR, type will be String.
  • Add the information to bin/generate_field_data in the TYPE_CONVERSION_MAP and try running again

chef-ruby-lvm-attrib's People

Contributors

agentram avatar b-dean avatar bflad avatar chef-ci avatar chef-expeditor[bot] avatar ctramnitz avatar damacus avatar dependabot-preview[bot] avatar gaelik avatar glensc avatar gregsymons avatar gyanendra-choudhary avatar kitchen-porter avatar kuckkuck avatar maryia-haladko avatar ramereth avatar renovate[bot] avatar roeefabrikant avatar sabat avatar schrd avatar sean-horn avatar skeshari12 avatar spheromak avatar srb3 avatar staer avatar tas50 avatar tdooner avatar tduffield avatar tehret77 avatar zackyaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-ruby-lvm-attrib's Issues

Unable to load lvm attributes [lvs.yaml] for version [2.02.185(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/2.3.0/gems/chef-ruby-lvm-attrib-0.2.7/lib/lvm/attributes/2.02.185(2)/lvs.yaml]

Version: 0.2.7

[Version of the project installed]

Environment:RHEL 7.7

[Details about the environment such as the Operating System, cookbook details, etc...]

Scenario: I'm running lvm cookbook, and I get the following error:

"Unable to load lvm attributes [lvs.yaml] for version [2.02.185(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/2.3.0/gems/chef-ruby-lvm-attrib-0.2.7/lib/lvm/attributes/2.02.185(2)/lvs.yaml]"

ls /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-ruby-lvm-attrib-0.2.7/lib/lvm/attributes/

2.02.100(2) 2.02.118(2) 2.02.136(2) 2.02.154(2) 2.02.172(2) 2.02.74(2)
2.02.101(2) 2.02.119(2) 2.02.137(2) 2.02.155(2) 2.02.173(2) 2.02.83(2)
2.02.102(2) 2.02.120(2) 2.02.138(2) 2.02.156(2) 2.02.175(2) 2.02.84(2)
2.02.103(2) 2.02.121(2) 2.02.139(2) 2.02.157(2) 2.02.176(2) 2.02.86(2)
2.02.104(2) 2.02.122(2) 2.02.140(2) 2.02.158(2) 2.02.177(2) 2.02.87(2)
2.02.105(2) 2.02.123(2) 2.02.141(2) 2.02.159(2) 2.02.178(2) 2.02.88(2)
2.02.106(2) 2.02.124(2) 2.02.142(2) 2.02.160(2) 2.02.178(2)-rc1 2.02.95(2)
2.02.107(2) 2.02.125(2) 2.02.143(2) 2.02.161(2) 2.02.179(2) 2.02.96(2)
2.02.108(2) 2.02.126(2) 2.02.144(2) 2.02.162(2) 2.02.180(2) 2.02.97(2)
2.02.109(2) 2.02.127(2) 2.02.145(2) 2.02.163(2) 2.02.181(2) 2.02.98(2)
2.02.110(2) 2.02.128(2) 2.02.146(2) 2.02.164(2) 2.02.182(2) 2.02.99(2)
2.02.111(2) 2.02.129(2) 2.02.147(2) 2.02.165(2) 2.02.183(2) 2.03.00(2)
2.02.112(2) 2.02.130(2) 2.02.148(2) 2.02.166(2) 2.02.26 2.03.01(2)
2.02.113(2) 2.02.131(2) 2.02.149(2) 2.02.167(2) 2.02.27
2.02.114(2) 2.02.132(2) 2.02.150(2) 2.02.168(2) 2.02.29
2.02.115(2) 2.02.133(2) 2.02.151(2) 2.02.169(2) 2.02.30
2.02.116(2) 2.02.134(2) 2.02.152(2) 2.02.170(2) 2.02.54(1)
2.02.117(2) 2.02.135(2) 2.02.153(2) 2.02.171(2) 2.02.66(2)

It's missing 2.02.185(2)

Unable to load lvm attributes [lvs.yaml] for version [2.02.187(2)]

Version:

5.0.5

Environment:

# rpm -q centos-release chef lvm2
centos-release-7-9.2009.0.el7.centos.x86_64
chef-14.15.6-1.el7.x86_64
lvm2-2.02.187-6.el7.x86_64

Scenario:

Just a chef run. I suspect the cookbook needs an update after an RPM update.

Actual Result:

[What actually happens after the reproduction steps?]

ArgumentError: Unable to load lvm attributes [lvs.yaml] for version [2.02.187(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/2.5.0/gems/chef-ruby-lvm-attrib-0.3.0/lib/lvm/attributes/2.02.187(2)/lvs.yaml]

Latest Gem isn't available on rubygems.org - Needed by LVM cookbook

๐Ÿ—ฃ๏ธ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

๐Ÿ‘ป Brief Description

A clear and concise description of what the bug is.

Per the lvm cookbook update:
https://github.com/sous-chefs/lvm/blob/main/CHANGELOG.md#6118---2024-04-30

It requires the chef-ruby-lvm-attrib 0.3.15 gem version, however, when using 6.1.20 of that cookbook, it can't find the gem required:
https://rubygems.org/gems/chef-ruby-lvm-attrib/versions
image

    STDERR: ERROR:  Could not find a valid gem 'chef-ruby-lvm-attrib' (= 0.3.15) in any repository

๐Ÿฅž Cookbook version

Version of the cookbook where you are encountering the issue.
6.1.20 lvm cookbook

๐Ÿ‘ฉโ€๐Ÿณ Chef-Infra Version

Version of chef-client in your environment.
Chef 18.2.7

๐ŸŽฉ Platform details

Operating system distribution and release version. Cloud provider if running in the cloud.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

๐Ÿš“ Expected behavior

A clear and concise description of what you expected to happen.

โž• Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

Unable to load lvm attributes [lvs.yaml] for version [2.03.12(2)]

Version:

  • lvm (5.2.0)
# /opt/chef/embedded/bin/gem list --local| grep lvm
chef-ruby-lvm (0.4.0)
chef-ruby-lvm-attrib (0.3.7)

# rpm -qf /etc/issue --qf "%{version}\n"
8.5

# rpm -qa | grep lvm
lvm2-2.03.12-10.el8.x86_64
lvm2-libs-2.03.12-10.el8.x86_64

(just updated the OS)

Environment:

[Details about the environment such as the Operating System, cookbook details, etc...]

Scenario:

vsphere_virtual_machine.tstvmhosts["tstel8-01"] (chef):     Unable to load lvm attributes [lvs.yaml] for version [2.03.12(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/2.5.0/gems/chef-ruby-lvm-attrib-0.3.7/lib/lvm/attributes/2.03.12(2)/lvs.yaml]

Steps to Reproduce:

lvm_physical_volume("/dev/sdb1") do
  action [:create]
  volume_name "/dev/sdb1"
end

RHEL 8.2 requires 2.03.08(2)

Version:

0.3.1 with LVM 5.0.0

Environment:

Redhat RHEL 8.2

Scenario:

Creating a PV

Steps to Reproduce:

lvm_physical_volume dev do
    action :create
end
lvm_volume_group vg do

Expected Result:

PV created

Actual Result:

   [2020-05-26T18:22:59-05:00] FATAL: ArgumentError: lvm_physical_volume[/dev/sdc] (optum_iaas_rhel_disk::default line 481) had an error: ArgumentError: Unable to load lvm attributes [lvs.yaml] for version [2.03.08(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/2.6.0/gems/chef-ruby-lvm-attrib-0.3.1/lib/lvm/attributes/2.03.08(2)/lvs.yaml]

Conflicts with forked repo

This is now the default gem leveraged within the lvm cookbook, which replaces di-ruby-lvm-attrib. However, this gem is not setup to replace the gem during automated converges. Now, all converges are failing due to the executable conflict.

      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.0.28" ----
      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.0.28" ----
      Ran /opt/chef/embedded/bin/gem install chef-ruby-lvm-attrib -q --no-rdoc --no-ri -v "0.0.28" returned 1

Wire up this repo for expeditor

We need to make it easy for anyone at chef to release the contents of this repo. We should wire up expeditor to manage the changelog and gem promotes.

RHEL 9.2 uses LVM 2.03.17 please update

Describe the Enhancement:
RHEL 9.2 uses LVM 2.03.17

Describe the Need:
Support for latest LVM

Current Alternative
No

Can We Help You Implement This?:
Update latest version support

Release new gem that has attribute for LVM v2.03.14

I see that the attributes for LVM v2.03.14 was added to the repository but the new gem is not released yet.

Could someone please release the new gem that would support the newly added attributes.

We are running into issues because of unavailability of this attribute-

Unable to load lvm attributes [lvs.yaml] for version [2.03.14(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/2.7.0/gems/chef-ruby-lvm-attrib-0.3.9/lib/lvm/attributes/2.03.14(2)/lvs.yaml]

Attributes need to be updated for 2.02.185

Version:

0.2.6 (although the problem is also in 0.2.7)

Environment:

RHEL 7 in AWS
lvm cookbook v4.5.3
some other recipe that has a lvm_volume_group resource

Scenario:

Running chef with a run list that includes a lvm_volume_group resource

Steps to Reproduce:

make some recipe that has an lvm_volume_group

Expected Result:

lvm2 package installed and volume group created

Actual Result:

================================================================================
Error executing action `create` on resource 'lvm_volume_group[foo]'
================================================================================

ArgumentError
-------------
Unable to load lvm attributes [lvs.yaml] for version [2.02.185(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/2.3.0/gems/chef-ruby-lvm-attrib-0.2.6/lib/lvm/attributes/2.02.185(2)/lvs.yaml]

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:58:in `new'
/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:58:in `action_create'

LVM 2.03.16 released

Describe the Enhancement:

RHEL 9.1 uses LVM 2.03.16

Describe the Need:

Support for latest LVM

Current Alternative

No

Can We Help You Implement This?:

Update latest version support

Unable to load lvm attributes [lvs.yaml] for version [2.02.180(2)]

Description

On Redhat 7.6 chef-client fails during the lvm_physical_volume action raising the following error:

Unable to load lvm attributes [lvs.yaml] for version [2.02.180(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/2.5.0/gems/chef-ruby-lvm-attrib-0.2.5/lib/lvm/attributes/2.02.180(2)/lvs.yaml]

Gem Version

0.2.5

# /opt/chef/embedded/bin/gem list | grep lvm-attrib
chef-ruby-lvm-attrib (0.2.5)

Platform Version

System Info:
------------
chef_version=14.4.56
platform=redhat
platform_version=7.6
ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
program_name=/usr/bin/chef-client

Red Hat Enterprise Linux Server release 7.6 (Maipo)
Chef Client version: 14.4.56
lvm cookbook version: 4.1.10 (same issue with 4.5.1)

Replication Case

Some chef attributes:

"override_attributes": {
    "lvm": {
      "chef-ruby-lvm": {
        "version": "0.3.0"
      },
      "chef-ruby-lvm-attrib": {
        "version": "0.2.5"
      }
    }
  }

Resource Declaration:

lvm_physical_volume '/dev/sdb' do
  action :create
end

Compiled Resource

lvm_physical_volume("/dev/sdb") do
  action [:create]
  default_guard_interpreter :default
  declared_type :lvm_physical_volume
  cookbook_name "my_os_setup"
  recipe_name "configure_kdump"
  volume_name "/dev/sdb"
end

ERROR (ArgumentError):

Unable to load lvm attributes [lvs.yaml] for version [2.02.180(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/2.5.0/gems/chef-ruby-lvm-attrib-0.2.5/lib/lvm/attributes/2.02.180(2)/lvs.yaml]

Other info :
Inside /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-ruby-lvm-attrib-0.2.5/lib/lvm/attributes/ directory it's missing the directory 2.02.180(2):

# ls -rt /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-ruby-lvm-attrib-0.2.5/lib/lvm/attributes/ | grep 180
# ls -rt /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-ruby-lvm-attrib-0.2.5/lib/lvm/attributes/
2.02.100(2)  2.02.108(2)  2.02.116(2)  2.02.124(2)  2.02.132(2)  2.02.140(2)  2.02.148(2)  2.02.156(2)  2.02.164(2)  2.02.172(2)  2.02.30     2.02.88(2)
2.02.101(2)  2.02.109(2)  2.02.117(2)  2.02.125(2)  2.02.133(2)  2.02.141(2)  2.02.149(2)  2.02.157(2)  2.02.165(2)  2.02.173(2)  2.02.54(1)  2.02.95(2)
2.02.102(2)  2.02.110(2)  2.02.118(2)  2.02.126(2)  2.02.134(2)  2.02.142(2)  2.02.150(2)  2.02.158(2)  2.02.166(2)  2.02.175(2)  2.02.66(2)  2.02.96(2)
2.02.103(2)  2.02.111(2)  2.02.119(2)  2.02.127(2)  2.02.135(2)  2.02.143(2)  2.02.151(2)  2.02.159(2)  2.02.167(2)  2.02.176(2)  2.02.74(2)  2.02.97(2)
2.02.104(2)  2.02.112(2)  2.02.120(2)  2.02.128(2)  2.02.136(2)  2.02.144(2)  2.02.152(2)  2.02.160(2)  2.02.168(2)  2.02.177(2)  2.02.83(2)  2.02.98(2)
2.02.105(2)  2.02.113(2)  2.02.121(2)  2.02.129(2)  2.02.137(2)  2.02.145(2)  2.02.153(2)  2.02.161(2)  2.02.169(2)  2.02.26      2.02.84(2)  2.02.99(2)
2.02.106(2)  2.02.114(2)  2.02.122(2)  2.02.130(2)  2.02.138(2)  2.02.146(2)  2.02.154(2)  2.02.162(2)  2.02.170(2)  2.02.27      2.02.86(2)
2.02.107(2)  2.02.115(2)  2.02.123(2)  2.02.131(2)  2.02.139(2)  2.02.147(2)  2.02.155(2)  2.02.163(2)  2.02.171(2)  2.02.29      2.02.87(2)

And seems the same folder is missing in git:
you can see here

Let me know if you need other info

Thanks a lot

Simone

Attributes 2.02.185 not being pulled with the chef-ruby-lvm-attrib gem version 0.2.7

We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.

Attributes 2.02.185 not being pulled with the chef-ruby-lvm-attrib gem version 0.2.7

ArgumentError: Unable to load lvm attributes [lvs.yaml] for version [2.02.185(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/2.1.0/gems/chef-ruby-lvm-attrib-0.2.7/lib/lvm/attributes/2.02.185(2)/lvs.yaml]

I get this error it does'nt list in the attributes , see below

image

Also, one more question; I think the attributes version is getting incremented regularly; like we had 2.02.180 recently; but then its now expecting 2.02.185 ; I believe this from LVM2 PACKAGE ... if this attribute version keep changing it would affect our infrastructure run on server.
Is there a way to maintain at one stable version of attributes for the gem installed ?

Support issues opened here will be closed and redirected to Slack or Discourse.

Attributes need to be updated for 2.02.186(2)

Version:

0.2.8

Environment:

RHEL7.8

Scenario:

Running the sensu-plugins-lvm check-lv-usage.rb script (https://github.com/sensu-plugins/sensu-plugins-lvm/blob/master/bin/check-lv-usage.rb) on the newly released RHEL7.8 throws an error.

Steps to Reproduce:

Run check-lv-usage.rb on RHEL7.8

Expected Result:

volume list processed by Sensu

Actual Result:

Unable to load lvm attributes [lvs.yaml] for version [2.02.186(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/sensu/embedded/lib/ruby/gems/2.4.0/gems/chef-ruby-lvm-attrib-0.2.8/lib/lvm/attributes/2.02.186(2)/lvs.yaml]

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

bundler
Gemfile
github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • ruby/setup-ruby v1
  • r7kamura/rubocop-problem-matchers-action v1
  • actions/checkout v4
  • ruby/setup-ruby v1
.github/workflows/publish.yaml
  • google-github-actions/release-please-action v4
  • actions/checkout v4

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.