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

Map Agent UUID (authentication entry) to the actual Remote Agent in the Bamboo UI

    XMLWordPrintable

Details

    • 1
    • 9
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Problem Definition

      The remote agent authentication tab does not display show any association between the authentication entry, agent UUID and the real agent that this corresponds to. This make managing the authentication entries difficult with higher agent counts.

      Suggested Solution

      Implement a link between Agent UUID and Agent ID. The Agent Authentication tab could display:

      • Existing agents (hostname) that the authentication entry applies to. If the authentication entry does not link to an existing agent, the UI should say as much.
      • For hosts with multiple agents, it'd be beneficial to also display the agent home directory location in the agent summary screen.
      • The agent summary should display linked UUIDs / approval. Being able to revoke authentication from this UI would also be beneficial.
      • BAM-18647: deletion of an agent should revoke the access as well (cleaning agent_authentication table for that agent only).

      Workaround 1

      The only way to map a Bamboo remote agent back to its UUID / Agent Authentication is via the filesystem on the remote agent. The details are stored in the <bamboo-agent-home>/bamboo-agent.cfg.xml. Example below:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <configuration>
      <buildWorkingDirectory>/root/bamboo-agent-home/xml-data/build-dir</buildWorkingDirectory>
      <agentUuid>ff674641-a868-43ef-9e92-c2e67fbef71b</agentUuid>
      <agentDefinition>
      <id>70189058</id>
      <name>localhost</name>
      <description>Remote agent on host localhost</description>
      </agentDefinition>
      </configuration>
      

      Using the UUID and name of the agent, you can then track this back to the authentication entry.

      Furthermore you use the information from the bamboo-agent.cfg.xml to query the following database tables like in the below example (there is no link between agent ID and UUID in the database though):

      // Using agentUuid from bamboo-agent.cfg.xml
      SELECT * FROM AGENT_AUTHENTICATION WHERE UUID = 'ff674641-a868-43ef-9e92-c2e67fbef71b';
      
      // Using id from bamboo-agent.cfg.xml
      SELECT * FROM QUEUE WHERE QUEUE_ID = 70189058;
      

      Workaround 2

      Enable TRACE log level for class com.atlassian.bamboo.buildqueue.manager.RemoteAgentManagerImpl and in logs it will print agent id and UUID from heartbeat agent messages. Then follow steps from Workaround 1 to map agent id to agent name

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              asantos@atlassian.com Augusto Santos (Inactive)
              Votes:
              24 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: