Bug 1302066

Summary: Instructions for Initializing remote PostgreSQL database result in wrong default locale
Product: Red Hat Enterprise Virtualization Manager Reporter: Julio Entrena Perez <jentrena>
Component: DocumentationAssignee: Byron Gravenorst <bgraveno>
Status: CLOSED CURRENTRELEASE QA Contact: Megan Lewis <melewis>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.0CC: adahms, gklein, jentrena, lbopf, lsurette, rbalakri, srevivo, ykaul, ylavi
Target Milestone: ovirt-3.6.5   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-26 12:07:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1283458    

Description Julio Entrena Perez 2016-01-26 17:04:04 UTC
Description of problem:
Under Appendix "D. Preparing a Remote PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager" the following steps are provided on how to configure a remote PostgreSQL database:

  2. Initialize the PostgreSQL database, start the postgresql service, and ensure that this service starts on boot:
  # service postgresql initdb

Running "service postgresql initdb" on a system that has been configured with a non default locale results in the PostgreSQL cluster being created with that locale in the system.

As a result, RHEV-M installer will fail to use that database, see bug 1176457.
The documentation should suggest the following instead:

# su -l postgres -c "/usr/bin/initdb --locale=en_US.UTF8 --auth='ident' --pgdata=/var/lib/pgsql/data/"

Steps to Reproduce:
1. Boot the target system for the database with a non default locale:

# cat /etc/sysconfig/i18n
LANG="en_GB"

2. Run "service postgresql initdb"
3. Check the default locales in postgresql.conf:

# grep lc_ /var/lib/pgsql/data/postgresql.conf

Actual results:
lc_messages = 'en_GB'			# locale for system error message
lc_monetary = 'en_GB'			# locale for monetary formatting
lc_numeric = 'en_GB'			# locale for number formatting
lc_time = 'en_GB'				# locale for time formatting

And RHEV-M installer fails to use that PostgreSQL instance:

Failed to execute stage 'Environment customization': Engine requires lc_messages to be 'en_US.UTF-8'. Please fix lc_messages before you continue.

Expected results:
lc_messages = 'en_US.UTF8'			# locale for system error message
lc_monetary = 'en_US.UTF8'			# locale for monetary formatting
lc_numeric = 'en_US.UTF8'			# locale for number formatting
lc_time = 'en_US.UTF8'				# locale for time formatting

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1176457

Comment 1 Andrew Dahms 2016-03-28 23:31:58 UTC
Assigning to Byron for review.