Dear all, During my (failed) upgrade attempt from CloudStack 4.1.1 to 4.2.0 early this week, I noted that CloudStack management server will automatically detect the database version and upgrade the database automatically.
=== 2013-09-24 02:23:48,145 INFO [utils.component.ComponentContext] (Timer-1:null) Running SystemIntegrityChecker managementServerNode 2013-09-24 02:23:48,145 INFO [utils.component.ComponentContext] (Timer-1:null) Running SystemIntegrityChecker databaseUpgradeChecker 2013-09-24 02:23:48,145 INFO [cloud.upgrade.DatabaseUpgradeChecker] (Timer-1:null) Grabbing lock to check for database upgrade. 2013-09-24 02:23:48,147 DEBUG [upgrade.dao.VersionDaoImpl] (Timer-1:null) Checking to see if the database is at a version before it was the version table is created 2013-09-24 02:23:48,154 INFO [cloud.upgrade.DatabaseUpgradeChecker] (Timer-1:null) DB version = 4.1.1 Code Version = 4.2.0 2013-09-24 02:23:48,154 INFO [cloud.upgrade.DatabaseUpgradeChecker] (Timer-1:null) Database upgrade must be performed from 4.1.1 to 4.2.0 2013-09-24 02:23:48,154 DEBUG [cloud.upgrade.DatabaseUpgradeChecker] (Timer-1:null) Running upgrade Upgrade410to420 to upgrade from 4.1.0-4.1.1 to 4.2.0 2013-09-24 02:23:48,159 DEBUG [utils.script.Script] (Timer-1:null) Looking for db/schema-410to420.sql in the classpath 2013-09-24 02:23:48,160 DEBUG [utils.script.Script] (Timer-1:null) System resource: file:/usr/share/cloudstack-management/setup/db/schema-410to420.sql 2013-09-24 02:23:48,160 DEBUG [utils.script.Script] (Timer-1:null) Absolute path = /usr/share/cloudstack-management/setup/db/schema-410to420.sql === My questions: (1) Am I right to say that this database check and upgrade is done when the cloudstack-management 4.2.0 service is started? It's not performed during the installation/upgrade of the cloudstack-management app (in my case, apt-get install cloudstack-management)? (2) I used a new set of disk for my upgrade attempt by cloning the existing disk to a new one (using dd), and perform the upgrade on the new disk. When I failed the upgrade attempt, I just reverted back to the old disk and restore the database (which is hosted on a different server). The new set of disk is still containing the new 4.2.0 of cloudstack-management app inside. To perform another upgrade attempt, can I just boot-up using the new set of disk (instead of re-cloning and re-doing the upgrade)? Will it again detect that the existing database is still version 4.1.1, and will automatically upgrade the database to version 4.2.0 when the service is started? Looking forward to your reply, thank you. Cheers.