Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14885

"Dedicate Agent" page doesn't show existing links / cannot "undedicate" agents

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.8
    • 5.6.0, 5.6.1
    • Agents
    • None

    Description

      How to reproduce:

      1) navigate to an agent information page (in my case that's a remote agent)
      2) "Dedicate Agent"
      3) select "Build Job" on the left and an arbitrary job on the right
      4) notice that the job appears below the combo-boxes with an "x" mark allowing you to remove it
      5) click "Add" and go back to agent information page
      6) click "Dedicate Agent"
      7) the job you've just added is not listed there anymore and there's seemingly no way to "undedicate" the agent

      Workaround

      1. Backup Bamboo (precaution)
      2. Stop Bamboo
      3. Run the following SQL query to delete assignments that are not pointed to existing entities:
        delete from AGENT_ASSIGNMENT where EXECUTABLE_TYPE in ('PLAN', 'JOB') and EXECUTABLE_ID not in (select B.BUILD_ID from BUILD B);
        delete from AGENT_ASSIGNMENT where EXECUTABLE_TYPE = 'PROJECT' and EXECUTABLE_ID not in (select P.PROJECT_ID from PROJECT P);
        delete from AGENT_ASSIGNMENT where EXECUTABLE_TYPE = 'ENVIRONMENT' and EXECUTABLE_ID not in (select E.ENVIRONMENT_ID from DEPLOYMENT_ENVIRONMENT E);
        delete from AGENT_ASSIGNMENT where EXECUTABLE_TYPE = 'DEPLOYMENT_PROJECT' and EXECUTABLE_ID not in (select P.DEPLOYMENT_PROJECT_ID from DEPLOYMENT_PROJECT P);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              f43eda5b4c83 Ivan Smirnov
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: