Issue Summary
Can't upgrade to Bamboo 8.0-rc1 if bamboo.home is a symlink.
Steps to Reproduce
- Create a symbolic link to your <bamboo-home>
- Modify bamboo.home in bamboo-init.properties to point to the symlink
- Try to upgrade to Bamboo 8.0-rc1
Expected Results
Upgrade should work
Actual Results
UpgradeTask70302ReorganiseHomeDirectory task returns a java.nio.file.NoSuchFileException with the following errors:
2021-06-22 15:45:35,831 INFO [localhost-startStop-1] [AbstractUpgradeManager] ----------------------------------------------------------------------- 2021-06-22 15:45:35,831 INFO [localhost-startStop-1] [AbstractUpgradeManager] 70302 : Reorganise Bamboo home directory into local and shared part (bootstrap) 2021-06-22 15:45:35,831 INFO [localhost-startStop-1] [AbstractUpgradeManager] ----------------------------------------------------------------------- 2021-06-22 15:45:35,832 INFO [localhost-startStop-1] [UpgradeTask70302ReorganiseHomeDirectory] Moving /var/atlassian/application/bamboo/jms-store to /var/atlassian/application/bamboo/shared/jms-store... 2021-06-22 15:45:35,838 INFO [localhost-startStop-1] [UpgradeTask70302ReorganiseHomeDirectory] Moving /var/atlassian/application/bamboo/jms-store to /var/atlassian/application/bamboo/shared/jms-store completed. (...) 2021-06-22 15:45:35,846 ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.nio.file.NoSuchFileException: /var/atlassian/application/bamboo/bamboo-mail.cfg.xml -> /opt/atlassian/bamboo-home/xml-data/configuration/bamboo-mail.cfg│ │java.nio.file.NoSuchFileException: /var/atlassian/application/bamboo/bamboo-mail.cfg.xml -> /opt/atlassian/bamboo-home/xml-data/configuration/bamboo-mail.cfg.xml (...) com.atlassian.upgrade.UpgradeException: Pre-bootstrap upgrade tasks failed: [Task for build 70302 failed with exception: /var/atlassian/application/bamboo/bamboo-mail.cfg.xml -> /opt/atlassian/bamboo-home/xml-data/configuration/bamboo-mail.cfg.xml]
Workaround
If after the failure, bamboo.home in bamboo-init.properties is modified to point to the real path, the failed task passes but the upgrade can't recover due to subsequently missing files. The applicable solution is to restore the previous Bamboo instance and restart the upgrade process, this time using the real path for <bamboo-home>:
- Restore the working Bamboo environment either from a Backup or a Snapshot (both <bamboo-home> and <bamboo-install> directories)
- Make sure your previous Bamboo instance is working before the upgrade
- Stop Bamboo
- Change your bamboo.home value in bamboo-init.properties to <bamboo-home> (a real path, not a symlink).
- Follow the upgrade process as usual