Thank you, this was a great help
On Wednesday, August 24, 2011 5:21:21 PM UTC+1, Luke Bigum wrote:
> Cheers, that'll teach me to cut and paste ;)
>
> The second example's resource name should be without quotes, so:
>
> $service_name = "httpd"
> service { $servicename: ensure => running }
> err: /Stage[main]/Puppet_dashboard::Service/Service[undef]/ensure:
> change from stopped to running failed: Could not start Service[undef]:
> Execution of '/sbin/service undef start' returned 1: at /etc/puppet/
> environments/testing/modules/httpd/manifests/service.pp:26
>
> On Aug 24, 5:12 pm, Henrik Lindberg <[email protected]>
> wrote:
> > I can't see any difference between your two examples.
> > Typo?
> > - henrik
> > On 8/24/11 5:23 PM, Luke Bigum wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Not sure if people are already aware of this, but it might save
> > > someone some time in the future. I've been tracking down the following
> > > error today, it's rather unhelpful in telling you where the problem is
> > > in your manifests:
> >
> > > # puppetd --test
> > > info: Retrieving plugin
> > > err: Could not retrieve catalog from remote server: Could not intern
> > > from pson: Could not convert from pson: Could not find relationship
> > > target "Service[]"
> >
> > > The problem is the parser using an empty string as a resource name
> > > which I arrived at by using a variable inside double quotes for a
> > > resource declaration. I did this for style (or have been until now) -
> > > I like to have user defined strings in quotes so it easily
> > > distinguishes between them and puppet keywords, plus for syntax
> > > highlighting, etc. Turns out this personal preference has shot me in
> > > the foot as the difference between the error messages for an empty
> > > string versus an undefined variable is rather big.
> >
> > > See this unhelpful message:
> >
> > > $service_name = "httpd"
> > > service { "$servicename": ensure => running }
> > > err: Could not retrieve catalog from remote server: Could not intern
> > > from pson: Could not convert from pson: Could not find relationship
> > > target "Service[]"
> >
> > > versus this:
> >
> > > $service_name = "httpd"
> > > service { "$servicename": ensure => running }
> > > err: /Stage[main]/Puppet_dashboard::Service/Service[undef]/ensure:
> > > change from stopped to running failed: Could not start Service[undef]:
> > > Execution of '/sbin/service undef start' returned 1: at /etc/puppet/
> > > environments/testing/modules/httpd/manifests/service.pp:26
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/4b9c3848-ea40-4709-aee2-73962edeb732%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.