[ovirt-users] Failed to upgrade from 4.1 to 4.2 - Postgre version required

Aziz azizgstest at gmail.com
Thu Apr 26 12:00:12 UTC 2018


Thanks Marcelo for the feedback,

In my case some of the components are already upgraded to 4.2, including
cleanup engine, therefore I got the following error :

engine-cleanup
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files:
['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf',
'/etc/ovirt-engine-setup.conf.d/10-packaging.conf',
'/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
          Log file:
/var/log/ovirt-engine/setup/ovirt-engine-remove-20180426135555-m68ygc.log
          Version: otopi-1.7.7 (otopi-1.7.7-1.el7.centos)
[ ERROR ] Cleanup utility and installed version mismatch
          Please use a version of cleanup utility that matches the engine
installed version (now engine-cleanup 4.2.2.6, engine 4.1.9.1)
[ ERROR ] Failed to execute stage 'Environment setup': Cleanup utility
version mismatch
[ INFO  ] Stage: Clean up
          Log file is located at
/var/log/ovirt-engine/setup/ovirt-engine-remove-20180426135555-m68ygc.log
[ INFO  ] Generating answer file
'/var/lib/ovirt-engine/setup/answers/20180426135556-cleanup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of cleanup failed


Is there a way to downgrade ?


Thanks

On Thu, Apr 26, 2018 at 12:49 PM, Marcelo Leandro <marceloltmm at gmail.com>
wrote:

> I am had the same problem, is a problem in database structure. In my lab I
> followed this steps:
>
> FOLLOW THIS STEP IN A LAB FIRST:
>
> Full backup before the upgrade engine:
>
> engine-backup --scope=all --mode=backup --file=file_name
> --log=log_file_name
>
> after clean you engine config:
>
> engine-cleanup
>
>
> Change structure template 1
>
> su - postgres
>
> psql -U postgres
>
> postgres=# update pg_database set datallowconn = TRUE where datname =
> 'template0';
> UPDATE 1
> postgres=# \c template0
> You are now connected to database "template0".
> template0=# update pg_database set datistemplate = FALSE where datname =
> 'template1';
> UPDATE 1
> template0=# drop database template1;
> DROP DATABASE
> template0=# create database template1 with owner=postgres encoding='UTF-8'
>   lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
> CREATE DATABASE
> template0=# update pg_database set datistemplate = TRUE where datname =
> 'template1';
> UPDATE 1
> template0=# \c template1
> You are now connected to database "template1".
> template1=# update pg_database set datallowconn = FALSE where datname =
> 'template0';
> UPDATE 1
> template1=# \q
>
> change structure template0
>
> psql -U postgres
> postgres=# update pg_database set datallowconn = TRUE where datname =
> 'template1';
> UPDATE 1
> postgres=# \c template1
> You are now connected to database "template0".
> template0=# update pg_database set datistemplate = FALSE where datname =
> 'template0';
> UPDATE 1
> template0=# drop database template0;
> DROP DATABASE
> template0=# create database template0 with owner=postgres encoding='UTF-8'
>   lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template1;
> CREATE DATABASE
> template0=# update pg_database set datistemplate = TRUE where datname =
> 'template0';
> UPDATE 1
> template0=# \c template0
> You are now connected to database "template0".
> template1=# update pg_database set datallowconn = FALSE where datname =
> 'template1';
> UPDATE 1
> template1=# \q
>
>
> change estructure postgres
>
> psql template0
> 1-drop database postgres;
> 2- create database postgres with owner=postgres encoding='UTF-8'
>   lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
> 3-\q
>
> restore database:
> engine-backup --mode=restore --file=file_name --log=log_file_name
> --provision-db --restore-permissions
>
> if return error in the restore :
>
> engine-backup --mode=restore --no-restore-permissions --provision-db
> --provision-dwh-db --provision-reports-db --file=engine-backup.tar.gz
> --log=engine-backup-restore.log
>
> follow the steps to upgrade now.
>
>
> I dont sure if this steps is correct but works in my lab. I appreciate if
> anyone of red hat approve this steps to apply in my production environment.
>
> 2018-04-26 8:23 GMT-03:00 Staniforth, Paul <P.Staniforth at leedsbeckett.ac.
> uk>:
>
>> I'm having this problem as well.
>>
>>
>> It's suggested here to backup the databases and install new clean version
>> of postgresql with the correct encoding,collation, etc and restore the
>> databases.
>>
>>
>> https://www.mail-archive.com/users@ovirt.org/msg47854.html
>>
>>
>> I hope to try this today or tomorrow on a test system.
>>
>>
>> Regards,
>>
>>               Paul S.
>> ------------------------------
>> *From:* users-bounces at ovirt.org <users-bounces at ovirt.org> on behalf of
>> Aziz <azizgstest at gmail.com>
>> *Sent:* 26 April 2018 12:15
>> *To:* Marcelo Leandro
>> *Cc:* users
>> *Subject:* Re: [ovirt-users] Failed to upgrade from 4.1 to 4.2 - Postgre
>> version required
>>
>> This is similar to the below bug :
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1528371
>>
>> Any ideas on how to fix it without losing the existing config ?
>>
>> Thank you.
>>
>>
>>
>> On Thu, Apr 26, 2018 at 11:54 AM, Aziz <azizgstest at gmail.com> wrote:
>>
>>> There you are :
>>>
>>>
>>> [root at CTL1 tmp]# su - postgresql
>>> su: user postgresql does not exist
>>> [root at CTL1 tmp]# su - postgres
>>> Last login: Thu Apr 26 12:25:01 CEST 2018 on pts/0
>>> nodectl must be run as root!
>>> nodectl must be run as root!
>>> nodectl must be run as root!
>>> nodectl must be run as root!
>>> -bash-4.2$ psql
>>> psql (9.2.23)
>>> Saisissez « help » pour l'aide.
>>>
>>> postgres=# \l
>>>                                            Liste des bases de données
>>>          Nom          |     Propriétaire     | Encodage |
>>> Collationnement | Type caract. |    Droits d'accès
>>> ----------------------+----------------------+----------+---
>>> --------------+--------------+-----------------------
>>>  dwh                  | postgres             | UTF8     |
>>> fr_FR.UTF-8     | fr_FR.UTF-8  | =Tc/postgres         +
>>>                       |                      |
>>> |                 |              | postgres=CTc/postgres
>>>  engine               | engine               | UTF8     |
>>> en_US.UTF-8     | en_US.UTF-8  |
>>>  ovirt_engine_history | ovirt_engine_history | UTF8     |
>>> en_US.UTF-8     | en_US.UTF-8  |
>>>  postgres             | postgres             | UTF8     |
>>> fr_FR.UTF-8     | fr_FR.UTF-8  |
>>>  template0            | postgres             | UTF8     |
>>> fr_FR.UTF-8     | fr_FR.UTF-8  | =c/postgres          +
>>>                       |                      |
>>> |                 |              | postgres=CTc/postgres
>>>  template1            | postgres             | UTF8     |
>>> fr_FR.UTF-8     | fr_FR.UTF-8  | =c/postgres          +
>>>                       |                      |
>>> |                 |              | postgres=CTc/postgres
>>> (6 lignes)
>>>
>>> postgres=#
>>>
>>> Thanks
>>>
>>> On Thu, Apr 26, 2018 at 11:49 AM, Marcelo Leandro <marceloltmm at gmail.com
>>> > wrote:
>>>
>>>>
>>>> Show this information:
>>>>
>>>> 1 - su - postgresql
>>>> 2 - psql
>>>> 3 - \l
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> 2018-04-26 7:38 GMT-03:00 Marcelo Leandro <marceloltmm at gmail.com>:
>>>>
>>>>> What show in the /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log
>>>>> ?
>>>>>
>>>>> command:
>>>>> cat /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log
>>>>>
>>>>> Marcelo Leandro
>>>>>
>>>>> Em qui, 26 de abr de 2018 07:34, Aziz <azizgstest at gmail.com> escreveu:
>>>>>
>>>>>> Hi Ovirt users,
>>>>>>
>>>>>> I'm trying to upgrade my Ovirt from version 4.1 to 4.2, but I'm stuck
>>>>>> when issuing the command  *engine-setup* which returns the following
>>>>>> errors :
>>>>>>
>>>>>>                 Upgrading PostgreSQL
>>>>>> *[ ERROR ] Failed to execute stage 'Misc configuration': Command
>>>>>> '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute*
>>>>>> [ INFO  ] Yum Performing yum transaction rollback
>>>>>> [ INFO  ] Rolling back to the previous PostgreSQL instance
>>>>>> (postgresql).
>>>>>> [ INFO  ] Stage: Clean up Log file is located at
>>>>>> /var/log/ovirt-engine/setup/ovirt-engine-setup-2018042612263
>>>>>> 0-rpkrel.log
>>>>>> [ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/a
>>>>>> nswers/20180426122823-setup.conf'
>>>>>> [ INFO  ] Stage: Pre-termination
>>>>>> [ INFO  ] Stage: Termination
>>>>>> *[ ERROR ] Execution of setup failed*
>>>>>>
>>>>>>
>>>>>> Can anyone help to resolve this ?
>>>>>>
>>>>>>
>>>>>> Thank you in advance.
>>>>>>
>>>>>> BR.
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at ovirt.org
>>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>>
>>>>>
>>>>
>>>
>> To view the terms under which this email is distributed, please go to:-
>> http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180426/7d133f21/attachment.html>


More information about the Users mailing list