[
https://issues.apache.org/jira/browse/CLOUDSTACK-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13613482#comment-13613482
]
Prachi Damle commented on CLOUDSTACK-1804:
------------------------------------------
The error that is causing DB upgrade to fail and a rollback statement in the
logs is seen as a result of this:
com.cloud.utils.exception.CloudRuntimeException: Unable to set
elastic_ip_service for network offerings with EIP service enabled.
at
com.cloud.upgrade.dao.Upgrade40to41.upgradeEIPNetworkOfferings(Upgrade40to41.java:122)
at
com.cloud.upgrade.dao.Upgrade40to41.performDataMigration(Upgrade40to41.java:67)
at
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:237)
at
com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:358)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:45)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy391.check(Unknown Source)
at
com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:69)
at
com.cloud.servlet.CloudStartupServlet$1.run(CloudStartupServlet.java:50)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown
column 'eip_associate_public_ip' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at
com.cloud.upgrade.dao.Upgrade40to41.upgradeEIPNetworkOfferings(Upgrade40to41.java:118)
... 27 more
The method Upgrade40to41 :: upgradeEIPNetworkOfferings throws the error.
Assigning to Jaypal to check since he added the feature.
> Upgrade 4.0 -> 4.1 - DB upgrade fails.
> --------------------------------------
>
> Key: CLOUDSTACK-1804
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1804
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.1.0
> Environment: Upgrade from 4.0 - > 4.1
> Reporter: Sangeetha Hariharan
> Assignee: Prachi Damle
> Priority: Blocker
> Fix For: 4.1.0
>
> Attachments: Upgrade-4.0-4.1.rar
>
>
> 1. Install and configure 4.0 setup
> 2. Create 4.1 repo and update the packages to 4.1
> 3. Tried to start Management server.
> Management server fails to start.
> To proceed further , I had to do the following steps manually:
> Issue1 : Failed to start management server as there is no tomcat6.conf file
> Resolved: Created a copy of tomcat6-nonssl.conf to tomcat6.conf
> Issue2 : Failed to start MS as there is no server.xml
> Resolved: Created a copy of server-nonssl.xml to server.xml
> Issue3: Failed to start MS as connection to DB failed.
> Resolved this issue by copying the original db.properties (which used to be
> in /etc/cloud/management/db.properties .It is removed as part of upgrade) to
> /etc/cloudstack/management/db.properties.
> After this we see the management server starts.
> But we see the version in DB is still at 4.0.
> Also we are able to log in to the management server as admin user but we are
> not presented with the dashboard view and user is presented with the
> following error message - "The given command does not exist or it is not
> available for user"
> 013-03-25 13:40:13,470 INFO [cloud.api.ApiServer] (catalina-exec-19:null)
> (userId=2 accountId=2 sessionId=477A36D68C43BF607B120C101BAC9394)
> 10.216.132.72 -- POST command=login domain=/
> 2013-03-25 13:40:13,530 INFO [cloud.api.ApiServer] (catalina-exec-18:null)
> 10.216.132.72 -- GET
> command=listCapabilities&response=json&sessionkey=j1yRhgpqVLP55aACJc1tnMvsgoo%3D&_=1364244047351
> 432 The given command does not exist or it is not available for user
> 2013-03-25 13:40:13,552 INFO [cloud.api.ApiServer] (catalina-exec-5:null)
> 10.216.132.72 -- GET
> command=listSwifts&response=json&sessionkey=j1yRhgpqVLP55aACJc1tnMvsgoo%3D&_=1364244047413
> 432 The given command does not exist or it is not available for user
> mysql> select * from version;
> +----+----------------------+---------------------+----------+
> | id | version | updated | step |
> +----+----------------------+---------------------+----------+
> | 1 | 4.0.0.20130314045651 | 2013-03-25 10:54:37 | Complete |
> +----+----------------------+---------------------+----------+
> 1 row in set (0.00 sec)
> From management server , we see upgrade scripts being executed , but there is
> a rollback that happens during the upgrade process that indicates a failure
> in upgrade procedure. No sql exceptions seen during the upgrade steps.
> 2013-03-25 13:26:03,427 DEBUG [utils.db.ScriptRunner] (Timer-1:null) --
> Schema upgrade from 4.0.0 to 4.1.0;
> 2013-03-25 13:26:03,427 DEBUG [utils.db.ScriptRunner] (Timer-1:null) --;
> 2013-03-25 13:26:03,427 DEBUG [utils.db.ScriptRunner] (Timer-1:null) use
> cloud
> 2013-03-25 13:26:03,429 DEBUG [utils.db.ScriptRunner] (Timer-1:null) SET
> foreign_key_checks = 0
> 2013-03-25 13:26:03,430 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_template add size bigint unsigned
> 2013-03-25 13:26:03,602 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_template add state varchar(255)
> 2013-03-25 13:26:03,638 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_template add update_count bigint unsigned
> 2013-03-25 13:26:03,659 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_template add updated datetime
> 2013-03-25 13:26:03,673 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table storage_pool add storage_provider_id bigint unsigned
> 2013-03-25 13:26:03,728 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table storage_pool add scope varchar(255)
> 2013-03-25 13:26:03,755 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL
> 2013-03-25 13:26:03,766 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table template_spool_ref add state varchar(255)
> 2013-03-25 13:26:03,778 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table template_spool_ref add update_count bigint unsigned
> 2013-03-25 13:26:03,788 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table volumes add disk_type varchar(255)
> 2013-03-25 13:26:03,824 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table volumes drop foreign key `fk_volumes__account_id`
> 2013-03-25 13:26:03,858 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column disk_offering_id bigint unsigned
> 2013-03-25 13:26:03,920 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column cpu int(10) unsigned
> 2013-03-25 13:26:03,942 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column ram bigint unsigned
> 2013-03-25 13:26:03,955 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column owner varchar(255)
> 2013-03-25 13:26:03,968 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column speed int(10) unsigned
> 2013-03-25 13:26:03,980 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column host_name varchar(255)
> 2013-03-25 13:26:03,997 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column display_name varchar(255)
> 2013-03-25 13:26:04,031 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table vm_instance add column `desired_state` varchar(32) NULL
> 2013-03-25 13:26:04,047 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table data_center add column owner varchar(255)
> 2013-03-25 13:26:04,424 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table data_center add column created datetime COMMENT 'date created'
> 2013-03-25 13:26:04,438 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table data_center add column lastUpdated datetime COMMENT 'last updated'
> 2013-03-25 13:26:04,448 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table data_center add column engine_state varchar(32) NOT NULL DEFAULT
> 'Disabled' CO
> MMENT 'the engine state of the zone'
> 2013-03-25 13:26:04,459 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host_pod_ref add column owner varchar(255)
> 2013-03-25 13:26:04,526 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host_pod_ref add column created datetime COMMENT 'date created'
> 2013-03-25 13:26:04,536 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host_pod_ref add column lastUpdated datetime COMMENT 'last updated'
> 2013-03-25 13:26:04,548 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host_pod_ref add column engine_state varchar(32) NOT NULL DEFAULT
> 'Disabled' C
> OMMENT 'the engine state of the zone'
> 2013-03-25 13:26:04,562 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host add column owner varchar(255)
> 2013-03-25 13:26:04,587 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host add column lastUpdated datetime COMMENT 'last updated'
> 2013-03-25 13:26:04,600 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table host add column engine_state varchar(32) NOT NULL DEFAULT 'Disabled'
> COMMENT '
> the engine state of the zone'
> 2013-03-25 13:26:04,612 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table cluster add column owner varchar(255)
> 2013-03-25 13:26:04,665 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table cluster add column created datetime COMMENT 'date created'
> 2013-03-25 13:26:04,676 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table cluster add column lastUpdated datetime COMMENT 'last updated'
> 2013-03-25 13:26:04,688 DEBUG [utils.db.ScriptRunner] (Timer-1:null) alter
> table cluster add column engine_state varchar(32) NOT NULL DEFAULT 'Disabled'
> COMMEN
> T 'the engine state of the zone'
> 2013-03-25 13:26:04,701 DEBUG [utils.db.ScriptRunner] (Timer-1:null) CREATE
> TABLE `cloud`.`vm_compute_tags` ( `id` bigint unsigned NOT NULL
> AUTO_INCREMENT CO
> MMENT 'id', `vm_id` bigint unsigned NOT NULL COMMENT 'vm id', `compute_tag`
> varchar(255) NOT NULL COMMENT 'name of tag', PRIMARY KEY(`id`) ) ENGINE=InnoD
> B DEFAULT CHARSET=utf8
> 2013-03-25 13:26:04,715 DEBUG [utils.db.ScriptRunner] (Timer-1:null) CREATE
> TABLE `cloud`.`vm_root_disk_tags` ( `id` bigint unsigned NOT NULL
> AUTO_INCREMENT
> COMMENT 'id', `vm_id` bigint unsigned NOT NULL COMMENT 'vm id',
> `root_disk_tag` varchar(255) NOT NULL COMMENT 'name of tag', PRIMARY
> KEY(`id`) ) ENGINE=I
> nnoDB DEFAULT CHARSET=utf8
> 2013-03-25 13:26:04,719 DEBUG [utils.db.ScriptRunner] (Timer-1:null) CREATE
> TABLE `cloud`.`vm_network_map` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT
> COM
> MENT 'id', `vm_id` bigint unsigned NOT NULL COMMENT 'vm id', `network_id`
> bigint unsigned NOT NULL COMMENT 'network id', PRIMARY KEY(`id`) )
> ENGINE=InnoD
> B DEFAULT CHARSET=utf8
> ................
> ................
> 2013-03-25 13:26:06,022 DEBUG [utils.db.ScriptRunner] (Timer-1:null) SET
> foreign_key_checks = 1
> 2013-03-25 13:26:06,022 DEBUG [upgrade.dao.Upgrade40to41] (Timer-1:null)
> Updating region table with Id: 1
> 2013-03-25 13:26:06,033 DEBUG [db.Transaction.Transaction] (Timer-1:null)
> Rolling back the transaction: Time = 2630 Name = Upgrade; called by
> -Transaction.rollback:890-Transaction.removeUpTo:833-Transaction.close:657-DatabaseUpgradeChecker.upgrade:263-DatabaseUpgradeChecker.check:358-NativeMethodAccessorImpl.invoke0:-2-NativeMethodAccessorImpl.invoke:57-DelegatingMethodAccessorImpl.invoke:43-Method.invoke:616-AopUtils.invokeJoinpointUsingReflection:319-ReflectiveMethodInvocation.invokeJoinpoint:183-ReflectiveMethodInvocation.proceed:150
>
> 2013-03-25 13:26:13,390 INFO [utils.component.ComponentContext] (main:null)
> Configuring com.cloud.bridge.persist.dao.CloudStackAccountDaoImpl
> 2013-03-25 13:26:13,402 INFO [utils.db.GenericDaoBase] (main:null) Register
> dao interface in GenericDaoBase entity-DAO map.
> com.cloud.bridge.persist.dao.CloudStackAccountDao
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira