Custom fact not set with mc-puppetd

166 views
Skip to first unread message

Stefan Heijmans

unread,
Nov 1, 2011, 4:51:48 PM11/1/11
to Puppet Users
Hello,

I've mcollective 1.2.1 with puppet 2.6.12 on rhel5.6, facter 1.6.2
setup from http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/FactsFacterYAML.

Now I've create a custom fact in /usr/lib/ruby/site_ruby/1.8/facter/
customer_status.rb.
On the client;
Running facter customer_status works.
Running 'puppet agent --test' works, customer_status is set in /etc/
mcollective/facts.yaml

On the server;
But running 'mc-puppetd --wi <client> runonce' doesn't set the
customer_status in /etc/mcollective/facts.yaml.

Anyone an idea why?

Thanks,
Stefan

R.I.Pienaar

unread,
Nov 1, 2011, 5:00:53 PM11/1/11
to puppet...@googlegroups.com

----- Original Message -----
> Hello,
>
> I've mcollective 1.2.1 with puppet 2.6.12 on rhel5.6, facter 1.6.2
> setup from
> http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/FactsFacterYAML.
>
> Now I've create a custom fact in /usr/lib/ruby/site_ruby/1.8/facter/
> customer_status.rb.

you should be using pluginsync to copy out custom facts:

http://docs.puppetlabs.com/guides/plugins_in_modules.html

> On the client;
> Running facter customer_status works.
> Running 'puppet agent --test' works, customer_status is set in /etc/
> mcollective/facts.yaml
>
> On the server;
> But running 'mc-puppetd --wi <client> runonce' doesn't set the
> customer_status in /etc/mcollective/facts.yaml.

this could only really be down to some environment change, maybe its
not picking up those fact or your custom fact only works based on
some set of stuff in the environment etc?

all runonce does is do:

puppetd --onetime

which will spawn off a copy of puppet into the background and let it do
a normal run, with pluginsync enabled in puppet.conf etc it should all
work fine.

Stefan Heijmans

unread,
Nov 1, 2011, 6:00:18 PM11/1/11
to Puppet Users
On Nov 1, 10:00 pm, "R.I.Pienaar" <r...@devco.net> wrote:
> ----- Original Message -----
>
> you should be using pluginsync to copy out custom facts:
>
> http://docs.puppetlabs.com/guides/plugins_in_modules.html
>
Ok, enabled pluginsync, customer_status.rb is now copied to the client
in /var/lib/puppet/lib/facts.

> this could only really be down to some environment change, maybe its
> not picking up those fact or your custom fact only works based on
> some set of stuff in the environment etc?
>
Correct, customer_status.rb was picking up an environment variable set
from a file in /etc/profile.d/
I've changed customer_status.rb to get the value directly from this
file.

'mc-puppetd --wi <client> runonce' doens't work with
customer_status.rb in /var/lib/puppet/lib/facts
but it does work with customer_status.rb in /usr/lib/ruby/site_ruby/
1.8/facter.
Reply all
Reply to author
Forward
0 new messages