I'll give that try. I was retyping/copying/pasting from the link
directly, figuring the forge module handled that some how. I appreciate
the suggestion.
Thanks
Doug
On Thursday, May 4, 2017 at 9:53:18 AM UTC-5, Joshua Schaeffer wrote:
>
> You list volume_group*s* in Hiera (with an "s"):
>
> ---
> lvm::volume_groups:
> vg00:
> createonly: true
> physical_volumes:
> /dev/sda2:
> unless_vg: 'vg00'
> logical_volumes:
> audit:
> size: 2G
>
> You list volume_group (without an "s") in your manifest:
>
> create_resources('lvm::volume_group', $volume_groups)
>
> If this is a typo in your copy/paste then it may be that Puppet cannot
> find the data in Hiera. Where do you define lvm::volume_groups in Hiera
> (common.yaml, node specific yaml file, etc)?
>
> On Wednesday, May 3, 2017 at 9:01:10 AM UTC-6, dkoleary wrote:
>>
>> Hey, all;
>>
>> I'm having some trouble getting the lvm module to work the way I think it
>> should based on my probable erroneous reading of the documentation.
>>
>> I would like to ensure a logical volume of 2gs is created in vg00 which
>> has plenty of free space to handle the lv creation. I've been using this
>> link as the guide:
>>
>> https://github.com/puppetlabs/puppetlabs-lvm
>>
>> I'm using the puppetforge lvm module.
>>
>> Hiera data looks like:
>>
>> ---
>> lvm::volume_groups:
>> vg00:
>> createonly: true
>> physical_volumes:
>> /dev/sda2:
>> unless_vg: 'vg00'
>> logical_volumes:
>> audit:
>> size: 2G
>>
>> I get this error when running on a test box:
>>
>> # puppet agent -t
>> Notice: Local environment: 'production' doesn't match server specified
>> node environment 'dkoleary', switching agent to 'dkoleary'.
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts
>> Error: Could not retrieve catalog from remote server: Error 400 on
>> SERVER: Evaluation Error: Error while evaluating a Resource Statement,
>> Lvm::Volume_group[vg00]: has no parameter named 'createonly' on node
>> myhost.mydomain.com
>> Warning: Not using cache on failed catalog
>> Error: Could not retrieve catalog; skipping run
>>
>> If i comment the hiera data and specify the parameters directly in the
>> class, it works:
>>
>> # == Class: lvm
>> #
>>
>> class lvm {
>>
>>
>> physical_volume { '/dev/sda2':
>> ensure => present,
>> unless_vg => 'vg00',
>> }
>>
>>
>> volume_group { 'vg00':
>> ensure => present,
>> physical_volumes => '/dev/sda2',
>> createonly => true,
>> }
>>
>>
>> logical_volume { 'audit':
>> ensure => present,
>> size => '2G',
>> volume_group => 'vg00',
>> }
>> }
>> #======================================================================
>> # original init.pp code
>> #======================================================================
>> # class lvm (
>> # $package_ensure = 'installed',
>> # $manage_pkg = undef,
>> # $volume_groups = {},
>> # ) {
>> #
>> # if $manage_pkg {
>> # package { 'lvm2':
>> # ensure => $package_ensure
>> # }
>> # }
>> #
>> # validate_hash($volume_groups)
>> #
>> # create_resources('lvm::volume_group', $volume_groups)
>> # }
>> #======================================================================
>>
>> results in:
>>
>> # puppet agent -t
>> Notice: Local environment: 'production' doesn't match server specified
>> node environment 'dkoleary', switching agent to 'dkoleary'.
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts
>> Info: Caching catalog for cl1vproegit1395.multiplan.com
>> Info: Applying configuration version '1493823333'
>> [[ Misc der'mo snipped]]
>> Notice: /Stage[main]/Lvm/Logical_volume[audit]/ensure: created
>>
>> Notice: Applied catalog in 94.15 seconds
>>
>>
>> # lvs vg00 |grep audit
>> audit vg00 -wi-a----- 2.00g
>>
>> I'd appreciate any hints/tips/suggestions on what I might be doing wrong.
>>
>> Thanks for your time.
>>
>> Doug O'Leary
>>
>>
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/18433e18-1f5c-403d-beb2-b3dc8546f5ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.