[ovirt-users] Recovering oVirt-Engine with a backup before upgrading to 4.2

Yedidyah Bar David didi at redhat.com
Fri Apr 20 06:55:22 UTC 2018


On Fri, Apr 13, 2018 at 12:00 PM, Sven Achtelik <Sven.Achtelik at eps.aero> wrote:
> Hi All,
>
> I got my stuff up and running again. I works like described in the manual and I used some extra hardware to jumpstart this. I'm now back on my hosted Engine 4.1.9 with 3 Hosts running it. The Engine is running on the appliance that is pulled by the deployment tool and after having everything stable again I thought of upgrading to 4.2. Thing is that this is just not working with the appliance because of some issue when upgrading Postgres inside. Looking at the logs I found this:
> ----------------------------
> Creating dump of database schemas
>   engine
>   ovirt_engine_history
>   postgres
>   template1
>                                                             ok
>
> encodings for database "postgres" do not match:  old "SQL_ASCII", new "UTF8"
> Failure, exiting
> ------------------------------
>
> After some research I found something here https://bugzilla.redhat.com/show_bug.cgi?id=1525976, but I'm not sure what to do with that Information. I used the appliance and didn't do anything manual in the complete process and I'm wondering why I'm getting this issue now ? Could someone advice on how to proceed ?

Looks like:

https://bugzilla.redhat.com/1528371

Which version do you upgrade to?

If to one that should be covered by above bug, please attach your
setup log to it. Thanks.

I was on vacation last week and will be in next one too. Adding Simone.

Best regards,

>
> Thank you,
> Sven
>
>> -----Ursprüngliche Nachricht-----
>> Von: users-bounces at ovirt.org [mailto:users-bounces at ovirt.org] Im Auftrag
>> von Sven Achtelik
>> Gesendet: Mittwoch, 28. März 2018 18:28
>> An: Yedidyah Bar David
>> Cc: users at ovirt.org
>> Betreff: Re: [ovirt-users] Recovering oVirt-Engine with a backup before
>> upgrading to 4.2
>>
>>
>>
>> > -----Ursprüngliche Nachricht-----
>> > Von: Yedidyah Bar David [mailto:didi at redhat.com]
>> > Gesendet: Mittwoch, 28. März 2018 10:06
>> > An: Sven Achtelik
>> > Cc: users at ovirt.org
>> > Betreff: Re: [ovirt-users] Recovering oVirt-Engine with a backup
>> > before upgrading to 4.2
>> >
>> > On Tue, Mar 27, 2018 at 9:14 PM, Sven Achtelik
>> > <Sven.Achtelik at eps.aero>
>> > wrote:
>> > > Hi All,
>> > >
>> > >
>> > >
>> > > I’m still facing issues with my HE engine. Here are the steps that I
>> > > took to end up in this situation:
>> > >
>> > >
>> > >
>> > > -         Update Engine from 4.1.7 to 4.1.9
>> > >
>> > > o   That worked as expected
>> > >
>> > > -         Automatic Backup of Engine DB in the night
>> > >
>> > > -         Upgraded Engine from 4.1.9 to 4.2.1
>> > >
>> > > o   That worked fine
>> > >
>> > > -         Noticed Issues with the HA support for HE
>> > >
>> > > o   Cause was not having the latest ovirt-ha agent/broker version on hosts
>> > >
>> > > -         After updating the first host with the latest packages for the
>> > > Agent/Broker engine was started twice
>> > >
>> > > o   As a result the Engine VM Disk was corrupted and there is no Backup of
>> > > the Disk
>> > >
>> > > o   There is also no Backup of the Engine DB with version 4.2
>> > >
>> > > -         VM disk was repaired with fsck.ext4, but DB is corrupt
>> > >
>> > > o   Can’t restore the Engine DB because the Backup DB from Engine V 4.1
>> > >
>> > > -         Rolled back all changes on Engine VM to 4.1.9 and imported Backup
>> > >
>> > > o   Checked for HA VMs to set as disabled and started the Engine
>> > >
>> > > -         Login is fine but the Engine is having trouble picking up and
>> > > information from the Hosts
>> > >
>> > > o   No information on running VMs or hosts status
>> > >
>> > > -         Final Situation
>> > >
>> > > o   2 Hosts have VMs still running and I can’t stop those
>> > >
>> > > o   I still have the image of my corrupted Engine VM (v4.2)
>> > >
>> > >
>> > >
>> > > Since there were no major changes after upgrading from 4.1 to 4.2,
>> > > would it be possible to manually restore the 4.1 DB to the 4.2
>> > > Engine VM to this up and running again or are there modifications
>> > > made to the DB on upgrading that are relevant for this ?
>> >
>> > engine-backup requires restoring to the same version used to take the
>> > backup, with a single exception - on 4.0, it can restore 3.6.
>> >
>> > It's very easy to patch it to allow also 4.1->4.2, search inside it
>> > for "VALID_BACKUP_RESTORE_PAIRS". However, I do not think anyone ever
>> > tested this, so no idea might break. In 3.6->4.0 days, we did have to
>> > fix a few other things, notably apache httpd and iptables->firewalld:
>> >
>> > https://bugzilla.redhat.com/show_bug.cgi?id=1318580
>> >
>> > > All my work on rolling back to 4.1.9 with the DB restore failed as
>> > > the Engine is not capable of picking up information from the hosts.
>> >
>> > No idea why, but not sure it's related to your restore flow.
>> >
>> > > Lessons learned is to always make a copy/snapshot of the engine VM
>> > > disk before upgrading anything.
>> >
>> > If it's a hosted-engine, this isn't supported - see my reply on the
>> > list ~ 1 hour ago...
>> >
>> > > What are my options on getting
>> > > back to a working environment ? Any help or hint is greatly appreciated.
>> >
>> > Restore again with either methods - what you tried, or patching
>> > engine- backup and restore directly into 4.2 - and if the engine fails
>> > to talk to the hosts, try to debug/fix this.
>> >
>> > If you suspect corruption more severe that just the db, you can
>> > install a fresh engine machine from scratch and restore to it. If it's
>> > a hosted-engine, you'll need to deploy hosted-engine from scratch,
>> > check docs about hosted-engine backup/restore.
>>
>> I read through those documents and it seems that I would need an extra
>> Host/Hardware which I don't have. https://ovirt.org/documentation/self-
>> hosted/chap-Backing_up_and_Restoring_an_EL-Based_Self-
>> Hosted_Environment/
>>
>> So how would I be able to get a new setup working when I would like to use the
>> Engine-VM-Image ? At this point it sounds like I would have to manually
>> reinstall the machine that is left over and running. I'm lost at this point.
>> >
>> > Best regards,
>> > --
>> > Didi
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users



-- 
Didi


More information about the Users mailing list