Description of problem: How reproducible: Steps to Reproduce: 1. Upgrade engine from ovirt-4.1 to ovirt-4.2 in Centos 7 docker container. Actual results: Upgrading of postgresql during engine-setup fails with the following. ----------------------------------- [root@2fbce6e08864 /]# cat /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log Performing Consistency Checks ----------------------------- Checking cluster versions ok Checking database user is the install user ok Checking database connection settings ok Checking for prepared transactions ok Checking for reg* system OID user data types ok Checking for contrib/isn with bigint-passing mismatch ok Checking for invalid "line" user columns ok Creating dump of global objects ok Creating dump of database schemas engine postgres template1 ok encodings for database "postgres" do not match: old "SQL_ASCII", new "UTF8" Failure, exiting ----------------------------------- Expected results: ovirt-setup should handle the encodings of all databases and succed the postgresql upgrade. Additional info: From ovirt-engine-setup.log : http://pastebin.test.redhat.com/540848 List of Databases: http://pastebin.test.redhat.com/540849
Maybe it will help to mention here that when I run engine-setup (not upgrading)I get differences in the encoding of the databases (apart from engine) like following: After 4.1 engine setup: postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+-----------+-------------+-------------+----------------------- engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres | SQL_ASCII | C | C | template0 | postgres | SQL_ASCII | C | C | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | SQL_ASCII | C | C | =c/postgres + | | | | | postgres=CTc/postgres (4 rows) After 4.2 engine setup: postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+-------------+-------------+----------------------- engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres
Hmm, I didn't know that we have released oVirt 4.1 as a docker image. Where is this image downloaded from?
@Martin Perina I am using some Centos7 image from dockerhub, https://hub.docker.com/r/chrismeyers/centos7/. You can see more info about how I am running the tests in this PR: https://github.com/oVirt/ovirt-ansible-engine-setup/pull/1/files#diff-fdf20b77748edf2237d05f41bf9a411a
JFYI I realized the aforementioned behavior accurs only when locale isi not UTF-8 but POSIX. When locale is UTF-8 everything works as expected.
Also mentioned in [1], that we support database only in en_US.UTF-8 locale, so closing as not a bug [1] https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/installation_guide/appe-preparing_a_remote_postgresql_database_for_use_with_the_red_hat_enterprise_virtualization_manager