Douglas Garstang
2011-Sep-22 20:48 UTC
[Puppet Users] Error ''Could not find relationship target''
I''ve got this in a YAML file: volumes: - {id: 1, hostname: hsync00, iport: 20011, mount: "x", newusers: false } and I''m using extlookup to load it: class platform::test { $config = extlookup("volumes", "NA", "config/volumes") platform::do_something { $config: } } I''m then passing that array to do_something, so that it will run the definition once for each item in the array: define platform::do_something { notice ("data = ${name[''id'']}") } However, this is giving me the error: SSep 22 13:41:09 test02 puppet-agent[29875]: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "Platform::Do_something[mountxid1newusersfalsehostnamehsync00iport20011]" I''ve played around with the yaml data, shortened it, added quotes, removed quotes etc and sometimes it seems to work, and other times it doesn''t. Is there maybe a limit to the length of the $name field that I am hitting? Doug. -- 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.
Ken Barber
2011-Sep-23 08:12 UTC
Re: [Puppet Users] Error ''Could not find relationship target''
Hmm - could be that you can''t pass a hash in as the namevar? At least last time I looked this was true :-) ... you can certainly pass a hash as a parameter if you like - but namevar should be just a string ... or array to create multiple resources - but still an array of strings :-). Not sure why it sometimes works though ... On Thu, Sep 22, 2011 at 1:48 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> I''ve got this in a YAML file: > > volumes: > - {id: 1, hostname: hsync00, iport: 20011, mount: "x", newusers: false } > > and I''m using extlookup to load it: > > class platform::test { > $config = extlookup("volumes", "NA", "config/volumes") > platform::do_something { $config: } > } > > I''m then passing that array to do_something, so that it will run the > definition once for each item in the array: > > define platform::do_something { > notice ("data = ${name[''id'']}") > } > > However, this is giving me the error: > > SSep 22 13:41:09 test02 puppet-agent[29875]: Could not retrieve > catalog from remote server: Could not intern from pson: Could not > convert from pson: Could not find relationship target > "Platform::Do_something[mountxid1newusersfalsehostnamehsync00iport20011]" > > I''ve played around with the yaml data, shortened it, added quotes, > removed quotes etc and sometimes it seems to work, and other times it > doesn''t. Is there maybe a limit to the length of the $name field that > I am hitting? > > Doug. > > -- > 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. > >-- 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.