Foreman-proxy service cannot start due to puppet agent authorization

Hello,

I had an issue in the past few days where service foreman-proxy could not
start.
Error was due to facter external script in /etc/facter/facts.d which had
authorization issue.

By default, facter is used puppet which is launched as 'root'. Service
foreman-proxy is launched as foreman-proxy user which is not root, but try
to launch facter…

Is it possible to not launch facter at foreman-proxy service start ?

My platform => RHEL6.5 / foreman 1.4 / puppet 3.3.2

Regards

A little bump…

Is it really necessary to lauch facter at foreman proxy start?
May I change this config somewhere ?

Regards

··· On Friday, April 10, 2015 at 12:36:32 PM UTC+2, yannig rousseau wrote: > > Hello, > > I had an issue in the past few days where service foreman-proxy could not > start. > Error was due to facter external script in /etc/facter/facts.d which had > authorization issue. > > By default, facter is used puppet which is launched as 'root'. Service > foreman-proxy is launched as foreman-proxy user which is not root, but try > to launch facter... > > Is it possible to not launch facter at foreman-proxy service start ? > > My platform => RHEL6.5 / foreman 1.4 / puppet 3.3.2 > > Regards >

Check that you have /etc/foreman-proxy/settings.d/facts.yml with
:enabled: false inside. If you do already, or it makes no difference,
then it's likely that Puppet's loading Facter and there's not much you
can do about it.

Better just to fix the custom fact to not run when it's not root.

··· On 16/04/15 10:24, yannig rousseau wrote: > A little bump.. > > Is it really necessary to lauch facter at foreman proxy start? > May I change this config somewhere ?


Dominic Cleal
Red Hat Engineering

Hello,

Thanks a lot for your answer.
I checked on my server but there is no file config
:/etc/foreman-proxy/settings.d/facts.yml (foreman version is still 1.4)

I followed your advice and modified the custom fact but I'm still wondering
about this issue.
What is even more strange is that I have another puppet server which
doesn't seem to have this kind of issue (1.4.1 instead of 1.4.2) => facts
do not seem to be lauched during foreman-proxy service restart.

I'll upgrade both of my puppetserver to the same version and test it again.

Regards
Yannig

··· On Monday, April 20, 2015 at 2:47:21 PM UTC+2, Dominic Cleal wrote: > > On 16/04/15 10:24, yannig rousseau wrote: > > A little bump.. > > > > Is it really necessary to lauch facter at foreman proxy start? > > May I change this config somewhere ? > > Check that you have /etc/foreman-proxy/settings.d/facts.yml with > :enabled: false inside. If you do already, or it makes no difference, > then it's likely that Puppet's loading Facter and there's not much you > can do about it. > > Better just to fix the custom fact to not run when it's not root. > > -- > Dominic Cleal > Red Hat Engineering >