Can't upgrade to Bamboo 8.0-rc1 if bamboo.home is a symlink

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 8.0.0
    • Affects Version/s: 8.0.0 EAP1
    • Component/s: Upgrading
    • None
    • 1
    • Severity 2 - Major

      Issue Summary

      Can't upgrade to Bamboo 8.0-rc1 if bamboo.home is a symlink.

      Steps to Reproduce

      1. Create a symbolic link to your <bamboo-home>
      2. Modify bamboo.home in bamboo-init.properties to point to the symlink
      3. 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

            Assignee:
            Marcin Gardias
            Reporter:
            Eduardo Alvarenga (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: