Clay B.
2012-Jan-11 12:55 UTC
[Puppet Users] Exported and Collected Resource With User Defined Resource Broken?
Hello all, The key issue is, if I uncomment the line: Myresource <<| |>> { ensure => present } I get the error: err: Could not find type Myresource on node hmaster I''m attempting to follow the instructions from the book Pro Puppet pgs. 143-145; however, it seems that there''s a parser issue or I''m very lost, as I am unable to export and collect my resource while I am able to export and collect both host and sshkey resources fine. Am I doing something incorrectly? I am using Puppet 2.7.5 on both my puppet master (Debian with puppet built from source) and clients (CentOS 5 with puppet from rpmforge). A unit test to show the failure is as follows (everything in site.pp): ---------------------------------------------------------------------- node /hslave[0-9].local/ { class{"hslave":} } node /hmaster.local/ { class{"hslave": before => Class["hslave_file"]} class{"hslave_file":} } class hslave { # This works @myresource{ "${::hostname}-virtual": } # This "works" but can''t seem to be collected @@myresource{ "${::hostname}": } } class hslave_file{ # This fails with: # err: Could not find type Myresource on node hmaster # Myresource <<| |>> { ensure => present } # This works fine Myresource <| |> { ensure => present } # This works fine myresource { "${::hostname}-extra": ensure => present } } define myresource($ensure = present) { file { "/tmp/puppet_test$name": ensure => $ensure } } For reference, after running this on "hmaster" I have: [hadmin@hmaster ~]$ ls -l /tmp/*hmaster* -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-extra -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-virtual Thank you, Clay -- 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.
Clay B.
2012-Jan-12 17:24 UTC
[Puppet Users] Exported and Collected Resource With User Defined Resource Broken?
Hello all, The key issue is, if I uncomment the line: Myresource <<| |>> { ensure => present } (Despite having defined the resource) I get the error: err: Could not find type Myresource on node hmaster I''m attempting to follow the instructions from the book Pro Puppet pgs. 143-145; however, it seems that I''m very lost, as I am unable to export and collect my resource while I am able to export and collect both host and sshkey resources fine. Am I doing something incorrectly? I am using Puppet 2.7.5 on both my puppet master (Debian with puppet built from source) and clients (CentOS 5 with puppet from rpmforge). A unit test to show the failure is as follows (everything in site.pp): ---------------------------------------------------------------------- node /hslave[0-9].local/ { class{"hslave":} } node /hmaster.local/ { class{"hslave": before => Class["hslave_file"]} class{"hslave_file":} } class hslave { # This works @myresource{ "${::hostname}-virtual": } # This "works" but can''t seem to be collected @@myresource{ "${::hostname}": } } class hslave_file{ # This fails with: # err: Could not find type Myresource on node hmaster # Myresource <<| |>> { ensure => present } # This works fine Myresource <| |> { ensure => present } # This works fine myresource { "${::hostname}-extra": ensure => present } } define myresource($ensure = present) { file { "/tmp/puppet_test$name": ensure => $ensure } } For reference, after running this on "hmaster" I have: [hadmin@hmaster ~]$ ls -l /tmp/*hmaster* -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-extra -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-virtual Thank you, Clay -- 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.
Clay B.
2012-Feb-06 18:10 UTC
[Puppet Users] Re: Exported and Collected Resource With User Defined Resource Broken?
I have found that using Puppet 2.6.2 on my master and running Puppet 2.6.12 on my clients seems to have resolved this issue, while 2.7 was failing. Perhaps Puppet defined resources have different semantics in 2.7? -Clay On Thu, 12 Jan 2012, Clay B. wrote:> Hello all, > > The key issue is, if I uncomment the line: > Myresource <<| |>> { ensure => present } > > (Despite having defined the resource) I get the error: > err: Could not find type Myresource on node hmaster > > I''m attempting to follow the instructions from the book Pro Puppet pgs. > 143-145; however, it seems that I''m very lost, as I am unable to export and > collect my resource while I am able to export and collect both host and > sshkey resources fine. Am I doing something incorrectly? > > I am using Puppet 2.7.5 on both my puppet master (Debian with puppet built > from source) and clients (CentOS 5 with puppet from rpmforge). > > A unit test to show the failure is as follows (everything in site.pp): > ---------------------------------------------------------------------- > node /hslave[0-9].local/ { > class{"hslave":} > } > > node /hmaster.local/ { > class{"hslave": before => Class["hslave_file"]} > class{"hslave_file":} > } > > class hslave { > # This works > @myresource{ "${::hostname}-virtual": } > > # This "works" but can''t seem to be collected > @@myresource{ "${::hostname}": } > } > > class hslave_file{ > # This fails with: > # err: Could not find type Myresource on node hmaster > # Myresource <<| |>> { ensure => present } > > # This works fine > Myresource <| |> { ensure => present } > > # This works fine > myresource { "${::hostname}-extra": ensure => present } > } > > define myresource($ensure = present) { > file { "/tmp/puppet_test$name": ensure => $ensure } > } > > For reference, after running this on "hmaster" I have: > [hadmin@hmaster ~]$ ls -l /tmp/*hmaster* > -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster > -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-extra > -rw-r--r-- 1 root root 0 Jan 11 07:54 /tmp/puppet_testhmaster-virtual > > Thank you, > Clay >-- 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.
Craig White
2012-Feb-06 21:43 UTC
Re: [Puppet Users] Re: Exported and Collected Resource With User Defined Resource Broken?
On Feb 6, 2012, at 11:10 AM, Clay B. wrote:> I have found that using Puppet 2.6.2 on my master and running Puppet 2.6.12 on my clients seems to have resolved this issue, while 2.7 was failing. > > Perhaps Puppet defined resources have different semantics in 2.7?---- I can''t answer that but your ''master'' should always be at least equal to or higher than the version of all clients. Craig -- 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.
Clay B.
2012-Feb-07 00:07 UTC
Re: [Puppet Users] Re: Exported and Collected Resource With User Defined Resource Broken?
On Mon, 6 Feb 2012, Craig White wrote:> > On Feb 6, 2012, at 11:10 AM, Clay B. wrote: > >> I have found that using Puppet 2.6.2 on my master and running Puppet 2.6.12 on my clients seems to have resolved this issue, while 2.7 was failing. >> >> Perhaps Puppet defined resources have different semantics in 2.7? > ---- > I can''t answer that but your ''master'' should always be at least equal to or higher than the version of all clients. > > Craig >Unfortunately, it seems to be the state of the 2.6 packages available for Centos and Debian via puppetlab''s Yum and Debian''s Apt repos; but at least they seem to play nicely -- so far. (It seems apt.puppetlabs.org only has 2.7 versions.) Thank you Puppet-folk for providing the repositories! (With vendor defaults and Puppetlab''s repos.) [admin@rpmhost ~]$ yum list puppet|grep 2.6 Repository ''puppetlabs'' is missing name in configuration, using id puppet.noarch 2.6.12-2.el5 installed admin@debhost:~$ apt-cache policy puppet|grep 2.6 Installed: 2.6.2-5+squeeze3 *** 2.6.2-5+squeeze3 0 2.6.2-5+squeeze1 0 -Clay -- 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.