Created attachment 952248 [details] setup log Description of problem: on setup that was installed as 3.1 with dwh and reports, then upgraded to 3.2, 3.3, 3.4, and 3.5, after upgrading to 3.5 i did engine-backup, cleanup and then restore, when running engine-setup after restoring DB, i got this: Please confirm installation settings (OK, Cancel) [OK]: [ INFO ] Cleaning async tasks and compensations [ INFO ] Checking the Engine database consistency [ INFO ] Stage: Transaction setup [ INFO ] Stopping dwh service [ INFO ] Stopping reports service [ INFO ] Stopping engine service [ INFO ] Stopping ovirt-fence-kdump-listener service [ INFO ] Stopping websocket-proxy service [ ERROR ] dwhd is currently running. Its hostname is mo-4.rhev.lab.eng.brq.redhat.com. Please stop it before running Setup. [ ERROR ] Failed to execute stage 'Transaction setup': dwhd is currently running [ INFO ] Yum Performing yum transaction rollback [ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20141029235541-9d9sik.log [ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20141029235701-setup.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ ERROR ] Execution of setup failed Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. install 3.1 with dwh and reports 2. upgrade to 3.2 3. upgrade to 3.3 4. upgrade to 3.4 5. upgrade to 3.5 6. engine-backup --mode=backup --scope=all --log=backup.log --file=test.bak 7. engine-cleanup 8. engine-backup --mode=restore --scope=all --file=test.bak --log=restore.log 9. engine-setup Actual results: engine-setup fails Expected results: engine-setup should complete engine, dwh and reports installation Additional info:
engine-cleanup has no guarantees. Because the backup was done before stopping the dwh , the value of "DwhCurrentlyRunning" in "dwh_history_timekeeping" is 1. If the user would like to fix this he will need to set it in the engine db to 0.
I am pretty certain this has nothing to do with upgrades and/or engine-cleanup. Seems like this will fail the same way: On machine A: 1. install and setup engine+dwh 3.5 2. backup to file1 On machine B: 3. install engine+dwh 4. restore file1 5. engine-setup Michal - can you please try to reproduce the above and/or some other minimal flow? Obviously A and B can be same machine if it was reinstalled in the middle (thus not relying on engine-cleanup). I think we have to do something about this: 1. Current doc-text might be enough (stop dwh before backup), but is not very "nice", and we do not require stopping the engine either. 2. Can write something longer and detail more relevant scenarios, put in some wiki/KB and point to it. E.g. what if backup/restore is done only on engine while dwh was in a separate host and remains there. 3. Can analyze some of the relevant flows and make the relevant tools (backup, restore, setup) smarter and not require manual changes as previous option. This might turn out to be too risky/complex. We should handle this while considering also the final behavior of the fix to bug 1024028. Current report is correctly against dwh, but with the fix to that bug, a similar failure can happen also for engine-only, depending on the exact fix we'll do there.
Add K Base - If setup fails with this message after backup and restore it means that the dwh was running during backup. The user then should make sure the dwh is stopped and change the value of "DwhCurrentlyRunning" to 0 in "dwh_history_timekeeping" on the engine db. UPDATE dwh_history_timekeeping SET var_value=0 WHERE var_name ='DwhCurrentlyRunning'. Then run engine-setup again.
Tomas, please take over. Ask me if you need any info. Thanks!
KBase article is appropriate solution to this particular flow. I've attached it - ID is 1283133. Closing this BZ as WONTFIX.