Foreman 1.5 / 1.4 on Fedora 19

Hi everyone,

I'm trying to build a Fedora 19 with Puppet-Foreman 1.5 or 1.4 but I keep
smashing on this wall:

"ERROR 2014-05-13 18:43:04 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xpto.local]:
Could not evaluate: 500 Internal Server Error"

Apache is running
Postgres is running
Puppet is running, giving :

[root@puppet ~]# puppet status dummyarg
{"is_alive":true,"version":"3.4.2"}

All installs where doing using Fedora repo, only extra repo used was the
Foreman.

I've run the install process several times in a raw, but no luck. attaching
the LOG.

I need the Fedora since Centos is not working well under the KVM
environment. (beats me, on my labs works on prod env dont)

Please your advice will be very welcome.

Jorge Gomes.

foreman-installer.log (12.3 KB)

I managed to find some error on the 'main' page, something about the rack
version, so I did:

gem uninstall rack, and it removed the version 1.5.2.

[root@puppet ~]# gem list rack

*** LOCAL GEMS ***

rack (1.4.5)
rack-cache (1.2)
rack-protection (1.3.2)
rack-ssl (1.3.2)
rack-test (0.6.2)

I run the 'foreman-installer -v' again, and this time gave me another error:

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xptol.local]/ensure:
change from absent to present failed: Could not set 'present' on ensure:
422 Unprocessable Entity at
12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register

But, I could login on the main page.

The 'smart proxy' wasn't there so I inserted it manually and it did
recognized the 'TFTP, puppet and puppet CA' but I still don't know if this
is working or not …

Please advice and help.

Regards.

/JG

··· On Tuesday, May 13, 2014 7:09:58 PM UTC+1, Jorge Gomes wrote: > > Hi everyone, > > I'm trying to build a Fedora 19 with Puppet-Foreman 1.5 or 1.4 but I keep > smashing on this wall: > > "ERROR 2014-05-13 18:43:04 main] > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xpto.local]: > Could not evaluate: 500 Internal Server Error" > > Apache is running > Postgres is running > Puppet is running, giving : > > [root@puppet ~]# puppet status dummyarg > {"is_alive":true,"version":"3.4.2"} > > All installs where doing using Fedora repo, only extra repo used was the > Foreman. > > I've run the install process several times in a raw, but no luck. > attaching the LOG. > > I need the Fedora since Centos is not working well under the KVM > environment. (beats me, on my labs works on prod env dont) > > Please your advice will be very welcome. > > Jorge Gomes. >

> I run the 'foreman-installer -v' again, and this time gave me another error:
>
> /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xptol.local]/ensure:
> change from absent to present failed: Could not set 'present' on ensure:
> 422 Unprocessable Entity at
> 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register

Hello,

this usually means there is already a smart proxy with a different name
for that URL. If you name it exactly the same as the hostname, this will
disappear. Or delete it, re-run the installer and it will create it with
the proper name.

> The 'smart proxy' wasn't there so I inserted it manually and it did
> recognized the 'TFTP, puppet and puppet CA' but I still don't know if this
> is working or not …

Yep, this is it.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi Lukas,

Thanks for your kind reply.

As I was used to have the 'foreman-proxy' setup automatically on the GUI, I
thought this was an error.

I had to rollback my server to a snap point where I only have the puppet
server installed.

Since one of the problem was the gem rack installation I'm going to put
here a step-by-step for what I m going to do.

For now the gems installed are:

root@puppet ~]# gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
daemon_controller (1.2.0)
io-console (0.4.2)
json (1.7.7)
passenger (4.0.42)
psych (2.0.0)
rack (1.5.2)
rake (10.3.1)
rdoc (4.0.1)
rgen (0.6.6)

And as I said, up to this point I m using the default repos from fedora19.

I'll have to remove the rack 1.5.2 latter on, but at this point I can't,
since it says that there are dependencies for it.

Regards.

Cumprimentos / Regards.
Jorge Gomes

··· _________________________________________________

Embora ninguém possa voltar atrás e fazer um novo começo,
qualquer um pode começar agora e fazer um novo fim.

  • Francisco Cândido Xavier

On 14 May 2014 07:47, Lukas Zapletal lzap@redhat.com wrote:

I run the ‘foreman-installer -v’ again, and this time gave me another
error:

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xptol.local]/ensure:

change from absent to present failed: Could not set ‘present’ on ensure:
422 Unprocessable Entity at
12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register

Hello,

this usually means there is already a smart proxy with a different name
for that URL. If you name it exactly the same as the hostname, this will
disappear. Or delete it, re-run the installer and it will create it with
the proper name.

The ‘smart proxy’ wasn’t there so I inserted it manually and it did
recognized the ‘TFTP, puppet and puppet CA’ but I still don’t know if
this
is working or not …

Yep, this is it.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/4NcJB3IzxZQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/d/optout.

Why do you use rubygems directly? Is this because you want newer puppet
in Fedora 19? We have all deps in our and fedora repos.

LZ

··· On Wed, May 14, 2014 at 03:14:52PM +0100, Jorge Gomes wrote: > Hi Lukas, > > Thanks for your kind reply. > > As I was used to have the 'foreman-proxy' setup automatically on the GUI, I > thought this was an error. > > I had to rollback my server to a snap point where I only have the puppet > server installed. > > Since one of the problem was the gem rack installation I'm going to put > here a step-by-step for what I m going to do. > > For now the gems installed are: > > root@puppet ~]# gem list > > *** LOCAL GEMS *** > > bigdecimal (1.2.0) > daemon_controller (1.2.0) > io-console (0.4.2) > json (1.7.7) > passenger (4.0.42) > psych (2.0.0) > rack (1.5.2) > rake (10.3.1) > rdoc (4.0.1) > rgen (0.6.6) > > And as I said, up to this point I m using the default repos from fedora19. > > I'll have to remove the rack 1.5.2 latter on, but at this point I can't, > since it says that there are dependencies for it. > > Regards. > > > Cumprimentos / Regards. > *Jorge Gomes* > _________________________________________________ > > Embora ninguém possa voltar atrás e fazer um novo começo, > qualquer um pode começar agora e fazer um novo fim. > - *Francisco Cândido Xavier* > > > > On 14 May 2014 07:47, Lukas Zapletal wrote: > > > > I run the 'foreman-installer -v' again, and this time gave me another > > error: > > > > > > > > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xptol.local]/ensure: > > > change from absent to present failed: Could not set 'present' on ensure: > > > 422 Unprocessable Entity at > > > 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register > > > > Hello, > > > > this usually means there is already a smart proxy with a different name > > for that URL. If you name it exactly the same as the hostname, this will > > disappear. Or delete it, re-run the installer and it will create it with > > the proper name. > > > > > The 'smart proxy' wasn't there so I inserted it manually and it did > > > recognized the 'TFTP, puppet and puppet CA' but I still don't know if > > this > > > is working or not ... > > > > Yep, this is it. > > > > -- > > Later, > > > > Lukas "lzap" Zapletal > > irc: lzap #theforeman > > > > -- > > You received this message because you are subscribed to a topic in the > > Google Groups "Foreman users" group. > > To unsubscribe from this topic, visit > > https://groups.google.com/d/topic/foreman-users/4NcJB3IzxZQ/unsubscribe. > > To unsubscribe from this group and all its topics, 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/d/optout. > > > > -- > 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/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi Lukas, thank you for your kind reply.

I’m following some ‘how-to’ I found on the net…for Centos 6.4 server.
I adapted it for Fedora.

··· On some point it says: Packages to install: yum install httpd-devel mod_ssl ruby-devel gcc-c++ curl-devel zlib-devel make automake openssl-devel

and then:

‘gem install rack passenger’
then
’passenger-install-apache2-module’

  • I think it is to this you are referring to, no?

Here are the steps I took last night to reinstall my server, again …

yum -y install http://yum.theforeman.org/releases/1.5/f19/x86_64/foreman-release.rpm
yum -y install foreman-installer
foreman-installer -v

[ERROR 2014-05-15 00:12:56 main] /Stage[main]/Postgresql::Server::Reload/Exec[postgresql_reload]: Failed to call refresh: service postgresql reload returned 1 instead of one of [0]
[ERROR 2014-05-15 00:12:56 main] /Stage[main]/Postgresql::Server::Reload/Exec[postgresql_reload]: service postgresql reload returned 1 instead of one of [0]
[ INFO 2014-05-15 00:14:09 main] -# WARN, DEBUG, ERROR, FATAL, INFO, UNKNOWN
[ INFO 2014-05-15 00:14:09 main] -:log_level: ERROR
[ERROR 2014-05-15 00:14:11 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.sumolcompal.local]: Could not evaluate: 500 Internal Server Error
[root@puppet ~]# cat /var/log/foreman-installer/foreman-installer.log |grep ERROR
[ERROR 2014-05-15 00:12:56 main] /Stage[main]/Postgresql::Server::Reload/Exec[postgresql_reload]: Failed to call refresh: service postgresql reload returned 1 instead of one of [0]
[ERROR 2014-05-15 00:12:56 main] /Stage[main]/Postgresql::Server::Reload/Exec[postgresql_reload]: service postgresql reload returned 1 instead of one of [0]
[ INFO 2014-05-15 00:14:09 main] -# WARN, DEBUG, ERROR, FATAL, INFO, UNKNOWN
[ INFO 2014-05-15 00:14:09 main] -:log_level: ERROR
[ERROR 2014-05-15 00:14:11 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.sumolcompal.local]: Could not evaluate: 500 Internal Server Error

re-run 2
[ERROR 2014-05-15 00:15:41 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.sumolcompal.local]: Could not evaluate: 500 Internal Server Error

Gone to the web main page, saw the error of the GEM…

gem list rack
*** LOCAL GEMS ***

rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-protection (1.3.2)
rack-ssl (1.3.2)
rack-test (0.6.2)

gem uninstall rack
Successfully uninstalled rack-1.5.2

gem list rack
*** LOCAL GEMS ***

rack (1.4.5)
rack-cache (1.2)
rack-protection (1.3.2)
rack-ssl (1.3.2)
rack-test (0.6.2)

re-run #3 of foreman-installer -v
ERROR 2014-05-15 00:18:27 main] Could not set ‘present’ on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
[ERROR 2014-05-15 00:18:27 main] Could not set ‘present’ on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
[ERROR 2014-05-15 00:18:27 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.sumolcompal.local]/ensure: change from absent to present failed: Could not set ‘present’ on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp

Went to the main page and refreshed.
Main login page appeared, login ok with defaults.

It did not installed the foreman-proxy

Running the installer again …
This time has completed with no errors…

Lukas, once again, thank you for your support and understanding.

Cheers.

JG

On 15 May 2014, at 13:59, Lukas Zapletal lzap@redhat.com wrote:

Why do you use rubygems directly? Is this because you want newer puppet
in Fedora 19? We have all deps in our and fedora repos.

LZ

On Wed, May 14, 2014 at 03:14:52PM +0100, Jorge Gomes wrote:

Hi Lukas,

Thanks for your kind reply.

As I was used to have the ‘foreman-proxy’ setup automatically on the GUI, I
thought this was an error.

I had to rollback my server to a snap point where I only have the puppet
server installed.

Since one of the problem was the gem rack installation I’m going to put
here a step-by-step for what I m going to do.

For now the gems installed are:

root@puppet ~]# gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
daemon_controller (1.2.0)
io-console (0.4.2)
json (1.7.7)
passenger (4.0.42)
psych (2.0.0)
rack (1.5.2)
rake (10.3.1)
rdoc (4.0.1)
rgen (0.6.6)

And as I said, up to this point I m using the default repos from fedora19.

I’ll have to remove the rack 1.5.2 latter on, but at this point I can’t,
since it says that there are dependencies for it.

Regards.

Cumprimentos / Regards.
Jorge Gomes


Embora ninguém possa voltar atrás e fazer um novo começo,
qualquer um pode começar agora e fazer um novo fim.

  • Francisco Cândido Xavier

On 14 May 2014 07:47, Lukas Zapletal lzap@redhat.com wrote:

I run the ‘foreman-installer -v’ again, and this time gave me another
error:

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[puppet.xptol.local]/ensure:

change from absent to present failed: Could not set ‘present’ on ensure:
422 Unprocessable Entity at
12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register

Hello,

this usually means there is already a smart proxy with a different name
for that URL. If you name it exactly the same as the hostname, this will
disappear. Or delete it, re-run the installer and it will create it with
the proper name.

The ‘smart proxy’ wasn’t there so I inserted it manually and it did
recognized the ‘TFTP, puppet and puppet CA’ but I still don’t know if
this
is working or not …

Yep, this is it.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/4NcJB3IzxZQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/d/optout.


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/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman


You received this message because you are subscribed to a topic in the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/foreman-users/4NcJB3IzxZQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/d/optout.

> I'm following some 'how-to' I found on the net…for Centos 6.4 server.
> I adapted it for Fedora.

Hello,

what how-to? Is that ours? Does the tutorial describe puppet or foreman
installation on Fedora 19?

Foreman supports F19 officially. We have everything:

http://yum.theforeman.org/releases/1.5/f19/x86_64/

Read this:

http://theforeman.org/manuals/1.5/index.html#2.Quickstart

> Lukas, once again, thank you for your support and understanding.

I wish I understood :slight_smile:

Currently I am shooting in the dark. I need more input.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi,

After messing about with my foreman install a bit, I want to remove
everything and install again.

But I can't find an uninstaller. Is there any current way to remove all
foreman components?

Kind regards,

Jorick Astrego
Netbulae B.V.

Hi Lukas, and thank you for your reply.

Sincerely I don’t know now from what how-to I gather the info. As far as I know, I have searched a lot for how-to’s last January, to start build the demo for the client.

Including a lot of docs from RedHat site. I just compiled the info that better suited for my case. I choose them to use Centos for that, as I’m familiar with that distro, and it seamed very good supported from Foreman team and all over the forums.

Since the client uses primarily SLES 11 for SAP, and I couldn’t build on top of it, I used a Centos 6.5 setup, then I wrote my own how to from my trial and error.
It was that ‘doc’ I used when I faced the problem when I ported the VM to the infra of the client. The Centos VM could not communicate outside the Hypervisor, but I had no time to investigate the problem in-depth .
So my decision and my team, was to build on top of an OS that didn’t face that issue. First I tried the openSUSE but time was short and I couldn’t install the Foreman on top of it.
Again, I went to Fedora 19, since there are ‘similarities’ between Centos and Fedora, I choose that one, and it worked well on the SLES KVM Hypervisors (3).

Regarding the addition of the repo you mentioned, I didn’t used it, it never occurred to me, and since Fedora was giving me the RPM's from their repos I never thought on using it, my bad probably.
But, I still can try adding it and see what happens.

Currently, we have it working, but is it working well?? I don’t know, I’m still in the very beginning on working with puppet and Foreman. I’m having a issue with puppet agent not ‘working’ well on the Fedora itself, but I can investigate it latter, as the compute resources are built now and the Hosts are ok too, for now …

We want this to provision VM’s for SAP, with templates from the ones that we already have built. Let’s see if I can do that. I hope so.

I can build a test machine on my own lab and see how it goes and how it performs against this one …

Quick question, is there any how-to’s to ‘move/migrate’ the settings/DB from this to a new machine?
Just in case I decide that the new build is working better or is a better ‘build’ than this one I made in a hurry.

Again, thank you for your patience, for all off us messing with this, and the ‘understanding’ for keeping supporting us with your knowledge.

Best regards.

/JG

··· On 15/05/2014, at 14:21, Lukas Zapletal wrote:

I’m following some ‘how-to’ I found on the net…for Centos 6.4 server.
I adapted it for Fedora.

Hello,

what how-to? Is that ours? Does the tutorial describe puppet or foreman
installation on Fedora 19?

Foreman supports F19 officially. We have everything:

http://yum.theforeman.org/releases/1.5/f19/x86_64/

Read this:

Foreman :: Manual

Lukas, once again, thank you for your support and understanding.

I wish I understood :slight_smile:

Currently I am shooting in the dark. I need more input.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman


You received this message because you are subscribed to a topic in the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/foreman-users/4NcJB3IzxZQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/d/optout.

> But I can't find an uninstaller. Is there any current way to remove all
> foreman components?

Hello,

if you have deployed Foreman via RPM or DEB packages, you can remove
them as usual. More about this in your distribution documentation.

··· -- Later, Lukas #lzap Zapletal

> Quick question, is there any how-to's to 'move/migrate' the settings/DB from this to a new machine?
> Just in case I decide that the new build is working better or is a better 'build' than this one I made in a hurry.

Backup on hostA, restore from backup on hostB. Make sure the hostB has
the very same FQDN, otherwise you will have a decent challenge of
changing and signing certificates. It is doable too, but we dont have
this fully covered in docs.

> Again, thank you for your patience, for all off us messing with this, and the 'understanding' for keeping supporting us with your knowledge.

From what I have seen, I'd recommend to stick with CentOS. There is no
big point of installing an open source project on a SOE environment
for which our support is very limited. It's just there are more cons
than pros IMHO.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hi Lucas,

I know how rpm works, thank you for the tip :->

But I mean dropping the database and removing all traces of the foreman
setup including settings, certificates, dependencies etc. This makes
things easier as an admin when testing different versions and different
configs. Normally I could redeploy a new environment every time but in
this setup the foreman is the deploy tool…

For katello there is katello-remove.sh and something like that would be
fine. I can put it together myself but if someone has it already it
saves some time.

Kind regards,
Jorick Astrego
Netbulae BV

··· On 07/17/2014 04:56 PM, Lukas Zapletal wrote: >> But I can't find an uninstaller. Is there any current way to remove all >> foreman components? > Hello, > > if you have deployed Foreman via RPM or DEB packages, you can remove > them as usual. More about this in your distribution documentation. >

> I know how rpm works, thank you for the tip :->
>
> But I mean dropping the database and removing all traces of the foreman
> setup including settings, certificates, dependencies etc. This makes things
> easier as an admin when testing different versions and different configs.
> Normally I could redeploy a new environment every time but in this setup
> the foreman is the deploy tool…

Hey, as soon as you remove packages with the configuration files (we
track most of them as ghost files), you should have clean setup. On
Debians you can remove config files automatically, on Red Hats there are
some tools for that.

But as you mentioned, there might be some certificates dropped here and
there, plus the postgres database :slight_smile:

We don't have an uninstaller for that. Any help in this regard more than
welcome!

··· -- Later, Lukas #lzap Zapletal