Created attachment 847675 [details] engine + server + setup logs Description of problem: Rollback of upgrade 3.2 -> 3.3, doesn't work correctly (at leaset with remote db configuration): Created by using non valid db upgarde script (/usr/share/ovirt-engine/dbscripts/upgrade/03_02_0470_test_me.sql which contains some randomized / meaningless strings). 1) Engine's rollback doesn't work correctly: # rpm -q rhevm rhevm-3.3.0-0.43.el6ev.noarch web admin: "Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." engine.log: ========== 2014-01-09 14:56:23,379 ERROR [org.ovirt.engine.core.bll.Backend] (ServerService Thread Pool -- 40) Error in getting DB connection. The database is inaccessible. Original exception is: DataAccessResourceFailureException: Error retreiving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/ENGINEDataSource server.log: ========== 2014-01-09 14:56:24,912 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started (with errors) in 313125ms - Started 622 of 679 services (8 services failed or missing dependencies, 48 services are passive or on-demand) Version-Release number of selected component (if applicable): 3.2.5.1 -> is30 How reproducible: 100% Steps to Reproduce: 1. Install 3.2.5 engine 2. Add another fake db upgarde script in order to fail the upgarde process 3. Perform upgrade (it will fail and rollback) 4. remove fake upagrde script (to leave clean setup) 5. Start ovirt-engine service Actual results: Engine service starts, but engine doesn't respone Expected results: Engine service starts and functional. Additional info: This issues leaves the system in non functional / non upgarded state.
(In reply to Barak Dagan from comment #0) > Created by using non valid db upgarde script > (/usr/share/ovirt-engine/dbscripts/upgrade/03_02_0470_test_me.sql which > contains some randomized / meaningless strings). I'll try to reproduce but I'm not sure this is really a valid test, altering the code that perform the schema upgrade.
Correct, closing.
(In reply to Alon Bar-Lev from comment #2) > Correct, closing. I do not agree. However: 1. The log says, among other things: 2014-01-08 17:27:48 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND Setup will not be able to rollback new packages in case of a failure, because installed ones were not found in enabled repositories. 2014-01-08 17:27:48 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND Do you want to abort Setup? (Yes, No) [Yes]: 2014-01-08 17:27:56 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:RECEIVE no so it could not rollback. 2. I did a similar test today and it passed well. The only issue I had was that the service was not started, and I had to manually start it and then restart httpd. Barak - please try to reproduce with both repos available so that it can rollback. Thanks.
(In reply to Yedidyah Bar David from comment #3) > 2014-01-08 17:27:48 DEBUG otopi.plugins.otopi.dialog.human > dialog.__logString:215 DIALOG:SEND Setup will not be able to > rollback new packages in case of a failure, because installed ones were not > found in enabled repositories. > 2014-01-08 17:27:48 DEBUG otopi.plugins.otopi.dialog.human > dialog.__logString:215 DIALOG:SEND Do you want to abort > Setup? (Yes, No) [Yes]: > 2014-01-08 17:27:56 DEBUG otopi.plugins.otopi.dialog.human > dialog.__logString:215 DIALOG:RECEIVE no > > so it could not rollback. So I would have closed as NOTABUG instead of WONTFIX, not moved to NEW. Added a needinfo on Barak as per didi question, but moving to NOTABUG for now.
I do not agree. Since setup doesn't require to have both repos, and allow to continue with such use case, I'd expect it not to start rollback scenario in case of failure. The current situation is having DB of older version but code of a newer one, if that's not a bug ....
(In reply to Barak Dagan from comment #5) > I do not agree. Since setup doesn't require to have both repos, and allow to > continue with such use case, I'd expect it not to start rollback scenario in > case of failure. The current situation is having DB of older version but > code of a newer one, if that's not a bug .... Well, if you consider that a bug, please: 1. Reopen, probably with lower urgency (zstream, 3.4, etc.) 2. Set a more accurate Summary line, such as "If setup fails and can't rollback packages, ..." 3. State clearly what you expect to happen in such a case. In particular, your current Expected results "Engine service starts and functional" are unrealistic. If there is a problem and setup can't rollback to previous packages, it will leave the system broken. How broken exactly - database partially updated, database rolled back to previous content, whatever - is a detail, imo an insignificant one. I do not see any relation between current summary and content - perhaps you meant to open another bug?
(In reply to Yedidyah Bar David from comment #6) > (In reply to Barak Dagan from comment #5) > > I do not agree. Since setup doesn't require to have both repos, and allow to > > continue with such use case, I'd expect it not to start rollback scenario in > > case of failure. The current situation is having DB of older version but > > code of a newer one, if that's not a bug .... > > Well, if you consider that a bug, please: > 1. Reopen, probably with lower urgency (zstream, 3.4, etc.) > 2. Set a more accurate Summary line, such as "If setup fails and can't > rollback packages, ..." > 3. State clearly what you expect to happen in such a case. In particular, > your current Expected results "Engine service starts and functional" are > unrealistic. If there is a problem and setup can't rollback to previous > packages, it will leave the system broken. How broken exactly - database > partially updated, database rolled back to previous content, whatever - is a > detail, imo an insignificant one. > > I do not see any relation between current summary and content - perhaps you > meant to open another bug? I agree about the summary, was copied, unintentionally, from a previous one - so I fix that one. As for the expectation, was before you revealed the cause for this issue.