[ https://issues.apache.org/jira/browse/CLOUDSTACK-8212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305166#comment-14305166 ]
Andreas Stenius commented on CLOUDSTACK-8212: --------------------------------------------- I commented the offending UPDATE's to the cloud.configuration table, and the upgrade seems to have passed fine. (I checked, and there were no *.domain config entries, so it should have no effect anyway). ``` INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) DB version = 4.0.0 Code Version = 4.5.0-SNAPSHOT INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Database upgrade must be performed from 4.0.0 to 4.5.0-SNAPSHOT WARN [c.c.u.d.Upgrade442to450] (localhost-startStop-1:null) 4.5.0 KVM SystemVm template not found. KVM hypervisor is not used, so not failing upgrade WARN [c.c.u.d.Upgrade442to450] (localhost-startStop-1:null) 4.5.0 XenServer SystemVm template not found. XenServer hypervisor is not used, so not failing upgrade WARN [c.c.u.d.Upgrade442to450] (localhost-startStop-1:null) 4.5.0 Hyperv SystemVm template not found. Hyperv hypervisor is not used, so not failing upgrade WARN [c.c.u.d.Upgrade442to450] (localhost-startStop-1:null) 4.5.0 LXC SystemVm template not found. LXC hypervisor is not used, so not failing upgrade WARN [c.c.u.d.Upgrade442to450] (localhost-startStop-1:null) 4.5.0 VMware SystemVm template not found. VMware hypervisor is not used, so not failing upgrade INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleaning upgrades because all management server are now at the same version INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade40to41 to upgrade from 4.0.0-4.1.0 to 4.1.0 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade410to420 to upgrade from 4.1.0-4.2.0 to 4.2.0 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade420to421 to upgrade from 4.2.0-4.2.1 to 4.2.1 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade421to430 to upgrade from 4.2.1-4.3.0 to 4.3.0 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade430to440 to upgrade from 4.3.0-4.4.0 to 4.4.0 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade440to441 to upgrade from 4.4.0-4.4.1 to 4.4.1 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade441to442 to upgrade from 4.4.1-4.4.2 to 4.4.2 INFO [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Cleanup upgrade Upgrade442to450 to upgrade from 4.4.2-4.5.0 to 4.5.0 INFO [o.a.c.s.l.CloudStackExtendedLifeCycle] (localhost-startStop-1:null) Configuring CloudStack Components INFO [o.a.c.s.l.CloudStackExtendedLifeCycle] (localhost-startStop-1:null) Done Configuring CloudStack Components INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (localhost-startStop-1:null) Loaded module context [system] in 29862 ms ``` > database upgrade failed for fresh install of 4.5.0-SNAPSHOT > ----------------------------------------------------------- > > Key: CLOUDSTACK-8212 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8212 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.5.0 > Environment: RedHat 7, external MariaDB on custom port. > Reporter: Andreas Stenius > Attachments: cloudstack-4.5.0-SNAPSHOT-logs.tar.gz > > > During installation of a new system, when first starting the MS, it logs that > the db needs upgrading from 4.0.0, but fails to do so (see attached logs). > The culprit would seem to be due to these error messages (my guess from > screening the logs...): > ERROR [c.c.u.d.ScriptRunner] (localhost-startStop-1:null) Error executing: > UPDATE `cloud`.`configuration` SET value = CONCAT("*.",(SELECT > `temptable`.`value` FROM (SELECT * FROM `cloud`.`configuration` WHERE > `name`="consoleproxy.url.domain") AS `temptable` WHERE > `temptable`.`name`="consoleproxy.url.domain")) WHERE > `name`="consoleproxy.url.domain" > ERROR [c.c.u.d.ScriptRunner] (localhost-startStop-1:null) > java.sql.SQLException: You can't specify target table 'configuration' for > update in FROM clause > ERROR [c.c.u.DatabaseUpgradeChecker] (localhost-startStop-1:null) Unable to > execute upgrade script: > /usr/share/cloudstack-management/setup/db/schema-421to430.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)