Paul Nguyen
2010-Jan-25 17:56 UTC
[Puppet Users] A required definition dependency in a module manifest cannot be retrieved.
Hello, I''m hoping someone can help me out with this problem. I am having this problem where I have a custom mount definition in one module manifest file, and require it in another manifest file in the same module. However when the client retrieves its catalog, it cannot retrieve the dependency. This worked fine before when I had these two outside of a module, but since I moved this over to a module, it started to fail. Can someone please help me out with this? Thanks, Paul Here is the error message: rescomp2:~ # puppetd --test info: Caching catalog for rescomp2 err: Could not apply complete catalog: Could not retrieve dependency ''Mount_nfs_dir[/linuxdeploy]'' of Package[monit] at /etc/puppet/modules/rescomp2/manifests/rescomp_pkgs.pp:16 /etc/puppet/manifests/nodes/rescomp2.pp node rescomp2 { include rescomp2::rescomp_mounts include rescomp2::rescomp_pkgs } /etc/puppet/modules/rescomp2/manifests/rescomp_mounts.pp: class rescomp2::rescomp_mounts { define mount_nfs_dir ($device, $options) { file { "$name": ensure => "directory", } mount { "$name": ensure => "mounted", fstype => "nfs", atboot => "true", device => "$device", options => "$options", require => File[$name], } } mount_nfs_dir { "/linuxdeploy": device => "nas-filer7:/vol/vol1/linuxdeploy", options => "rw,rsize=32768,wsize=32768,hard,intr,fg", } } /etc/puppet/modules/rescomp2/manifests/rescomp_pkgs.pp: class rescomp2::rescomp_pkgs inherits rescomp2::rescomp_mounts { package { "monit": ensure => "present", provider => "rpm", source => "/linuxdeploy/RPM/monit/monit-5.0.3-1.x86_64.rpm", *require => Mount_nfs_dir["/linuxdeploy"]*, } file { "/etc/monitrc": ensure => "present", source => "puppet:///modules/rescomp2/etc/monitrc", owner => "root", group => "root", mode => "600", require => Package["monit"], } } -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Joe McDonagh
2010-Jan-26 06:40 UTC
Re: [Puppet Users] A required definition dependency in a module manifest cannot be retrieved.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Nguyen wrote:> Hello, > > I''m hoping someone can help me out with this problem. > > I am having this problem where I have a custom mount definition in one > module manifest file, and require it in another manifest file in the same > module. However when the client retrieves its catalog, it cannot retrieve > the dependency. This worked fine before when I had these two outside of a > module, but since I moved this over to a module, it started to fail. Can > someone please help me out with this? > > Thanks, Paul > > Here is the error message: > rescomp2:~ # puppetd --test > info: Caching catalog for rescomp2 > err: Could not apply complete catalog: Could not retrieve dependency > ''Mount_nfs_dir[/linuxdeploy]'' of Package[monit] at > /etc/puppet/modules/rescomp2/manifests/rescomp_pkgs.pp:16 > > /etc/puppet/manifests/nodes/rescomp2.pp > > node rescomp2 { > include rescomp2::rescomp_mounts > include rescomp2::rescomp_pkgs > } > > > /etc/puppet/modules/rescomp2/manifests/rescomp_mounts.pp: > > class rescomp2::rescomp_mounts { > define mount_nfs_dir ($device, $options) { > file { "$name": > ensure => "directory", > } > > mount { "$name": > ensure => "mounted", > fstype => "nfs", > atboot => "true", > device => "$device", > options => "$options", > require => File[$name], > } > } > > mount_nfs_dir { "/linuxdeploy": > device => "nas-filer7:/vol/vol1/linuxdeploy", > options => "rw,rsize=32768,wsize=32768,hard,intr,fg", > } > } > > /etc/puppet/modules/rescomp2/manifests/rescomp_pkgs.pp: > > class rescomp2::rescomp_pkgs inherits rescomp2::rescomp_mounts { > package { "monit": > ensure => "present", > provider => "rpm", > source => "/linuxdeploy/RPM/monit/monit-5.0.3-1.x86_64.rpm", > *require => Mount_nfs_dir["/linuxdeploy"]*, > } > > file { "/etc/monitrc": > ensure => "present", > source => "puppet:///modules/rescomp2/etc/monitrc", > owner => "root", > group => "root", > mode => "600", > require => Package["monit"], > } > } >Requiring definitions that reside inside classes have to be fully-qualified, and capitalized like this: require => Rescomp2::Rescomp_mounts::Mount_nfs_dir["/linuxdeploy"] Even then, it might not work out this way. It seems a little weird to me. - -- Joe McDonagh AIM: YoosingYoonickz IRC: joe-mac on freenode L''ennui est contre-révolutionnaire -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktejlQACgkQRkBieEaRmuYaRACdG5SUYez3rJ9wElSGzx+OMNQt ri4AmQHB12UmNOSSm6EMWYL8vnWMh/z8 =+kzM -----END PGP SIGNATURE----- -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.