• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 5.12.0.2
    • 5.8, 5.7.2, 5.9, 5.8.1, 5.8.2, 5.9.1, 5.9.3, 5.9.7, 5.10.3
    • Plan Branches
    • None

      Moving plans may potentially cause inconsistencies in the build table where incorrect branch keys are inserted into the build table.

      If you moved plans and restarted Bamboo, that could cause the same issue. Meaning, contrary to the first impression you might have after reading the logs, this won't happen necessarily during an upgrade task. The following can be seen in the logs:

      atlassian-bamboo.log
      2015-06-04 10:05:23,636 INFO [localhost-startStop-1] [AbstractUpgradeManager] Completed task 4410 with errors.
      2015-06-04 10:05:23,636 FATAL [localhost-startStop-1] [DefaultBootstrapManager] Pre-bootstrap validation tests failed: [Task for build 4410 failed:, com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey: There 
      are invalid branch keys in the BUILD table: [BIS-SNATRUNK3]]
      

      Workaround:
      If you're hitting this and your instance is down, the following procedure should be applied so you can get your instance up and running:

      1. Stop your Bamboo instance.

      2. With Bamboo stopped navigate to

      <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes
      

      and open the upgrades.xml file.

      3. Find the following line:

      <upgrade build="4410" build-min="4410" build-max="9999"             class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/>
      

      and update it by commenting out the entry to:

      <!-- <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/> -->
      

      4. Save the file Restart Bamboo.

      5. Get an export of your instance.

      6. Raise an issue with https://support.atlassian.com and attach your export so we can double check the database consistency.

      7. Once that's done, you should set your upgrades.xml back to uncomment the tag you commented out on the step #4 of this procedure.

            [BAM-15524] Invalid branch keys in the build table

            I can confirm this has been in 5.12.x

            Mark de Bont added a comment - I can confirm this has been in 5.12.x

            Move plan operation was fixed in 5.12. We do not recommend moving large plans using versions older than 5.12.

            Przemek Bruski added a comment - Move plan operation was fixed in 5.12. We do not recommend moving large plans using versions older than 5.12.

            We are on version 5.10. We tried to move several build plans, some of them have up to 50 - 100 branches. I repeatedly got errors when moving the plans and had to start over again. Eventually, it seemed to be moved fine from within the UI. Upoin restart, Bamboo wouldnt start with the mentioned error "Task for build 4410 failed:", naming multiple branch keys. We disabled the upgrade task as suggested, and when the intsance came back online, investigating the branches of the moved build plan revealed that non of the branch keys seem to be updated. We deleted all branches of the plans (if you google you will find a Python script to do this). Then at least the Bamboo instance would start up with Task 4410 enabled. But still, there were errors when creating branches for one of the plans. Eventually, we ended up cloning the build plan and continue working with the clone.

            After this experience, it seems the move plan functionality is really seriously buggy. It does not seem to work with plans that have branches. You probably better save yourself some time (We lost a whole workday) and just start out with a new clone in the correct project.

            Enrico Welder added a comment - We are on version 5.10. We tried to move several build plans, some of them have up to 50 - 100 branches. I repeatedly got errors when moving the plans and had to start over again. Eventually, it seemed to be moved fine from within the UI. Upoin restart, Bamboo wouldnt start with the mentioned error "Task for build 4410 failed:", naming multiple branch keys. We disabled the upgrade task as suggested, and when the intsance came back online, investigating the branches of the moved build plan revealed that non of the branch keys seem to be updated. We deleted all branches of the plans (if you google you will find a Python script to do this). Then at least the Bamboo instance would start up with Task 4410 enabled. But still, there were errors when creating branches for one of the plans. Eventually, we ended up cloning the build plan and continue working with the clone. After this experience, it seems the move plan functionality is really seriously buggy. It does not seem to work with plans that have branches. You probably better save yourself some time (We lost a whole workday) and just start out with a new clone in the correct project.

            This is crazy. If the move feature causes issues like this then disable that feature and make sure it's listed as an issue on upgrade. Also why hasn't this been fixed yet. I really don't care about new cloud features!!! I want Bamboo to work and have the features I need.

            Oliver Eikenberry added a comment - This is crazy. If the move feature causes issues like this then disable that feature and make sure it's listed as an issue on upgrade. Also why hasn't this been fixed yet. I really don't care about new cloud features!!! I want Bamboo to work and have the features I need.

            Problem also occurs in 5.9.10

            Mark de Bont added a comment - Problem also occurs in 5.9.10

            Problem also occurs in 5.9.7

            Mark de Bont added a comment - Problem also occurs in 5.9.7

            Hey spittet,
            you worked on this issue for more than 7 months. Did you fix it?

            Paul Pasler added a comment - Hey spittet , you worked on this issue for more than 7 months. Did you fix it?

            This issue should be on the upgrade notes for all releases. Things to check on your system before doing an upgrade.

            Deleted Account (Inactive) added a comment - This issue should be on the upgrade notes for all releases. Things to check on your system before doing an upgrade.

            Voting, this issue hosed my company's production bamboo instance.

            Travis Dimmig added a comment - Voting, this issue hosed my company's production bamboo instance.

            Any update on this? We moved a bunch of plans last week and have just rebooted our production bamboo and it no longer boots, bootstrap failing.

            Thomas Shaw added a comment - Any update on this? We moved a bunch of plans last week and have just rebooted our production bamboo and it no longer boots, bootstrap failing.

            Hi,

            The Bamboo Team is currently working on a fix for this issue. While I cannot provide a release date I can say that we're aiming to release a fix at the middle of the year. There is some complexity in the fix as it may involve changing the way artifacts are stored on disk and we want to make sure that we provide a good way for customers relying on artifact paths to be able to update their scripts and workflows accordingly.

            I sincerely apologise to customers for the inconvenience caused by this issue.

            Best,

            Sten Pittet
            Bamboo Product Manager

            Sten Pittet (Inactive) added a comment - Hi, The Bamboo Team is currently working on a fix for this issue. While I cannot provide a release date I can say that we're aiming to release a fix at the middle of the year. There is some complexity in the fix as it may involve changing the way artifacts are stored on disk and we want to make sure that we provide a good way for customers relying on artifact paths to be able to update their scripts and workflows accordingly. I sincerely apologise to customers for the inconvenience caused by this issue. Best, Sten Pittet Bamboo Product Manager

            This issue is as persistent as ever. I still have old plan keys in my database, dangling there, no idea how it impacts things. It has also recently interfered with our ability to simply move servers (it impacts export/import of data).

            Case & point to everyone reading: Avoid using this feature, atlassian is not able to completely and accurately fix the issue even through support tickets because there is no way to reconcile the damage it causes.

            Robert Dailey added a comment - This issue is as persistent as ever. I still have old plan keys in my database, dangling there, no idea how it impacts things. It has also recently interfered with our ability to simply move servers (it impacts export/import of data). Case & point to everyone reading: Avoid using this feature, atlassian is not able to completely and accurately fix the issue even through support tickets because there is no way to reconcile the damage it causes.

            If the result of moving a plan is this catastrophic - WHY HAS IT NOT BEEN REMOVED FROM THE UI?

            Richard Cross added a comment - If the result of moving a plan is this catastrophic - WHY HAS IT NOT BEEN REMOVED FROM THE UI?

            This problem has just taken out our Production bamboo instance, right before a critical release. Unacceptable to find that this issue has been sat on since 06/Feb/15.

            Richard Cross added a comment - This problem has just taken out our Production bamboo instance, right before a critical release. Unacceptable to find that this issue has been sat on since 06/Feb/15.

            Hi ppasler,
            Apologies but I don't have the necessary insight or much sway on our future releases. Hopefully we can get further update from spittet, the Product Manager for Bamboo.

            Carlen Benard (Inactive) added a comment - Hi ppasler , Apologies but I don't have the necessary insight or much sway on our future releases. Hopefully we can get further update from spittet , the Product Manager for Bamboo.

            cbenard could you please give an update for this issue?

            Paul Pasler added a comment - cbenard could you please give an update for this issue?

            We were told to vote on this very issue so that it would gain visibility in the dev cycle. The "do not move plans" info was on the last update of the ticket we had open on this issue.

            Robert Sink added a comment - We were told to vote on this very issue so that it would gain visibility in the dev cycle. The "do not move plans" info was on the last update of the ticket we had open on this issue.

            robert.sink "The last official word from Atlassian was to not move plans"
            Where did you get this information?
            Well, it should be on deck, cause its a major bug, which destroyed 1 month of configuring bamboo for us...

            Paul Pasler added a comment - robert.sink "The last official word from Atlassian was to not move plans" Where did you get this information? Well, it should be on deck, cause its a major bug, which destroyed 1 month of configuring bamboo for us...

            What I meant to say above is this issue is NOT on deck for development.

            Robert Sink added a comment - What I meant to say above is this issue is NOT on deck for development.

            We had pretty much the same experience as above on v5.7.2. The last official word from Atlassian was to not move plans, and as far as I know, this issue on deck for development.

            Robert Sink added a comment - We had pretty much the same experience as above on v5.7.2. The last official word from Atlassian was to not move plans, and as far as I know, this issue on deck for development.

            I had a priority 1 ticket open with Atlassian and it took about 3-4 days to fix the problem. Bamboo was down for about 2 whole days. I had to pass them my database dumped to a file, they had to fix everything on their end. There is no quick fix. I can only hope they address this major issue in the next hotfix release they make.

            Robert Dailey added a comment - I had a priority 1 ticket open with Atlassian and it took about 3-4 days to fix the problem. Bamboo was down for about 2 whole days. I had to pass them my database dumped to a file, they had to fix everything on their end. There is no quick fix. I can only hope they address this major issue in the next hotfix release they make.

            This is really a big thing. We moved plans a month ago and had to load a dump before moving to start bamboo normally - all things we changed the last month are gone.
            This is very very annoying and costly! - is there a quick way to fix this?

            Paul Pasler added a comment - This is really a big thing. We moved plans a month ago and had to load a dump before moving to start bamboo normally - all things we changed the last month are gone. This is very very annoying and costly! - is there a quick way to fix this?

            We are having this problem on our production system and can't seem to workaround it. We moved build plans from one project to another. Days later we restarted bamboo to pick up a different change and now we can't start our system.

            We tried this https://confluence.atlassian.com/display/BAMKB/Bamboo+upgrade+task+4410+fails+with+error+%3A+Branch+key+BRANCH_KEY+does+not+start+with+chain+key+PLAN_KEY

            but it appears that the 4410 upgrade task ignores marked_for_deletion so that didn't do jack for us.

            Deleted Account (Inactive) added a comment - We are having this problem on our production system and can't seem to workaround it. We moved build plans from one project to another. Days later we restarted bamboo to pick up a different change and now we can't start our system. We tried this https://confluence.atlassian.com/display/BAMKB/Bamboo+upgrade+task+4410+fails+with+error+%3A+Branch+key+BRANCH_KEY+does+not+start+with+chain+key+PLAN_KEY but it appears that the 4410 upgrade task ignores marked_for_deletion so that didn't do jack for us.

            I'm having this problem and Bamboo won't start.

            Robert Dailey added a comment - I'm having this problem and Bamboo won't start.

              Unassigned Unassigned
              cbenard Carlen Benard (Inactive)
              Affected customers:
              33 This affects my team
              Watchers:
              39 Start watching this issue

                Created:
                Updated:
                Resolved: