Bug 1389818 - engine-cleanup should clean rhv environment with any version
Summary: engine-cleanup should clean rhv environment with any version
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: meital avital
URL:
Whiteboard:
: 1431079 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-28 18:35 UTC by Marina Kalinin
Modified: 2021-08-30 12:38 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 09:14:23 UTC
oVirt Team: Integration
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43255 0 None None None 2021-08-30 12:38:08 UTC
Red Hat Knowledge Base (Solution) 2733871 0 None None None 2016-10-28 18:35:01 UTC
oVirt gerrit 65901 0 'None' ABANDONED packaging: setup: engine-cleanup: Allow removing older setup 2020-11-03 12:33:30 UTC

Description Marina Kalinin 2016-10-28 18:35:02 UTC
Description of problem:
If migration process from 3.6 to 4.0 fails, engine-cleanup should be able cleaning it, to revert the environment back to clean state after failed restore of 3.6 backup.

Version-Release number of selected component (if applicable):
4.0.4

How reproducible:


Steps to Reproduce:
1) a full backup of a 3.6 setup (make sure there is a DC or a cluster in 3.6 with CL 3.4)
2) installation RHEL 7 with RHV packages
3) import of the backup with 'engine-backup --mode=restore'
4) run engine-setup, that will fail with:

2016-10-21 11:23:03 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:222 Result: [{'compatibility_version': '3.6'}, {'compatibility_version': '3.4'}]

5) boot back to 6.8/3.6, fix the environment to have all dc and clusters on 3.6 CL and create a new backup
6) the import of fresh backup failed because db was already initialized:

Provisioning PostgreSQL users/databases:
- user 'engine', database 'engine'
FATAL: Existing database 'engine' or user 'engine' found and temporary ones created - Please clean up everything and try again


Actual results:
7) engine cleanup fails:

[ ERROR ] Cleanup utility and installed version mismatch
          Please use a version of cleanup utility that matches the engine installed version (now engine-cleanup 4.0.4.4, engine 3.6.9.2)
[ ERROR ] Failed to execute stage 'Environment setup': Cleanup utility version mismatch


Expected results:
Clean up should clean the environment from both 3.6 and 4.0.

Additional info:
To clean the environment, follow this solution: https://access.redhat.com/solutions/2733871
~~~
# service ovirt-engine stop
# service postgresql stop
# rm -rf /var/lib/pgsql/data
~~~

Comment 2 Yedidyah Bar David 2016-10-31 11:08:35 UTC
(In reply to Marina from comment #0)
> Description of problem:
> If migration process from 3.6 to 4.0 fails, engine-cleanup should be able
> cleaning it, to revert the environment back to clean state after failed
> restore of 3.6 backup.
> 
> Version-Release number of selected component (if applicable):
> 4.0.4
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 1) a full backup of a 3.6 setup (make sure there is a DC or a cluster in 3.6
> with CL 3.4)
> 2) installation RHEL 7 with RHV packages
> 3) import of the backup with 'engine-backup --mode=restore'
> 4) run engine-setup, that will fail with:
> 
> 2016-10-21 11:23:03 DEBUG otopi.ovirt_engine_setup.engine_common.database
> database.execute:222 Result: [{'compatibility_version': '3.6'},
> {'compatibility_version': '3.4'}]
> 
> 5) boot back to 6.8/3.6, fix the environment to have all dc and clusters on
> 3.6 CL and create a new backup
> 6) the import of fresh backup failed because db was already initialized:
> 
> Provisioning PostgreSQL users/databases:
> - user 'engine', database 'engine'
> FATAL: Existing database 'engine' or user 'engine' found and temporary ones
> created - Please clean up everything and try again
> 

If this is a clean machine, and you do not need anything from postgresql there, you can use this as a workaround:

# service postgresql stop
# rm -rf /var/lib/pgsql/data

Then try again 'engine-backup --mode=restore' and 'engine-setup'.

I suggest closing this bug and writing the above in a KB article.

Doing a general "fix" is imo too delicate and risky - we might get a wrong picture of the state of the system and remove things where we actually should have prompted the user.

Comment 13 Yedidyah Bar David 2017-03-12 06:18:09 UTC
*** Bug 1431079 has been marked as a duplicate of this bug. ***


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