Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vgcreate fails if physical_volumes is a hash #315

Open
andylytical opened this issue Aug 27, 2023 · 1 comment
Open

vgcreate fails if physical_volumes is a hash #315

andylytical opened this issue Aug 27, 2023 · 1 comment
Labels

Comments

@andylytical
Copy link

Describe the Bug

If the PV and VG don't exist yet and physical_volumes is a hash, throws this error:

Error: Execution of '/usr/sbin/vgcreate vg_backups {"/dev/sdc"=>{"unless_vg"=>"vg_backups"}}' returned 5: No device found for {"/dev/sdc"=>{"unless_vg"=>"vg_backups"}}.

Expected Behavior

Expect PV and VG creation to succeed.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Hiera data:
lvm::volume_groups:
  vg_backups:
    createonly: true
    physical_volumes:
      /dev/sdc:
        unless_vg: "vg_backups"
    logical_volumes:
      backups:
        fs_type: "xfs"
        mountpath: "/backups"
  1. Puppet module:
include ::lvm
  1. Run puppet

Environment

  • Version 2.0.3
  • Platform Red Hat Enterprise Linux 9.2 (Plow)
  • Puppet version 7.26.0

Additional Context

Add any other context about the problem here.

@andylytical
Copy link
Author

I have a fix for this, but applying it to the current main exposes #316.

I tested my fix by branching from c437d99 (before #316 was introduced).

I now have two branches that I could submit a PR from:

  1. https://github.com/andylytical/puppetlabs-lvm/tree/fix_vgcreate (branches from current main but exposes Catalog compilation fails with: no parameter named 'yes_flag' #316)
  2. https://github.com/andylytical/puppetlabs-lvm/tree/alt_fix_vgcreate (fully working fix but doesn't branch from current main)

Which branch should I use to submit a PR?

andylytical added a commit to andylytical/puppetlabs-lvm that referenced this issue Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant