Skip to content
Permalink
Browse files
[JENKINS-46869] Can not register instance as an agent (#238)
  • Loading branch information
adoblas authored and Francis Upton IV committed Sep 14, 2017
1 parent b267fa7 commit 447730b2b5a7748cc3414b0e6e3123e12b02d4e3
Showing 1 changed file with 1 addition and 1 deletion.
@@ -553,7 +553,7 @@ public Collection<PlannedNode> provision(Label label, int excessWorkload) {
if (slave == null)
break;
LOGGER.log(Level.INFO, String.format("We have now %s computers", Jenkins.getInstance().getComputers().length));
if (!(t.isNode())) {
if (t.isNode()) {
Jenkins.getInstance().addNode(slave);
LOGGER.log(Level.INFO, String.format("Added node named: %s, We have now %s computers", slave.getNodeName(), Jenkins.getInstance().getComputers().length));
r.add(new PlannedNode(t.getDisplayName(), Computer.threadPoolForRemoting.submit(new Callable<Node>() {

2 comments on commit 447730b

@djanavar
Copy link

@djanavar djanavar commented on 447730b Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks agent registration for our Jenkins instance. I had to rollback to 1.36.
I am just looking at the changed lines, but I'm not sure why someone would want to addNode if t already isNode.
Also, there is no changelog added for the 1.37 release here: https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Plugin

@ryanaslett
Copy link

@ryanaslett ryanaslett commented on 447730b Oct 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the isNode check was added in an earlier commit, as part of the pipeline support. It defaults to true, and only gets set to false as part of the pipeline stuff, so I think this is a red herring. Something else broke agent registration.

Please sign in to comment.