+++ This bug was initially created as a clone of Bug #906416 +++ Description of problem: failed to create 'engine' db with the following message: [engine-db-install] creating engine db on postgres. /usr/share/ovirt-engine/dbscripts ~ /usr/share/ovirt-engine/dbscripts /usr/share/ovirt-engine/dbscripts Creating the database: engine dropdb: database removal failed: ERROR: database "engine" does not exist createdb: database creation failed: ERROR: encoding "UTF8" does not match locale "en_US" DETAIL: The chosen LC_CTYPE setting requires encoding "LATIN1". Failed to create database engine /usr/share/ovirt-engine/dbscripts my locale: [root@localhost ~]# locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= Version-Release number of selected component (if applicable): ovirt-engine-3.2.0-2 How reproducible: 100% Steps to Reproduce: run engine-setup after fresh f18 installation Actual results: Expected results: Additional info: --- Additional comment from Eli Mesika on 2013-02-03 11:52:19 EST --- Please try to follow http://stackoverflow.com/questions/13115692/encoding-utf8-does-not-match-locale-en-us-the-chosen-lc-ctype-setting-requires --- Additional comment from Eli Mesika on 2013-02-03 11:56:07 EST --- please ignore comment #1 (not related) --- Additional comment from Moritz Baumann on 2013-02-27 10:09:17 EST --- The patch in ovirt-gerrit (http://gerrit.ovirt.org/12004) did fix the engine-setup run for me. --- Additional comment from Eli Mesika on 2013-03-05 06:53:11 EST --- fixed in commit : b12fc07
please provide the output of the following comamnd >psql -U postgres -l
ovirt-engine# psql -U postgres -l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+---------+-------+----------------------- postgres | postgres | LATIN1 | en_US | en_US | template0 | postgres | LATIN1 | en_US | en_US | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | LATIN1 | en_US | en_US | =c/postgres + | | | | | postgres=CTc/postgres (3 rows)
ups sorry, please ignore comment 2, its output was from F18 and not RHEV-M
Is there some other way to restore this bug beside install F18 please?
1) Follow this from psql prompt: postgres=# update pg_database set datallowconn = TRUE where datname = 'template0'; postgres=# \c template0 template0=# update pg_database set datistemplate = FALSE where datname = 'template1'; template0=# drop database template1; template0=# create database template1 with template = template0 encoding = 'LATIN1'; template0=# update pg_database set datistemplate = TRUE where datname = 'template1'; template0=# \c template1 template1=# update pg_database set datallowconn = FALSE where datname = 'template0'; 2) psql -U postgres -l verify that you got template1 with the LATIN1 encoding 3) Test the solution
(In reply to comment #6) > 1) Follow this from psql prompt: > > postgres=# update pg_database set datallowconn = TRUE where datname = > 'template0'; > postgres=# \c template0 > template0=# update pg_database set datistemplate = FALSE where datname = > 'template1'; > template0=# drop database template1; > template0=# create database template1 with template = template0 encoding = > 'LATIN1'; > template0=# update pg_database set datistemplate = TRUE where datname = > 'template1'; > template0=# \c template1 > template1=# update pg_database set datallowconn = FALSE where datname = > 'template0'; > > 2) psql -U postgres -l > verify that you got template1 with the LATIN1 encoding > > 3) Test the solution How do I get to psql prompt please? Is it from rhevm cli?
psql -U postgres engine
Comment #6 steps can't be used to restore the problem. f18 installation is required.
It is not clear to me what are the steps I should do after f18 installation.
(In reply to comment #10) > It is not clear to me what are the steps I should do after f18 installation. in Bug description it says : Steps to Reproduce: run engine-setup after fresh f18 installation So, I see no other steps to follow apart of checking that on top of f18
Verified on sf-17.2: As Fedora is not supported, verification was done on rhel6.4, with hebrew language (system-config-language -> set to Hebrew; export LANG=he_IL). engine-setup was successful
3.2 has been released