<div dir="ltr"><div>I am had the same problem, is a problem in database structure. In my lab I followed this steps:</div><div><br></div><div>FOLLOW THIS STEP IN A LAB FIRST:</div><div><br></div><div>Full backup before the upgrade engine:</div><div><br></div><div>engine-backup --scope=all --mode=backup --file=file_name --log=log_file_name</div><div><br></div><div>after clean you engine config:</div><div><br></div><div>engine-cleanup</div><div><br></div><div><br></div><div>Change structure template 1</div><div><br></div><div>su - postgres</div><div><br></div><div>psql -U postgres</div><div><br></div><div>postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';</div><div>UPDATE 1</div><div>postgres=# \c template0</div><div>You are now connected to database "template0".</div><div>template0=# update pg_database set datistemplate = FALSE where datname = 'template1';</div><div>UPDATE 1</div><div>template0=# drop database template1;</div><div>DROP DATABASE</div><div>template0=# create database template1 with owner=postgres encoding='UTF-8'</div><div> lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;</div><div>CREATE DATABASE</div><div>template0=# update pg_database set datistemplate = TRUE where datname = 'template1';</div><div>UPDATE 1</div><div>template0=# \c template1</div><div>You are now connected to database "template1".</div><div>template1=# update pg_database set datallowconn = FALSE where datname = 'template0';</div><div>UPDATE 1</div><div>template1=# \q</div><div><br></div><div>change structure template0</div><div><br></div><div>psql -U postgres</div><div>postgres=# update pg_database set datallowconn = TRUE where datname = 'template1';</div><div>UPDATE 1</div><div>postgres=# \c template1</div><div>You are now connected to database "template0".</div><div>template0=# update pg_database set datistemplate = FALSE where datname = 'template0';</div><div>UPDATE 1</div><div>template0=# drop database template0;</div><div>DROP DATABASE</div><div>template0=# create database template0 with owner=postgres encoding='UTF-8'</div><div> lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template1;</div><div>CREATE DATABASE</div><div>template0=# update pg_database set datistemplate = TRUE where datname = 'template0';</div><div>UPDATE 1</div><div>template0=# \c template0</div><div>You are now connected to database "template0".</div><div>template1=# update pg_database set datallowconn = FALSE where datname = 'template1';</div><div>UPDATE 1</div><div>template1=# \q</div><div><br></div><div><br></div><div>change estructure postgres</div><div><br></div><div>psql template0</div><div>1-drop database postgres;</div><div>2- create database postgres with owner=postgres encoding='UTF-8'</div><div> lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;</div><div>3-\q</div><div> </div><div>restore database:</div><div>engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --restore-permissions</div><div><br></div><div>if return error in the restore :</div><div><br></div><div>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</div><div><br></div><div>follow the steps to upgrade now.</div><div><br></div><div><br></div><div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-26 8:23 GMT-03:00 Staniforth, Paul <span dir="ltr"><<a href="mailto:P.Staniforth@leedsbeckett.ac.uk" target="_blank">P.Staniforth@leedsbeckett.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>I'm having this problem as well.</p>
<p><br>
</p>
<p>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.</p>
<p><br>
</p>
<p><a href="https://www.mail-archive.com/users@ovirt.org/msg47854.html" target="_blank">https://www.mail-archive.com/<wbr>users@ovirt.org/msg47854.html</a><br>
</p>
<p><br>
</p>
<p>I hope to try this today or tomorrow on a test system.</p>
<p><br>
</p>
<p>Regards,</p>
<p> Paul S.<br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div id="m_2692025684914731920divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> <a href="mailto:users-bounces@ovirt.org" target="_blank">users-bounces@ovirt.org</a> <<a href="mailto:users-bounces@ovirt.org" target="_blank">users-bounces@ovirt.org</a>> on behalf of Aziz <<a href="mailto:azizgstest@gmail.com" target="_blank">azizgstest@gmail.com</a>><br>
<b>Sent:</b> 26 April 2018 12:15<br>
<b>To:</b> Marcelo Leandro<br>
<b>Cc:</b> users<br>
<b>Subject:</b> Re: [ovirt-users] Failed to upgrade from 4.1 to 4.2 - Postgre version required</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>
<div>This is similar to the below bug : <br>
<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1528371" target="_blank">https://bugzilla.redhat.com/<wbr>show_bug.cgi?id=1528371</a><br>
<br>
</div>
Any ideas on how to fix it without losing the existing config ?<br>
<br>
</div>
Thank you. <br>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 26, 2018 at 11:54 AM, Aziz <span dir="ltr"><<a href="mailto:azizgstest@gmail.com" target="_blank">azizgstest@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>There you are : <br>
<br>
<br>
<span style="color:rgb(7,55,99)">[root@CTL1 tmp]# su - postgresql<br>
su: user postgresql does not exist<br>
[root@CTL1 tmp]# su - postgres<br>
Last login: Thu Apr 26 12:25:01 CEST 2018 on pts/0<br>
nodectl must be run as root!<br>
nodectl must be run as root!<br>
nodectl must be run as root!<br>
nodectl must be run as root!<br>
-bash-4.2$ psql<br>
psql (9.2.23)<br>
Saisissez « help » pour l'aide.<br>
<br>
postgres=# \l<br>
<wbr> Liste des bases de données<br>
Nom | Propriétaire | Encodage | Collationnement | Type caract. | Droits d'accès
<br>
----------------------+-------<wbr>---------------+----------+---<wbr>--------------+--------------+<wbr>-----------------------<br>
dwh | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =Tc/postgres +<br>
| | | | | postgres=CTc/postgres<br>
engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
<br>
ovirt_engine_history | ovirt_engine_history | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
<br>
postgres | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 |
<br>
template0 | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =c/postgres +<br>
| | | | | postgres=CTc/postgres<br>
template1 | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =c/postgres +<br>
| | | | | postgres=CTc/postgres<br>
(6 lignes)<br>
<br>
postgres=# </span><br>
<br>
</div>
Thanks <br>
</div>
<div class="m_2692025684914731920HOEnZb">
<div class="m_2692025684914731920h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 26, 2018 at 11:49 AM, Marcelo Leandro <span dir="ltr">
<<a href="mailto:marceloltmm@gmail.com" target="_blank">marceloltmm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br>
<div>Show this information:</div>
<div><br>
</div>
<div>1 - su - postgresql</div>
<div>2 - psql</div>
<div>3 - \l</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks, </div>
</div>
<div class="m_2692025684914731920m_-6359113955093257735HOEnZb">
<div class="m_2692025684914731920m_-6359113955093257735h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">2018-04-26 7:38 GMT-03:00 Marcelo Leandro <span dir="ltr">
<<a href="mailto:marceloltmm@gmail.com" target="_blank">marceloltmm@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="auto">What show in the /var/lib/pgsql/upgrade_rh-<wbr>postgresql95-postgresql.log ?</div>
<div dir="auto"><br>
</div>
<div>command:</div>
<div>cat /var/lib/pgsql/upgrade_rh-post<wbr>gresql95-postgresql.log<span class="m_2692025684914731920m_-6359113955093257735m_-521033745458172408HOEnZb"><font color="#888888"><br>
</font></span></div>
<span class="m_2692025684914731920m_-6359113955093257735m_-521033745458172408HOEnZb"><font color="#888888">
<div><br>
</div>
Marcelo Leandro</font></span>
<div><br>
<div class="gmail_quote"><span>
<div dir="ltr">Em qui, 26 de abr de 2018 07:34, Aziz <<a href="mailto:azizgstest@gmail.com" rel="noreferrer" target="_blank">azizgstest@gmail.com</a>> escreveu:<br>
</div>
</span>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div class="m_2692025684914731920m_-6359113955093257735m_-521033745458172408h5">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Ovirt users, <br>
<br>
</div>
I'm trying to upgrade my Ovirt from version 4.1 to 4.2, but I'm stuck when issuing the command
<i><b>engine-setup</b></i> which returns the following errors : <br>
<br>
<span style="color:rgb(7,55,99)"> Upgrading PostgreSQL<br>
<b>[ ERROR ] Failed to execute stage 'Misc configuration': Command '/opt/rh/rh-postgresql95/root/<wbr>usr/bin/postgresql-setup' failed to execute</b><br>
[ INFO ] Yum Performing yum transaction rollback<br>
[ INFO ] Rolling back to the previous PostgreSQL instance (postgresql).<br>
[ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ov<wbr>irt-engine-setup-2018042612263<wbr>0-rpkrel.log<br>
[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/a<wbr>nswers/<a href="http://20180426122823-setup.co" target="_blank">20180426122823-setup.co</a><wbr>nf'<br>
[ INFO ] Stage: Pre-termination<br>
[ INFO ] Stage: Termination<br>
<b>[ ERROR ] Execution of setup failed</b></span><br>
<br>
<br>
</div>
Can anyone help to resolve this ? <br>
<br>
<br>
</div>
Thank you in advance. <br>
<br>
</div>
BR.<br>
</div>
</div>
</div>
<span>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" rel="noreferrer noreferrer" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
</span></blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
To view the terms under which this email is distributed, please go to:- <br>
<a href="http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html" target="_blank">http://disclaimer.<wbr>leedsbeckett.ac.uk/disclaimer/<wbr>disclaimer.html</a>
<p></p>
</div>
</blockquote></div><br></div>