Foreman 1.4 puppet run fails

Hello,

I don't know if this is a puppet issue or a foreman one, but after
upgrading to foreman 1.4, all puppet runs fail with:

Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not
retrieve information from environment production source(s)
puppet://v-is-puppet-01.company.net/plugins
Notice: /File[/var/lib/puppet/lib/puppet]: Dependency
File[/var/lib/puppet/lib] has failures: true
Warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
dependencies

In httpd logs I get this:
[Wed Jan 29 15:35:45 2014] [error] [client 10.220.20.231] File does
not exist: /etc/puppet/rack/public
10.220.20.231 - - [29/Jan/2014:15:35:45 +0200] "GET
/production/node/v-is-puppet-02.company.net? HTTP/1.1" 404 239 "-" "-"

If I put in foreman /production/node/v-is-puppet-02.company.net I get
an error also.

It's working if I use /node/v-is-puppet-02.company.net

Can I set the path somewhere for this?

Best regards,
Cristian Falcas

> Hello,
>
> I don't know if this is a puppet issue or a foreman one, but after
> upgrading to foreman 1.4, all puppet runs fail with:
>
> Info: Retrieving plugin
> Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not
> retrieve information from environment production source(s)
> puppet://v-is-puppet-01.company.net/plugins
> Notice: /File[/var/lib/puppet/lib/puppet]: Dependency
> File[/var/lib/puppet/lib] has failures: true
> Warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed
> dependencies
> …
>
>
>
> In httpd logs I get this:
> [Wed Jan 29 15:35:45 2014] [error] [client 10.220.20.231] File does
> not exist: /etc/puppet/rack/public

This would be a problem - our installer normally creates it and adds a
config.ru file inside. I'd perhaps check there weren't any installer
errors and maybe re-run it.

> 10.220.20.231 - - [29/Jan/2014:15:35:45 +0200] "GET
> /production/node/v-is-puppet-02.company.net? HTTP/1.1" 404 239 "-" "-"
>
> If I put in foreman /production/node/v-is-puppet-02.company.net I get
> an error also.
>
> It's working if I use /node/v-is-puppet-02.company.net
>
> Can I set the path somewhere for this?

You've got a more basic issue with the puppetmaster application not
being set up correctly.

··· On 29/01/14 13:39, Cristian Falcas wrote:


Dominic Cleal
Red Hat Engineering

I was mistaken about working if I change the url. It worked on
foreman, not on puppet master.

Master config:

[master]
autosign = $confdir/autosign.conf { mode = 664 }
reports = foreman,log,store
external_nodes = /etc/puppet/node.rb
node_terminus = exec
ca = false
ssldir = /var/lib/puppet/ssl
certname = v-is-puppet-01.synygy.net

manifest       = /etc/puppet/environments/$environment/manifests/site.pp
modulepath     = /etc/puppet/environments/$environment/modules
config_version =

Existing environments:

[root@v-is-puppet-01 puppet]# ls /etc/puppet/environments/
common development production

All request seem to be 404:

==> /var/log/httpd/puppet_error_ssl.log <==
[Wed Jan 29 18:08:09 2014] [error] [client 10.220.20.231] File does
not exist: /etc/puppet/rack/public/development

==> /var/log/httpd/puppet_access_ssl.log <==
10.220.20.231 - - [29/Jan/2014:18:08:09 +0200] "GET
/development/node/v-is-puppet-02.company.net? HTTP/1.1" 404 240 "-"
"-"

==> /var/log/httpd/puppet_error_ssl.log <==
[Wed Jan 29 18:08:11 2014] [error] [client 10.220.20.231] File does
not exist: /etc/puppet/rack/public/development

==> /var/log/httpd/puppet_access_ssl.log <==
10.220.20.231 - - [29/Jan/2014:18:08:11 +0200] "GET
/development/file_metadatas/plugins?recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5&links=manage
HTTP/1.1" 404 232 "-" "-"

==> /var/log/httpd/puppet_error_ssl.log <==
[Wed Jan 29 18:08:11 2014] [error] [client 10.220.20.231] File does
not exist: /etc/puppet/rack/public/development

==> /var/log/httpd/puppet_access_ssl.log <==
10.220.20.231 - - [29/Jan/2014:18:08:11 +0200] "GET
/development/file_metadata/plugins?links=manage HTTP/1.1" 404 231 "-"
"-"

==> /var/log/httpd/puppet_error_ssl.log <==
[Wed Jan 29 18:08:14 2014] [error] [client 10.220.20.231] File does
not exist: /etc/puppet/rack/public/development

==> /var/log/httpd/puppet_access_ssl.log <==
10.220.20.231 - - [29/Jan/2014:18:08:14 +0200] "POST
/development/catalog/v-is-puppet-02.company.net HTTP/1.1" 404 243 "-"
"-"
10.220.20.231 - - [29/Jan/2014:18:08:14 +0200] "PUT
/development/report/v-is-puppet-02.company.net HTTP/1.1" 405 265 "-"
"-"

··· On Wed, Jan 29, 2014 at 3:39 PM, Cristian Falcas wrote: > Hello, > > I don't know if this is a puppet issue or a foreman one, but after > upgrading to foreman 1.4, all puppet runs fail with: > > Info: Retrieving plugin > Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not > retrieve information from environment production source(s) > puppet://v-is-puppet-01.company.net/plugins > Notice: /File[/var/lib/puppet/lib/puppet]: Dependency > File[/var/lib/puppet/lib] has failures: true > Warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed > dependencies > ..... > > > > In httpd logs I get this: > [Wed Jan 29 15:35:45 2014] [error] [client 10.220.20.231] File does > not exist: /etc/puppet/rack/public > 10.220.20.231 - - [29/Jan/2014:15:35:45 +0200] "GET > /production/node/v-is-puppet-02.company.net? HTTP/1.1" 404 239 "-" "-" > > If I put in foreman /production/node/v-is-puppet-02.company.net I get > an error also. > > It's working if I use /node/v-is-puppet-02.company.net > > Can I set the path somewhere for this? > > Best regards, > Cristian Falcas

Hi,

It seems that the passenger.conf file is wrong when installing only a
puppet master.

Content of /etc/httpd/conf.d/passenger.conf on puppet master proxy only:

<IfModule mod_passenger.c>
PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17
PassengerRuby /usr/bin/ruby

</IfModule>

Content of the same file when installing foreman also:

<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5
PassengerRuby /usr/bin/ruby
</IfModule>

Best regards,
Cristian Falcas

··· On Wed, Jan 29, 2014 at 5:04 PM, Dominic Cleal wrote: > On 29/01/14 13:39, Cristian Falcas wrote: >> Hello, >> >> I don't know if this is a puppet issue or a foreman one, but after >> upgrading to foreman 1.4, all puppet runs fail with: >> >> Info: Retrieving plugin >> Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not >> retrieve information from environment production source(s) >> puppet://v-is-puppet-01.company.net/plugins >> Notice: /File[/var/lib/puppet/lib/puppet]: Dependency >> File[/var/lib/puppet/lib] has failures: true >> Warning: /File[/var/lib/puppet/lib/puppet]: Skipping because of failed >> dependencies >> ..... >> >> >> >> In httpd logs I get this: >> [Wed Jan 29 15:35:45 2014] [error] [client 10.220.20.231] File does >> not exist: /etc/puppet/rack/public > > This would be a problem - our installer normally creates it and adds a > config.ru file inside. I'd perhaps check there weren't any installer > errors and maybe re-run it. > >> 10.220.20.231 - - [29/Jan/2014:15:35:45 +0200] "GET >> /production/node/v-is-puppet-02.company.net? HTTP/1.1" 404 239 "-" "-" >> >> If I put in foreman /production/node/v-is-puppet-02.company.net I get >> an error also. >> >> It's working if I use /node/v-is-puppet-02.company.net >> >> Can I set the path somewhere for this? > > You've got a more basic issue with the puppetmaster application not > being set up correctly. > > -- > Dominic Cleal > Red Hat Engineering > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.

Ah, good find!

This was a bug in the puppetlabs-apache module that we started using
from Foreman 1.4, our fix for which has just been merged there. We had
to put a workaround for Foreman in 1.4.0.

Perhaps in 1.4.1 we can pull the updated version of the module to fix
this issue properly.

··· On 30/01/14 08:00, Cristian Falcas wrote: > Hi, > > It seems that the passenger.conf file is wrong when installing only a > puppet master. > > Content of /etc/httpd/conf.d/passenger.conf on puppet master proxy only: > > > PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17 > PassengerRuby /usr/bin/ruby > > > > Content of the same file when installing foreman also: > > > PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5 > PassengerRuby /usr/bin/ruby >


Dominic Cleal
Red Hat Engineering