Hi all We have ACS 4.15.2 on Ubuntu 20.04 and MySQL 8 on a separate server. Also we use StorPool Primary storage. The upgrade of the db seems fine from 4.15.2 to 4.16.00 and then to 4.16.1.0 and 4.17.0.0 but fails on upgrading from 4.17.0.0 to 4.17.1.0 Seems there are missing columns in the “volumes” table :
excerpt from the mgmt. log … 2025-01-14 13:39:27,938 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- Schema upgrade cleanup from 4.16.1.0 to 4.17.0.0 2025-01-14 13:39:27,938 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) --; 2025-01-14 13:39:27,940 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Cleanup script Upgrade41610to41700 is executed successfully 2025-01-14 13:39:27,955 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Upgrade completed for version 4.17.0.0 2025-01-14 13:39:27,955 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Running upgrade Upgrade41700to41710 to upgrade from 4.17.0.0-4.17.1.0 to 4.17.1.0 2025-01-14 13:39:27,959 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- Licensed to the Apache Software Foundation (ASF) under one 2025-01-14 13:39:27,959 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- or more contributor license agreements. See the NOTICE file 2025-01-14 13:39:27,959 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- distributed with this work for additional information 2025-01-14 13:39:27,961 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- regarding copyright ownership. The ASF licenses this file 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- to you under the Apache License, Version 2.0 (the 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- "License"); you may not use this file except in compliance 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- with the License. You may obtain a copy of the License at 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- http://www.apache.org/licenses/LICENSE-2.0 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- Unless required by applicable law or agreed to in writing, 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- software distributed under the License is distributed on an 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- KIND, either express or implied. See the License for the 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- specific language governing permissions and limitations 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- under the License. 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) --; 2025-01-14 13:39:27,962 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- Schema upgrade from 4.17.0.0 to 4.17.1.0 ….. 2025-01-14 13:39:28,002 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) -- PR #6080 Change column `value` size from 255 to 4096 characters, matching the API "updateConfiguration" "value" size 2025-01-14 13:39:28,002 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) ALTER TABLE `cloud`.`account_details` MODIFY `value` VARCHAR(4096) NOT NULL 2025-01-14 13:39:28,318 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to upgrade the database com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT volumes.id, volumes.name, volumes.pool_id, volumes.last_pool_id, volumes.account_id, volumes.domain_id, volumes.instance_id, volumes.device_id, volumes.size, volumes.min_iops, volumes.max_iops, volumes.folder, volumes.path, volumes.pod_id, volumes.created, volumes.attached, volumes.data_center_id, volumes.host_ip, volumes.disk_offering_id, volumes.template_id, volumes.first_snapshot_backup_uuid, volumes.volume_type, volumes.pool_type, volumes.removed, volumes.updated, volumes.update_count, volumes.recreatable, volumes.state, volumes.chain_info, volumes.uuid, volumes.format, volumes.provisioning_type, volumes.display_volume, volumes.iscsi_name, volumes.vm_snapshot_chain_size, volumes.iso_id, volumes.external_uuid, volumes.hv_ss_reserve, volumes.passphrase_id, volumes.encrypt_format FROM volumes WHERE volumes.pool_id = 1 AND volumes.state NOT IN ('Destroy','Expunged') AND volumes.removed IS NULL at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:434) at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:362) at com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:961) at com.cloud.utils.db.GenericDaoBase.listBy(GenericDaoBase.java:940) at com.cloud.utils.db.GenericDaoBase.listBy(GenericDaoBase.java:951) at com.cloud.storage.dao.VolumeDaoImpl.findByPoolId(VolumeDaoImpl.java:165) at com.cloud.upgrade.dao.Upgrade41700to41710.updateStorageTypeForStorPoolVolumes(Upgrade41700to41710.java:114) at com.cloud.upgrade.dao.Upgrade41700to41710.updateStorPoolStorageType(Upgrade41700to41710.java:108) at com.cloud.upgrade.dao.Upgrade41700to41710.performDataMigration(Upgrade41700to41710.java:71) at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:324) at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:435) at org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:64) at org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:54) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:937) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:173) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:142) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:273) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:278) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:261) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:130) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:78) 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.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572) at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:426) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.server.Server.start(Server.java:423) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.Server.doStart(Server.java:387) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.apache.cloudstack.ServerDaemon.start(ServerDaemon.java:198) at org.apache.cloudstack.ServerDaemon.main(ServerDaemon.java:111) Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'volumes.passphrase_id' in 'field list' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) ... 64 more 2025-01-14 13:39:28,353 DEBUG [c.c.u.d.T.Transaction] (main:null) (logid:) Rolling back the transaction: Time = 371 Name = Upgrade; called by -TransactionLegacy.rollback:890-TransactionLegacy.removeUpTo:833-TransactionLegacy.close:657-DatabaseUpgradeChecker.upgrade:335-DatabaseUpgradeChecker.check:435-CloudStackExtendedLifeCycle.checkIntegrity:64-CloudStackExtendedLifeCycle.start:54-DefaultLifecycleProcessor.doStart:178-DefaultLifecycleProcessor.access$200:54-DefaultLifecycleProcessor$LifecycleGroup.start:356-Iterable.forEach:75-DefaultLifecycleProcessor.startBeans:155 2025-01-14 13:39:28,366 WARN [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Failed to start module [system] due to: [Failed to start bean 'cloudStackLifeCycle'; nested exception is com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database]. 2025-01-14 13:39:28,366 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) module start failure of module [system] was due to: org.springframework.context.ApplicationContextException: Failed to start bean 'cloudStackLifeCycle'; nested exception is com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:937) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:173) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:142) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:273) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:278) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:261) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:130) at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:78) 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.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572) at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:426) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.server.Server.start(Server.java:423) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.Server.doStart(Server.java:387) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.apache.cloudstack.ServerDaemon.start(ServerDaemon.java:198) at org.apache.cloudstack.ServerDaemon.main(ServerDaemon.java:111) Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:333) at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:435) at org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:64) ... 49 more Caused by: com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT volumes.id, volumes.name, volumes.pool_id, volumes.last_pool_id, volumes.account_id, volumes.domain_id, volumes.instance_id, volumes.device_id, volumes.size, volumes.min_iops, volumes.max_iops, volumes.folder, volumes.path, volumes.pod_id, volumes.created, volumes.attached, volumes.data_center_id, volumes.host_ip, volumes.disk_offering_id, volumes.template_id, volumes.first_snapshot_backup_uuid, volumes.volume_type, volumes.pool_type, volumes.removed, volumes.updated, volumes.update_count, volumes.recreatable, volumes.state, volumes.chain_info, volumes.uuid, volumes.format, volumes.provisioning_type, volumes.display_volume, volumes.iscsi_name, volumes.vm_snapshot_chain_size, volumes.iso_id, volumes.external_uuid, volumes.hv_ss_reserve, volumes.passphrase_id, volumes.encrypt_format FROM volumes WHERE volumes.pool_id = 1 AND volumes.state NOT IN ('Destroy','Expunged') AND volumes.removed IS NULL We then rolled back to 4.15.2 and run an upgrade to 4.17.2 which has been successful – However I see there are these 2 columns “volumes.passphrase_id” and “volumes.encrypt_format” still missing from the “volumes” table so I presume if we attempt to upgrade to 4.19.1.3 again it will still fail – any assistance would be greatly received and appreciated to resolve our upgrade issue best regards Gary [cid:image001.png@01DB718B.272C7760] Gary Dixon Quadris Cloud Manager [cid:image002.png@01DB718B.272C7760] +44 (0) 161 537 4980<tel:+44%20(0)%20161%20537%204980> +44 (0) 7989 717661<tel:+44%20(0)%207989%20717661> [cid:image003.png@01DB718B.272C7760] gary.di...@quadris.com<mailto:gary.di...@quadris.com> [cid:image004.png@01DB718B.272C7760] www.quadris.com [cid:image005.png@01DB718B.272C7760] Innovation House, 12‑13 Bredbury Business Park Bredbury Park Way, Bredbury, Stockport, SK6 2SN