-
Bug
-
Resolution: Not a bug
-
High
-
None
-
7.19.1
-
None
-
3
-
Severity 2 - Major
-
2
-
Issue Summary
The CONFVERSION table doesn't update the new BuildNumber if an upgrade process is restarted
Steps to Reproduce
- Installed Confluence 7.13.7
- Performed an upgrade to 7.19.1
- Purposely stopped the service to replicate the issue
2022-10-31 09:58:31,331 INFO [Catalina-utility-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 7.19.1 [build 8804 based on commit hash 5edffe31bc2e032d43ffb30ff7143f30974f0954] - synchrony version 4.1.1 2022-10-31 09:58:37,598 INFO [Catalina-utility-1] [atlassian.confluence.cluster.DefaultClusterConfigurationHelper] lambda$populateExistingClusterSetupConfig$5 Populating setup configuration if running with Cluster mode... 2022-10-31 09:58:38,106 WARN [Catalina-utility-1] [confluence.impl.setup.DefaultBootstrapDatabaseAccessor] lambda$getBootstrapData$3 Unable to determine finalized build number from database [message: ERROR: column "finalized" does not exist Position: 48]. If you are upgrading from a Confluence version prior to 7.14, this is expected. ... 2022-10-31 09:59:47,765 INFO [Catalina-utility-1] [confluence.upgrade.impl.DefaultUpgradeManager] beforeUpgrade Generating pre-upgrade recovery file... 2022-10-31 09:59:47,829 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] begin Starting 2022-10-31 09:59:47,835 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Starting DATABASE_INFORMATION 2022-10-31 09:59:47,841 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Finishing DATABASE_INFORMATION 2022-10-31 09:59:47,841 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Starting TABLE_DEFINITION 2022-10-31 09:59:48,553 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Finishing TABLE_DEFINITION 2022-10-31 09:59:48,554 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] totalNumberOfTables Total number of tables: 177 2022-10-31 09:59:48,554 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Starting TABLES_DATA 2022-10-31 09:59:49,576 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] logTask Finishing TABLES_DATA 2022-10-31 09:59:49,577 INFO [Catalina-utility-1] [confluence.upgrade.recovery.ConfluenceProgressMonitor] end Finishing 2022-10-31 09:59:49,581 INFO [Catalina-utility-1] [confluence.upgrade.impl.DefaultUpgradeManager] beforeUpgrade Finished generating pre-upgrade recovery file. 2022-10-31 09:59:50,114 WARN [hz.ShutdownThread] [com.hazelcast.instance.Node] log [172.50.0.5]:5801 [confluence-28308-prod] [3.12.11] Terminating forcefully...
- Verify the buildNumber in confluence.cfg.xml for both home and shared home directory points to the old buildNumber. In my case it was 8703.
- Run select * from confversion and verify lock_for_upgrade_to_8804 is added
- Restart the Confluence service. The upgrade will continue
2022-10-31 10:03:57,270 INFO [Catalina-utility-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 7.19.1 [build 8804 based on commit hash 5edffe31bc2e032d43ffb30ff7143f30974f0954] - synchrony version 4.1.1 ... 2022-10-31 10:05:09,298 INFO [Catalina-utility-1] [atlassian.confluence.upgrade.AbstractUpgradeManager] upgradeStarted Starting automatic upgrade of Confluence .. 2022-10-31 10:05:10,534 INFO [Catalina-utility-1] [confluence.upgrade.upgradetask.ReplaceC3p0ConnectionPoolWithHikariCPUpgradeTask] doUpgrade Successfully saved applicationConfig. 2022-10-31 10:05:10,604 INFO [Catalina-utility-1] [atlassian.confluence.upgrade.AbstractUpgradeManager] initialUpgradeFinished Upgrade initial stage completed successfully 2022-10-31 10:05:10,619 INFO [Catalina-utility-1] [atlassian.confluence.cluster.DefaultClusterConfigurationHelper] lambda$saveSharedBuildNumber$7 Saving the build number into shared home... ... 2022-10-31 10:05:42,100 INFO [Catalina-utility-1] [atlassian.confluence.upgrade.AbstractUpgradeManager] entireUpgradeFinished Upgrade completed successfully ... 2022-10-31 10:05:46,529 INFO [Catalina-utility-1] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
- Upgrade appears to be successful. buildNumber in confluence.cfg.xml is updated to 8804. Access Confluence on the browser and it points to 7.19.1. However, the buildNumber is not updated in confversion table.
- Restart Confluence
- Confluence will fail to start
2022-10-31 10:22:14,599 ERROR [Catalina-utility-1] [atlassian.confluence.setup.BootstrapApplicationStartupListener] checkConfigurationOnStartup Confluence cluster node will not start up because the finalized build number in the database [8703] doesn't match either the application build number [8804] or the home directory build number [8804].
Expected Results
The upgrade should not be deemed successful; OR
The CONFVERSION should have been updated to the latest build number
Actual Results
The build number is updated in the confluence.cfg.xml files but not in the CONFVERSION. This causes problems on the next restart
Workaround
Roll back to pre-upgrade and perform the upgrade again without restarting Confluence once it has started.
As best practice, Atlassian recommends performing testing upgrades in a Staging Environment before upgrading the Production instance.