Bug 1525976 - On Centos7 docker engine upgrade fails from 4.1 to 4.2 with due to encoding of postgres database
Summary: On Centos7 docker engine upgrade fails from 4.1 to 4.2 with due to encoding o...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 4.1.7.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Eli Mesika
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-14 14:15 UTC by Katerina Koukiou
Modified: 2017-12-15 07:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-15 07:16:38 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)

Description Katerina Koukiou 2017-12-14 14:15:47 UTC
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

Comment 1 Katerina Koukiou 2017-12-14 15:48:49 UTC
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

Comment 2 Martin Perina 2017-12-14 16:12:01 UTC
Hmm, I didn't know that we have released oVirt 4.1 as a docker image. Where is this image downloaded from?

Comment 3 Katerina Koukiou 2017-12-14 16:23:25 UTC
@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

Comment 4 Katerina Koukiou 2017-12-14 16:59:50 UTC
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.

Comment 5 Martin Perina 2017-12-15 07:16:38 UTC
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


Note You need to log in before you can comment on or make changes to this bug.