Andy Stevens
2013-Aug-23 14:07 UTC
[Puppet Users] Problem using resources and types from puppetlabs/lvm
Hi, I''m struggling to make use of the resources and types provided by puppetlabs/lvm. If I attempt to make use of the various resource types i.e. filesystem, lvm etc. from within my nodes.pp then I have no problem at all. However if I attempt to reference them from a class I have created, when i invoke puppet agent --test I get the output below: *Error: Failed to apply catalog: Could not find dependency Filesystem[/dev/mapper/root_vg-WebSphere] for File*......... I''m guessing that my custom class can''t see within it''s scope the various resources and types provided by puppetlabs/lvm? So how do I resolve this? the puppetlabs/lvm isn''t a class so I can''t include it. Any assistance would be greatly appreciated Thanks Andy -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Chris McDermott
2013-Aug-23 15:20 UTC
Re: [Puppet Users] Problem using resources and types from puppetlabs/lvm
I''m kind of guessing, but it might be that you need to push out the custom providers to the client. Try putting "pluginsync = true" in the [agent] section of your puppet.conf on that client, and try again. Chris On Fri, Aug 23, 2013 at 8:07 AM, Andy Stevens <ant.st.17@gmail.com> wrote:> Hi, > > I''m struggling to make use of the resources and types provided by > puppetlabs/lvm. > > If I attempt to make use of the various resource types i.e. filesystem, > lvm etc. from within my nodes.pp then I have no problem at all. However if > I attempt to reference them from a class I have created, when i invoke > puppet agent --test I get the output below: > > *Error: Failed to apply catalog: Could not find dependency > Filesystem[/dev/mapper/root_vg-WebSphere] for File*......... > > I''m guessing that my custom class can''t see within it''s scope the various > resources and types provided by puppetlabs/lvm? So how do I resolve this? > the puppetlabs/lvm isn''t a class so I can''t include it. > > Any assistance would be greatly appreciated > > > > Thanks > > Andy > > -- > 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 puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >-- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Andy Stevens
2013-Aug-27 11:09 UTC
Re: [Puppet Users] Problem using resources and types from puppetlabs/lvm
Chris,
Already have the pluginsync directive in the [agent] section of my
puppet.conf - thanks for covering that off anyway. I''ve included the
relevant Puppet manifest snippets below as I could be doing something very
very silly at a code level that someone could identify:
Firstly I have declared a class called ''websphere'' which
resides in
/etc/puppet/modules/websphere and my class code is in the init.pp file
located at /etc/puppet/modules/websphere/manifests. The code for this is as
follows:
*/etc/puppet/modules/websphere/manifests/init.pp*
class websphere::deploy {
include lvm::filesystem
file { "/opt/wasadmin/backup/build_NdmBase.tar":
source => "puppet:///files/build/websphere/build_NdmBase.tar",
mode => 0640,
owner => "wasadmin",
group => "wasgrp",
require => Filesystem[ "/dev/mapper/root_vg-WebSphere" ],
}
}
The second component is my node definition which occurs on the nodes.pp
file, as follows:
*/etc/puppet/manifests/nodes.pp*
node websphereNode inherits base {
include websphere::deploy
}
The third component is actually specifying an instance of the above node,
as follows:
*/etc/puppet/manifests/nodes.pp*
node "node.foo.com" inherits websphereNode {
}
I also have the puppetlabs/lvm module installed in the /etc/puppet/modules
directory.
Hope the code I have included in this response is of assistance to someone
to help me resolve this issue.
Thanks
On Friday, August 23, 2013 4:20:32 PM UTC+1, mcd wrote:>
> I''m kind of guessing, but it might be that you need to push out
the custom
> providers to the client. Try putting "pluginsync = true" in the
[agent]
> section of your puppet.conf on that client, and try again.
>
> Chris
>
>
> On Fri, Aug 23, 2013 at 8:07 AM, Andy Stevens
<ant....@gmail.com<javascript:>
> > wrote:
>
>> Hi,
>>
>> I''m struggling to make use of the resources and types provided
by
>> puppetlabs/lvm.
>>
>> If I attempt to make use of the various resource types i.e. filesystem,
>> lvm etc. from within my nodes.pp then I have no problem at all.
However if
>> I attempt to reference them from a class I have created, when i invoke
>> puppet agent --test I get the output below:
>>
>> *Error: Failed to apply catalog: Could not find dependency
>> Filesystem[/dev/mapper/root_vg-WebSphere] for File*.........
>>
>> I''m guessing that my custom class can''t see within
it''s scope the various
>> resources and types provided by puppetlabs/lvm? So how do I resolve
this?
>> the puppetlabs/lvm isn''t a class so I can''t include
it.
>>
>> Any assistance would be greatly appreciated
>>
>>
>>
>> Thanks
>>
>> Andy
>>
>> --
>> 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 puppet-users...@googlegroups.com <javascript:>.
>> To post to this group, send email to
puppet...@googlegroups.com<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/puppet-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
Chris McDermott
2013-Aug-27 16:46 UTC
Re: [Puppet Users] Problem using resources and types from puppetlabs/lvm
I don''t see where you declare this resource:
require => Filesystem[ "/dev/mapper/root_vg-WebSphere" ],
In order to require that, you would first need to declare it somewhere, for
instance:
filesystem { ''/dev/mapper/root_vg-WebSphere'':
ensure => present,
fstype => ''ext4'',
}
Of course, that will only format a filesystem on that device node - it
wouldn''t set up a volume group or logical volume or mount point or
anything
else. In fact, I think a normal use of the puppetlabs-lvm module would look
something more like this:
lvm::volume { ''WebSphere'':
ensure => present,
pv => ''/dev/sdb'',
vg => ''WebSphere'',
fstype => ''ext4'',
before => File[''/opt/wasadmin''],
}
file { ''/opt/wasadmin'':
ensure => directory
}
mount { ''/opt/wasadmin'':
ensure => mounted,
device => ''/dev/WebSphere/WebSphere'',
fstype => ''ext4'',
require => File[''/opt/wasadmin''],
}
And then in your websphere::deploy you could:
require => Mount[''/opt/wasadmin'']
And that would ensure that the whole stack was created - the physical
volume, the volume group, the logical volume, the filesystem, and that it
was mounted under /opt/wasadmin.
Chris
On Tue, Aug 27, 2013 at 5:09 AM, Andy Stevens <ant.st.17@gmail.com> wrote:
> Chris,
>
> Already have the pluginsync directive in the [agent] section of my
> puppet.conf - thanks for covering that off anyway. I''ve included
the
> relevant Puppet manifest snippets below as I could be doing something very
> very silly at a code level that someone could identify:
>
> Firstly I have declared a class called ''websphere'' which
resides in
> /etc/puppet/modules/websphere and my class code is in the init.pp file
> located at /etc/puppet/modules/websphere/manifests. The code for this is as
> follows:
>
> */etc/puppet/modules/websphere/manifests/init.pp*
>
> class websphere::deploy {
>
>
> include lvm::filesystem
>
>
> file { "/opt/wasadmin/backup/build_NdmBase.tar":
>
> source =>
"puppet:///files/build/websphere/build_NdmBase.tar",
>
> mode => 0640,
>
> owner => "wasadmin",
>
> group => "wasgrp",
>
> require => Filesystem[ "/dev/mapper/root_vg-WebSphere" ],
>
> }
>
> }
>
> The second component is my node definition which occurs on the nodes.pp
> file, as follows:
>
> */etc/puppet/manifests/nodes.pp*
>
> node websphereNode inherits base {
>
>
> include websphere::deploy
>
>
> }
>
> The third component is actually specifying an instance of the above node,
> as follows:
>
> */etc/puppet/manifests/nodes.pp*
>
> node "node.foo.com" inherits websphereNode {
>
>
> }
>
> I also have the puppetlabs/lvm module installed in the /etc/puppet/modules
> directory.
>
> Hope the code I have included in this response is of assistance to someone
> to help me resolve this issue.
>
> Thanks
>
> On Friday, August 23, 2013 4:20:32 PM UTC+1, mcd wrote:
>
>> I''m kind of guessing, but it might be that you need to push
out the
>> custom providers to the client. Try putting "pluginsync =
true" in the
>> [agent] section of your puppet.conf on that client, and try again.
>>
>> Chris
>>
>>
>> On Fri, Aug 23, 2013 at 8:07 AM, Andy Stevens <ant....@gmail.com>
wrote:
>>
>>> Hi,
>>>
>>> I''m struggling to make use of the resources and types
provided by
>>> puppetlabs/lvm.
>>>
>>> If I attempt to make use of the various resource types i.e.
filesystem,
>>> lvm etc. from within my nodes.pp then I have no problem at all.
However if
>>> I attempt to reference them from a class I have created, when i
invoke
>>> puppet agent --test I get the output below:
>>>
>>> *Error: Failed to apply catalog: Could not find dependency
>>> Filesystem[/dev/mapper/root_vg-WebSphere] for File*.........
>>>
>>> I''m guessing that my custom class can''t see
within it''s scope the
>>> various resources and types provided by puppetlabs/lvm? So how do
I
>>> resolve this? the puppetlabs/lvm isn''t a class so I
can''t include it.
>>>
>>> Any assistance would be greatly appreciated
>>>
>>>
>>>
>>> Thanks
>>>
>>> Andy
>>>
>>> --
>>> 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 puppet-users...@**googlegroups.com.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>>
>>> Visit this group at
http://groups.google.com/**group/puppet-users<http://groups.google.com/group/puppet-users>
>>> .
>>> For more options, visit
https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>
>> --
> 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 puppet-users+unsubscribe@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.