[EC2 plugin] All nodes of label 'my_label' are offline

3,904 views
Skip to first unread message

Simone Dalmasso

unread,
May 21, 2015, 11:17:19 AM5/21/15
to jenkins...@googlegroups.com
Hi everyone,

I'm using the EC2 plugin and I recently added a second AMI configuration in the cloud tab with a label to use within a job.
Unfortunately the job is not launching the node when I trigger a build. I have to do it manually from the jenkins -> manage nodes section.
I have another job using another node and is just working fine. I restrict the jobs to the nodes using the labels and there are no specific differences between the first and the second configurations apart from the label and the instance type.

Am I doing something wrong or do you have any suggestions?

Thanks in advance

Suckow, Thomas J

unread,
May 21, 2015, 11:52:44 AM5/21/15
to jenkins...@googlegroups.com
Assuming you have things configured correctly I would believe it is related to https://issues.jenkins-ci.org/browse/JENKINS-27034

To confirm:
In the groovy console /script you can try the following replacing my&&label with your my_label expression. If it prints 0, I'd bet it is the issue above.
println( Label.get("my&&label").nodeProvisioner.stat.computeQueueLength() )

Also somewhat related, the following will print 1 but should be 0
println(Jenkins.getInstance().unlabeledNodeProvisioner.stat.computeQueueLength() )

My workaround is to visit /updateCenter/ and check the restart box, this will usually cause the cloud slave to be started. For me it happens with the docker cloud "randomly" and certainly has "moods"

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f8cfad5b-c55a-42b2-8e26-bfb576b63bba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simone Dalmasso

unread,
May 21, 2015, 2:03:16 PM5/21/15
to jenkins...@googlegroups.com
Thanks for the quick answer, I changed my_label to mylabel just to avoid underscores but, as you say, println( Label.get("mylabel").nodeProvisioner.stat.computeQueueLength() ) returns 0.
While println(Jenkins.getInstance().unlabeledNodeProvisioner.stat.computeQueueLength() ) returns 0 as well.

If I understand correctly there's nothing that I can do to solve this at the moment right?

Simone Dalmasso

unread,
May 21, 2015, 2:06:41 PM5/21/15
to jenkins...@googlegroups.com
Sorry, I was running that code without the job waiting. Now that I fired up the build  Label.get("mylabel").nodeProvisioner.stat.computeQueueLength() returns 1. But still the node is not coming up automatically with the message All node of label 'mylablel' are offline.

Simone Dalmasso

unread,
May 21, 2015, 2:07:58 PM5/21/15
to jenkins...@googlegroups.com
Ah and println(Jenkins.getInstance().unlabeledNodeProvisioner.stat.computeQueueLength())  returns 1 now.

Suckow, Thomas J

unread,
May 22, 2015, 11:26:08 AM5/22/15
to jenkins...@googlegroups.com
Since this returns one and not zero, I am inclined to believe it is not the issue I was speaking of. It still could be, but it would be in a way I have not seen.

The fact unlabeledNodeProvisioner returns 1 is still wrong, but in the worst case should unnecessarily spawn slaves.


In your job configuration, I assume you are using "Restrict where this project can be run". Does it say "Slaves in label: 1" or does it have zero?

I don't use the EC2 plugin, so I can only guess now that either you have something misconfigured in the the cloud configuration or there is a bug in the EC2 plugin.


Also note in your response you use mylabel and mylablel. I assume these are placeholders but in the case they are not, you might double check spelling of your labels.

-
Thomas

Simone Dalmasso

unread,
May 22, 2015, 1:50:56 PM5/22/15
to jenkins...@googlegroups.com
Thanks Thomas,

yes I restricted by label and I get 1 slaves in label. And yes that was just a typo in the placeholder, if I start the node manually from /computer/ then the job builds with no issues.
What makes me think of a bug is that when there was just one Node configured and one job using it then was fine, and to create the new AMI and the new Job I used the same configuration.
Reply all
Reply to author
Forward
0 new messages