Project

General

Profile

Bug #13496

foreman-installer error when locale is not en_US.utf8

Added by Grégoire Bellon-Gervais over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hello,

I'm under debian 8 and my locales are set to en_GB.UTF-8.
I have followed the debian dedicated documentation, I just add the repositories and I install 'foreman-installer', then I execute the command :

foreman-installer

Then, I got the following errors :

 /Stage[main]/Foreman::Database::Postgresql/Postgresql::Server::Db[foreman]/Postgresql::Server::Database[foreman]/Exec[/usr/lib/postgresql/9.4/bin/createdb --port='5432' --owner='foreman' --template=template0 --encoding 'utf8' --locale=en_US.utf8  'foreman']: Failed to call refresh: /usr/lib/postgresql/9.4/bin/createdb --port='5432' --owner='foreman' --template=template0 --encoding 'utf8' --locale=en_US.utf8  'foreman' returned 1 instead of one of [0]

In postgresl error log, we can see this error :

2016-02-01 12:10:49 CET [4258-1] postgres@postgres ERROR:  invalid locale name: "en_US.utf8" 

Just adding locale 'en_US.utf8' using the command :

dpkg-reconfigure locales

And selecting "en_US.UTF-8 UTF-8" in the first screen "Locales to be generated" do the trick.

Thanks for your great tool.


Related issues

Related to Installer - Bug #11681: foreman, candlepin, gutterball databases use default encoding vs explicit UTF8Closed2015-09-03

Associated revisions

Revision 24fef3b1 (diff)
Added by Michael Moll over 5 years ago

refs #13496 - add locale hint to readme [ci skip]

Closes GH-417

History

#1 Updated by Dominic Cleal over 5 years ago

  • Tracker changed from Support to Bug
  • Project changed from Foreman to Installer
  • Category changed from Internationalization to Foreman modules

#2 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #11681: foreman, candlepin, gutterball databases use default encoding vs explicit UTF8 added

#3 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) set to 123

#4 Updated by Anonymous over 5 years ago

I'm a bit unsure what to do here. We could check the presence of that locale in a pre-hook, but probably that's also an issue for remote DB setups, so it might be just best to document that?

#5 Updated by Ewoud Kohl van Wijngaarden over 5 years ago

I think we should do both.

#6 Updated by Dominic Cleal over 5 years ago

Yeah, probably both. We could also perhaps have a fact to detect a non-en_US UTF-8 locale as a fallback?

#7 Updated by Ewoud Kohl van Wijngaarden over 5 years ago

I can't judge how well non-en_US UTF-8 locales would work or if it may introduce subtle bugs. With en_GB that's unlikely, but for others I don't what it would do.

#8 Updated by Grégoire Bellon-Gervais over 5 years ago

If you need, I can perform some tests with "exotic" locales.

#9 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) changed from 123 to 145

#10 Updated by Anonymous over 5 years ago

  • Pull request https://github.com/theforeman/puppet-foreman/pull/417 added

I added a sentence to the theforeman-foreman readme, maybe this also should go to the quickstart/installer docs? As said, as I think this is mainly about the locale being available at the database node and it must be checked there I think it doesn't make sense to check in an installer hook.

#11 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) deleted (145)

Also available in: Atom PDF