cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daan Hoogland <daan.hoogl...@gmail.com>
Subject Re: Error upgrade 4.4.3 to 4.5.1
Date Wed, 15 Jul 2015 08:20:41 GMT
It complains the table already exists, but there is only one place in
the upgrade code where it is being created.

I'd say
- restore your database
- check the table doesn't exist, if it does drop it
- start the new version again

there is a file in the distribution schema442to450.sql The only reason
I can think of is that it has run twice.



On Wed, Jul 15, 2015 at 9:49 AM, Юрий Карпель <yuriy@karpel.su> wrote:
> Upgrade 4.4.3 to 4.5.1 (VMware hypervisor). How to fix bugs?
>
> ERROR [c.c.u.d.ScriptRunner] (main:null) Error executing: CREATE TABLE
> `cloud`.`external_brocade_vcs_devices` (   `id` bigint unsigned NOT NULL
> AUTO_INCREMENT COMMENT 'id',   `uuid` varchar(255) UNIQUE,
> `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical
> network in to which brocade vcs switch is added',   `provider_name`
> varchar(255) NOT NULL COMMENT 'Service Provider name corresponding to this
> brocade vcs switch',   `device_name` varchar(255) NOT NULL COMMENT 'name of
> the brocade vcs switch',   `host_id` bigint unsigned NOT NULL COMMENT 'host
> id coresponding to the external brocade vcs switch',   PRIMARY KEY  (`id`),
>   CONSTRAINT `fk_external_brocade_vcs_devices__host_id` FOREIGN KEY
> (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,   CONSTRAINT
> `fk_external_brocade_vcs_devices__physical_network_id` FOREIGN KEY
> (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE
> CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8
> 2015-07-15 10:40:11,485 ERROR [c.c.u.d.ScriptRunner] (main:null)
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'external_brocade_vcs_devices' already exists
> 2015-07-15 10:40:11,487 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> Unable to execute upgrade script:
> /usr/share/cloudstack-management/setup/db/schema-442to450.sql
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'external_brocade_vcs_devices' already exists
>         at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
>         at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:265)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:331)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:458)
>         at
> org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:65)
>         at
> org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:55)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:167)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:339)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:945)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:145)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:122)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:245)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:250)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:233)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:117)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79)
>         at
> org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:70)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:57)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:61)
>         at
> org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:52)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 2015-07-15 10:40:11,490 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> Unable to upgrade the database
> com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade
> script: /usr/share/cloudstack-management/setup/db/schema-442to450.sql
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:274)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:331)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:458)
>         at
> org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:65)
>         at
> org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:55)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:167)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:339)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:945)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:145)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:122)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:245)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:250)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:233)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:117)
>         at
> org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79)
>         at
> org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:70)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:57)
>         at
> org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:61)
>         at
> org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:52)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
>         at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'external_brocade_vcs_devices' already exists
>         at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
>         at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
>         at
> com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:265)
>         ... 47 more
> 2015-07-15 10:40:11,492 DEBUG [c.c.u.d.T.Transaction] (main:null) Rolling
> back the transaction: Time = 904 Name =  Upgrade; called by
> -TransactionLegacy.rollback:902-TransactionLegacy.removeUpTo:845-TransactionLegacy.close:669-DatabaseUpgradeChecker.upgrade:364-DatabaseUpgradeChecker.check:458-CloudStackExtendedLifeCycle.checkIntegrity:65-CloudStackExtendedLifeCycle.start:55-DefaultLifecycleProcessor.doStart:167-DefaultLifecycleProcessor.access$200:51-DefaultLifecycleProcessor$LifecycleGroup.start:339-DefaultLifecycleProcessor.startBeans:143-DefaultLifecycleProcessor.onRefresh:108
> 2015-07-15 10:40:16,274 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.OfferingDaoImpl_EnhancerByCloudStack_cc57922f
> 2015-07-15 10:40:16,277 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.CloudStackAccountDaoImpl_EnhancerByCloudStack_374d22d5
> 2015-07-15 10:40:16,278 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SMetaDaoImpl_EnhancerByCloudStack_e8fe8227
> 2015-07-15 10:40:16,278 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.UserCredentialsDaoImpl_EnhancerByCloudStack_8a004d46
> 2015-07-15 10:40:16,278 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.MultipartMetaDaoImpl_EnhancerByCloudStack_d06704e6
> 2015-07-15 10:40:16,278 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.CloudStackConfigurationDaoImpl_EnhancerByCloudStack_f8329504
> 2015-07-15 10:40:16,279 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.BucketPolicyDaoImpl_EnhancerByCloudStack_4fccfec9
> 2015-07-15 10:40:16,279 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SObjectItemDaoImpl_EnhancerByCloudStack_33dfb692
> 2015-07-15 10:40:16,279 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.MHostMountDaoImpl_EnhancerByCloudStack_88e2eaa1
> 2015-07-15 10:40:16,280 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.MHostDaoImpl_EnhancerByCloudStack_facb0ce2
> 2015-07-15 10:40:16,280 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.MultiPartUploadsDaoImpl_EnhancerByCloudStack_b63fb20f
> 2015-07-15 10:40:16,280 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SBucketDaoImpl_EnhancerByCloudStack_877beeda
> 2015-07-15 10:40:16,280 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SAclDaoImpl_EnhancerByCloudStack_fa6ac756
> 2015-07-15 10:40:16,281 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.CloudStackSvcOfferingDaoImpl_EnhancerByCloudStack_818fc8f4
> 2015-07-15 10:40:16,281 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.MultiPartPartsDaoImpl_EnhancerByCloudStack_8239dc91
> 2015-07-15 10:40:16,281 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SHostDaoImpl_EnhancerByCloudStack_235d832c
> 2015-07-15 10:40:16,281 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.SObjectDaoImpl_EnhancerByCloudStack_a37f31d
> 2015-07-15 10:40:16,282 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.persist.dao.CloudStackUserDaoImpl_EnhancerByCloudStack_5867877
> 2015-07-15 10:40:16,282 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.service.core.ec2.EC2Engine_EnhancerByCloudStack_5cc4d7cd
> 2015-07-15 10:40:16,337 INFO  [c.c.u.c.ComponentContext] (main:null)
> Configuring
> com.cloud.bridge.service.controller.s3.ServiceProvider_EnhancerByCloudStack_87f57242
> 2015-07-15 10:40:16,410 DEBUG [c.c.u.d.T.Transaction] (main:null) Rolling
> back the transaction: Time = 4 Name =  initialize; called by
> -TransactionLegacy.rollback:902-TransactionLegacy.removeUpTo:845-TransactionLegacy.close:669-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:130-ServiceProvider.setupHost:312-ServiceProvider.initialize:242-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:122-ServiceProvider.configure:115-ComponentContext.initComponentsLifeCycle:116-EC2MainServlet.init:69-StandardWrapper.loadServlet:1173



-- 
Daan

Mime
View raw message