external classifier not calling class

15 views
Skip to first unread message

Asif Iqbal

unread,
Mar 4, 2010, 1:15:47 AM3/4/10
to puppet...@googlegroups.com
Hi I am running puppet client 0.24.7 and puppet master 0.25.1

Here is my classifier

(root)@sys-ubuntu:/usr/local/bin# cat external.sh
#!/bin/sh
# Super-simple external_node script for versions 0.23 and later
cat <<"END"
---
classes:
- stb
- securid::server
parameters:
puppet_server: puppet.example.net
END
exit 0

here is the dir structure for the securid module

(root)@sys-ubuntu:/etc/puppet/manifests# ls -lR classes/stb.pp
-rw-r--r-- 1 puppet puppet 195 2010-02-25 14:51 classes/stb.pp

(root)@sys-ubuntu:/etc/puppet/modules# ls -lR securid/
securid/:
total 12
drwxr-xr-x 2 puppet puppet 4096 2010-03-03 22:28 files
drwxr-xr-x 3 puppet puppet 4096 2010-03-03 23:48 manifests
drwxr-xr-x 2 puppet puppet 4096 2010-03-03 22:28 templates

securid/files:
total 0

securid/manifests:
total 8
drwxr-xr-x 2 root root 4096 2010-03-03 23:48 RCS
-rw------- 1 root root 376 2010-03-03 23:48 server.pp

securid/templates:
total 0

Any idea why puppet client is showing absolutely no sign of any class
when running it? I tried many other classes with same result

I tried to put a "/bin/date > /tmp/nodes" as the top line of the
classifier and it is continuously updating that file

(root)@sys-ubuntu:/usr/local/bin# cat external.sh
#!/bin/sh
# Super-simple external_node script for versions 0.23 and later
/bin/date > /tmp/nodes # this generates and updates continuously
cat <<"END"
---
classes:
- stb
- securid::server
parameters:
puppet_server: puppet.example.net
END
exit 0

So it does read the classifier file but not making any attempt to call
the classes

Here is the puppet client report

http://pastie.org/853080

It stopped working. I had been using the same classifier to manage my nodes.

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Asif Iqbal

unread,
Mar 4, 2010, 1:08:57 PM3/4/10
to puppet...@googlegroups.com
still not worky. any help would be appreciated.

Paul Lathrop

unread,
Mar 4, 2010, 1:26:09 PM3/4/10
to puppet...@googlegroups.com
In case anyone is looking at this, Asif and I spent some time in
#puppet talking about this and we've eliminated:

* formatting of the YAML (whitespace, etc.)
* missing "environment:" parameter in YAML (doesn't appear to be required)

--Paul

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

Asif Iqbal

unread,
Mar 4, 2010, 2:05:41 PM3/4/10
to puppet...@googlegroups.com
On Thu, Mar 4, 2010 at 1:26 PM, Paul Lathrop <paul.l...@gmail.com> wrote:
> In case anyone is looking at this, Asif and I spent some time in
> #puppet talking about this and we've eliminated:
>
> * formatting of the YAML (whitespace, etc.)
> * missing "environment:" parameter in YAML (doesn't appear to be required)
>
> --Paul

following Paul's advice I updated the config.ru
(/usr/share/puppet/rack/puppetmasterd/config.ru)

ARGV << "--debug"

and now I see this in the puppetd on client

debug: Calling puppetmaster.getconfig
err: Could not call puppetmaster.getconfig: #<RuntimeError:
HTTP-Error: 500 Internal Server Error>
err: Could not retrieve catalog: HTTP-Error: 500 Internal Server Error

Asif Iqbal

unread,
Mar 4, 2010, 4:51:15 PM3/4/10
to puppet...@googlegroups.com
On Thu, Mar 4, 2010 at 2:05 PM, Asif Iqbal <vad...@gmail.com> wrote:
> On Thu, Mar 4, 2010 at 1:26 PM, Paul Lathrop <paul.l...@gmail.com> wrote:
>> In case anyone is looking at this, Asif and I spent some time in
>> #puppet talking about this and we've eliminated:
>>
>> * formatting of the YAML (whitespace, etc.)
>> * missing "environment:" parameter in YAML (doesn't appear to be required)
>>
>> --Paul
>
> following Paul's advice I updated the config.ru
> (/usr/share/puppet/rack/puppetmasterd/config.ru)
>
> ARGV << "--debug"
>
> and now I see this in the puppetd on client
>
> debug: Calling puppetmaster.getconfig
> err: Could not call puppetmaster.getconfig: #<RuntimeError:
> HTTP-Error: 500 Internal Server Error>
> err: Could not retrieve catalog: HTTP-Error: 500 Internal Server Error

Volcane from #puppet at irc.freenode.net helped me find out the problem

passenger calls puppetmasterd as user `nobody'. Once I changed the
puppet dirs to
own by `nobody' all started working.

That means when I updated the config.ru it decided to run
puppetmasterd as user `nobody'
instead of user `puppet' . older config.ru did not have that issue.

Here are my old config.ru and new config.ru.

http://pastie.org/854064

Any idea what change I can make on new config.ru
so that puppetmasterd runs as user `puppet' instead?

> [..]

Atha Kouroussis

unread,
Mar 4, 2010, 5:09:14 PM3/4/10
to puppet...@googlegroups.com

Hi Asif,
I was under the understanding that passenger run puppet under the user that was the owner of the config.ru file. At least that's the way we have it configured and we've had no issues so far.

Cheers,
Atha


>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>

Asif Iqbal

unread,
Mar 4, 2010, 5:33:08 PM3/4/10
to puppet...@googlegroups.com

That was it!

Thanks a lot.

Peter Meier

unread,
Mar 4, 2010, 5:54:28 PM3/4/10
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> passenger calls puppetmasterd as user `nobody'. Once I changed the
> puppet dirs to
> own by `nobody' all started working.
>
> That means when I updated the config.ru it decided to run
> puppetmasterd as user `nobody'
> instead of user `puppet' . older config.ru did not have that issue.
>
> Here are my old config.ru and new config.ru.
>
> http://pastie.org/854064
>
> Any idea what change I can make on new config.ru
> so that puppetmasterd runs as user `puppet' instead?

passenger decides based on the owner of config.ru with which user the
application is started. If the owner is root, it is started with the
default apache user [1].

Hence own the config.ru as puppet, reown the folders and everything will
work.

imho this issue is totally unreleated to the content of your config.

cheers pete

[1]
http://www.modrails.com/documentation/Users%20guide%20Apache.html#user_switching
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuQOiEACgkQbwltcAfKi3//cQCffQKm8HnX1P7pmrt09ax84e5D
wmMAn0Gy8fK1RaIQdC6mAPXrAofdBWsU
=nO5e
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages