Skip to content

vgcreate fails if physical_volumes is a hash #315

Open
@andylytical

Description

@andylytical

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions