On Tue, Aug 14, 2012 at 02:23:37PM -0700, Douglas Garstang wrote:
> Yeah, well I tried the puppet labs lvm module. After I fixed the
> syntax errors, which included a missing '}' in the code (wtf!??!), it
> seems that custom types don't work with environments...
> 
> http://projects.puppetlabs.com/issues/4409
> 
> Doug.
> 

You can use custom types even if you use environments. The problem is that
type and parameter validation happens on the master side so the puppetmaster
process needs to be aware of the custom type.

So on your master you need to have at least these files:

    /var/lib/puppet/lib/puppet/type/filesystem.rb
    /var/lib/puppet/lib/puppet/type/logical_volume.rb
    /var/lib/puppet/lib/puppet/type/physical_volume.rb
    /var/lib/puppet/lib/puppet/type/volume_group.rb

On your agent you need to have the type/* and provider/*/* files but
this is already handled if you use `pluginsync = true` in your
`/etc/puppet/puppet.conf`.

On your puppet master you can either copy the files by hand or run a puppet
agent process on the master with pluginsync enabled. If the files are in
place make sure to restart your puppetmaster (maybe the master will pick
them up automatically but I am not sure about that).

The thing about environments is: You may want to add a parameter to the
`volume_groupĀ“ type so you modify the volume_group.rb file in your "dev"
environment. While a puppet node with environment "dev" will get the new
version of the plugin now, the puppetmaster will still see its version
in /var/lib/puppet/type/volume_group.rb which does not have the new
parameter. If you run puppet agent on your masternode in the environment
"prod" you are forced to push your changes to volume_group.rb into prod.

I hope this helps and you get the lvm type to work.

-Stefan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to