Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo Agent Name keeps defaulting to 127.0.0.1 on Mac OSX

I have been trying to automate Bamboo agent configuration as part of my automation setup. However, although I have changed the hostname to something, e.g. mactest-xxxx, the agent name is defaulted to "127.0.0.1" on Bamboo server dashboard. I have been looking around places where 127.0.0.1 might have been cached, including /etc/hosts, but so far no luck. I have even pre-filled bamboo-agent.cfg.xml with the intended name ("mactest-xxxx"), and the agent does not even show up on the Online agent list in dashboard.

Where does Bamboo agent gets its name from on Mac OSX?

1 answer

Hello @Reynaldo Adji,

The agent will use this to get the name and send it over to Bamboo. If it can resolve it, it will use the name. If it can't, it will then use the IP address. From there Bamboo has to ensure uniqueness of the name. It does this by adding a number suffix (if needed).

There is an improvement request filed (https://jira.atlassian.com/browse/BAM-19581) requesting to address remote agent's name from <BAMBOO_AGENT_HOME>/bamboo-agent.cfg.xml. I would suggest you on voting, becoming a watcher and commenting on the link so it can increase its popularity.

If you need to rename the agent and ensure consistency you'll have to go through the following steps every time you need to do this:

  1. Open up the remote agent <BAMBOO_AGENT_HOME>/bamboo-agent.cfg.xml file and change the <name> tag to rename the remote agent.
  2. From the UI go to the Bamboo administration > Agents page.
    • Locate the remote agent from step 1 under the tabs "Online" or "Offline".
    • Click the agent name. You'll get redirected to the remote agent summary page.
    • Click Edit details.
    • Use the "Name" field to rename the remote agent.

Basically you'll have to rename the agent in two different places. You'll have to go through steps 1 & 2 to rename the remote agent and ensure that both the bamboo-agent.cfg.xml file and the database are in sync.

Kind regards,

Rafael

Is there any other way to change the agent name without using the UI? Maybe rest API endpoint? I don't want to automate UI if I don't really have to. 

rsperafico Atlassian Team Apr 04, 2018

Hello @Reynaldo Adji,

There is no REST API endpoint available to update agent. Instead, what you could do is call the action from "Click Edit details." described previously:

# replace BAMBOO_ADMIN_USER with user with global administration privileges
# replace AGENT_ID with id from agent you want to perform an update
# replace AGENT_NAME with desired name, e.g My+Agent
# replace AGENT_DESCRIPTION with description, e.g My+Agent+Description
# replace http://localhost:8085 with Bamboo's Base URL

curl -k -u BAMBOO_ADMIN_USER \
     -H 'Content-Type: application/x-www-form-urlencoded' \
     -H 'X-Atlassian-Token: no-check' \
     -d 'agentId=AGENT_ID&agentName=AGENT_NAME&agentDescription=AGENT_DESCRIPTION' \
     -X POST 'http://localhost:8085/admin/agent/updateAgentDetails.action'

As mentioned previously, there is an improvement filed (https://jira.atlassian.com/browse/BAM-19581) in which request a way to rename agent and performing this action will not update <BAMBOO_AGENT_HOME>/bamboo-agent.cfg.xml. Manual update is required.

Kind regards,

Rafael

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

943 views 4 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you