When the installer or other applications used Foreman's API and an error occurred, the locale to render error messages was not initialized.
As a consequence error messages in a random, non-English locale would be shown to the user.
This has been fixed and the locale is now initialized when using the API, defaulting to US English.
Now, when an error occurs between the API and the installer, error messages will be logged in English.
Created attachment 833560[details]
log
Description of problem:
During a failure to install forman I got an error in Spanish in the code:
Started POST "/api/smart_proxies" for 10.35.160.133 at 2013-12-05
17:01:27 +0200
Processing by Api::V1::SmartProxiesController#create as JSON
Parameters:
{"smart_proxy"=>{"url"=>"https://cougar06.scl.lab.tlv.redhat.com:9090",
"name"=>"cougar06.scl.lab.tlv.redhat.com"}}
Authorized user admin(Admin User)
Unprocessable entity SmartProxy (id: new):
No ha sido posible establecer una comunicación con el proxy:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
Por favor, comprueba que el proxy está configurado y ejecutándose en
el equipo
Version-Release number of selected component (if applicable):
openstack-foreman-installer-0.0.22-1.el6ost.noarch
How reproducible:
100%
Steps to Reproduce:
1. install a physical host from theforman
2. install forman on the host
3. after first failure:
rm -f /var/lib/puppet/ssl
rm -rf /var/lib/mysql/mysql.sock
/etc/init.d/puppetmaster restart
/etc/init.d/mysqld restart
run puppet installation again
Actual results:
we get an error in Spanish that the forman-proxy should be restarted.
Expected results:
error should be translated to English
Additional info:
Started POST "/api/smart_proxies" for 10.35.160.133 at 2013-12-05
17:01:27 +0200
Processing by Api::V1::SmartProxiesController#create as JSON
Parameters:
{"smart_proxy"=>{"url"=>"https://cougar06.scl.lab.tlv.redhat.com:9090",
"name"=>"cougar06.scl.lab.tlv.redhat.com"}}
Authorized user admin(Admin User)
Unprocessable entity SmartProxy (id: new):
No ha sido posible establecer una comunicación con el proxy:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
Por favor, comprueba que el proxy está configurado y ejecutándose en
el equipo
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHEA-2014-1003.html