Error messages with foreman-installer following upgrade from 1.5 to 1.6

Hello,

This morning I upgraded Foreman from 1.5 to 1.6. It looks like that
everything is working OK but I had errors when I ran foreman-installer
as suggested in :
http://www.theforeman.org/manuals/1.6/index.html#3.6Upgrade

The errors are :

Installing Notice:
/Stage[main]/Foreman_proxy::Config/Foreman [99%] Installing
Notice: /Stage[main]/Foreman_proxy::Config/Foreman [99%] Installing
Debug: Executing '/sbin/chkconfig foreman-proxy' [99%]
Installing Debug: Executing '/sbin/service foreman-proxy
stop [99%] Installing Debug: Executing '/sbin/service
foreman-proxy star [99%] Installing Notice:
/Stage[main]/Foreman_proxy::Service/Servic [99%] Installing
E, [2015-04-01T08:44:12.883529 #23552] ERROR – : [99%] Could not set
'present' on ensure: 422 Unprocessable Entity at
12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
Installing
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb: [99%] Could not set
'present' on ensure: 422 Unprocessable Entity at
12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
Installing
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:197 [99%]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[nanpuppet01.in2p3.fr]/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

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[nanpuppet01.in2p3.fr]:
Failed to call refresh: missing param 'id' in parameters
Installing Error:
/Stage[main]/Foreman_proxy::Register/Forema [99%]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[nanpuppet01.in2p3.fr]:
missing param 'id' in parameters
Installing Info: RESOURCE /var/lib/tftpboot//boot
[99%] Installing Debug: Class[Foreman::Puppetmaster]: The
container [99%] Installing Debug: Stored state in 0.17
seconds [99%] Installing Debug:
/File[/var/lib/puppet/rrd]/seluser: Found s [99%] Installing
Done [100%]Installing
Done [100%] []
Something went wrong! Check the log for ERROR-level output

=> Anything to worry about ? To be checked ?

Thank you

JM

··· -- ------------------------------------------------------------------------ Jean-michel BARBET | Tel: +33 (0)2 51 85 84 86 Laboratoire SUBATECH Nantes France | Fax: +33 (0)2 51 85 84 79 CNRS-IN2P3/Ecole des Mines/Universite | E-Mail: barbet@subatech.in2p3.fr ------------------------------------------------------------------------

> Hello,
>
> This morning I upgraded Foreman from 1.5 to 1.6. It looks like that
> everything is working OK but I had errors when I ran foreman-installer
> as suggested in :
> http://www.theforeman.org/manuals/1.6/index.html#3.6Upgrade

I don't believe this is great advice, frankly. It surprises some people
in what it tries to do on an existing installation.

> The errors are :
>
> Installing Notice:
> /Stage[main]/Foreman_proxy::Config/Foreman [99%] Installing
> Notice: /Stage[main]/Foreman_proxy::Config/Foreman [99%] Installing
> Debug: Executing '/sbin/chkconfig foreman-proxy' [99%]
> Installing Debug: Executing '/sbin/service foreman-proxy
> stop [99%] Installing Debug: Executing '/sbin/service
> foreman-proxy star [99%] Installing Notice:
> /Stage[main]/Foreman_proxy::Service/Servic [99%] Installing
> E, [2015-04-01T08:44:12.883529 #23552] ERROR – : [99%] Could not set
> 'present' on ensure: 422 Unprocessable Entity at

It's trying to register your smart proxy to Foreman, same as if you
registered it under Infrastructure > Smart proxies. If it's already
there, don't worry about it.

If you want to debug this further then check production.log to see why
it's refusing to add the smart proxy - perhaps it's registered under
another name etc.

··· On 01/04/15 08:20, Jean-Michel Barbet wrote:


Dominic Cleal
Red Hat Engineering

Hello Dominic,

Thanks,

I found the following in production.log :

Migrating to AddProxyToDomain (20101202104444)
Migrating to CreateProxyFeatures (20110213104226)
Migrating to AddPuppetMasterProxyToHostAndHostGroup (20120313081913)
Migrating to AddBmcFeatureToProxy (20120927020752)
Migrating to AddProxyToDomain (20101202104444)
Migrating to CreateProxyFeatures (20110213104226)
Migrating to AddPuppetMasterProxyToHostAndHostGroup (20120313081913)
Migrating to AddBmcFeatureToProxy (20120927020752)
Parameters: {"search"=>"name=nanpuppet01.in2p3.fr", "apiv"=>"v2",
"smart_proxy"=>{}}
Migrating to AddProxyToDomain (20101202104444)
Migrating to CreateProxyFeatures (20110213104226)
Migrating to AddPuppetMasterProxyToHostAndHostGroup (20120313081913)
Migrating to AddBmcFeatureToProxy (20120927020752)
Parameters: {"search"=>"name=nanpuppet01.in2p3.fr", "apiv"=>"v2",
"smart_proxy"=>{}}
Parameters:
{"smart_proxy"=>{"url"=>"https://nanpuppet01.in2p3.fr:8443",
"name"=>"nanpuppet01.in2p3.fr"}, "apiv"=>"v2"}
Unprocessable entity SmartProxy (id: new):
URL Only one declaration of a proxy is allowed
Parameters: {"search"=>"name=nanpuppet01.in2p3.fr", "apiv"=>"v2",
"smart_proxy"=>{}}
Started POST "/smart_proxies/1-puppet-proxy/ping" for 134.158.25.117 at
2015-04-01 08:45:33 +0200
Parameters: {"id"=>"1-puppet-proxy"}
Started GET "/smart_proxies/1-puppet-proxy/puppetca" for 134.158.25.117
at 2015-04-01 08:46:21 +0200
Parameters: {"smart_proxy_id"=>"1-puppet-proxy"}
Started GET "/puppetclasses/import_environments?proxy=1-puppet-proxy"
for 134.158.25.117 at 2015-04-01 09:29:27 +0200
Parameters: {"proxy"=>"1-puppet-proxy"}

=> Yes, it looks like foreman-installer tried to re-add the same
existing smart-proxy.

=> Anyway, I think everything works, I have been able to import
Puppet classes so I think it is OK

Will try shortly upgrading from 1.6 to 1.7 :slight_smile:

JM

··· On 04/01/2015 05:03 PM, Dominic Cleal wrote:

It’s trying to register your smart proxy to Foreman, same as if you
registered it under Infrastructure > Smart proxies. If it’s already
there, don’t worry about it.

If you want to debug this further then check production.log to see why
it’s refusing to add the smart proxy - perhaps it’s registered under
another name etc.

Jean-michel BARBET | Tel: +33 (0)2 51 85 84 86
Laboratoire SUBATECH Nantes France | Fax: +33 (0)2 51 85 84 79
CNRS-IN2P3/Ecole des Mines/Universite | E-Mail: barbet@subatech.in2p3.fr

> Parameters: {"search"=>"name=nanpuppet01.in2p3.fr", "apiv"=>"v2",
> "smart_proxy"=>{}}
> Parameters:
> {"smart_proxy"=>{"url"=>"https://nanpuppet01.in2p3.fr:8443",
> "name"=>"nanpuppet01.in2p3.fr"}, "apiv"=>"v2"}
> Unprocessable entity SmartProxy (id: new):
> URL Only one declaration of a proxy is allowed
> Parameters: {"search"=>"name=nanpuppet01.in2p3.fr", "apiv"=>"v2",
> "smart_proxy"=>{}}
> Started POST "/smart_proxies/1-puppet-proxy/ping" for 134.158.25.117 at
> 2015-04-01 08:45:33 +0200
> Parameters: {"id"=>"1-puppet-proxy"}
> Started GET "/smart_proxies/1-puppet-proxy/puppetca" for 134.158.25.117
> at 2015-04-01 08:46:21 +0200
> Parameters: {"smart_proxy_id"=>"1-puppet-proxy"}
> Started GET "/puppetclasses/import_environments?proxy=1-puppet-proxy"
> for 134.158.25.117 at 2015-04-01 09:29:27 +0200
> Parameters: {"proxy"=>"1-puppet-proxy"}
>
> => Yes, it looks like foreman-installer tried to re-add the same
> existing smart-proxy.

Yes, it's there and just under a different name. If you use
"foreman-installer --foreman-proxy-registered-name=puppet-proxy" (or the
exact name, the logs obfuscate it a little) then it should be OK too.

> => Anyway, I think everything works, I have been able to import
> Puppet classes so I think it is OK

Yep, all looks good.

··· On 01/04/15 16:10, Jean-Michel Barbet wrote:


Dominic Cleal
Red Hat Engineering