This repository has been archived by the owner. It is now read-only.

UnsupportedOperationException: No Label #30

Closed
stuart-warren opened this Issue Jun 9, 2014 · 13 comments

Comments

Projects
None yet
4 participants
@stuart-warren

stuart-warren commented Jun 9, 2014

Hi,

I get the following exception everytime I try to build using Jenkins. If I do a build without using the Jenkins client it works fine.

Jun 06, 2014 2:24:52 PM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null in domain stu
Jun 06, 2014 2:24:52 PM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Jun 06, 2014 2:24:52 PM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Jun 06, 2014 2:24:52 PM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item 
Jun 06, 2014 2:24:52 PM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Jun 06, 2014 2:24:52 PM hudson.triggers.SafeTimerTask run
SEVERE: Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@f01ba81 failed
java.lang.UnsupportedOperationException: No Label
    at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:402)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:366)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Does this plugin interact with anything other than Jenkins before this point, or is it a bug in Jenkins/the plugin?

The Node label is not actually null according to the job config: "python-build"

I've added more details here: http://stackoverflow.com/questions/24083455/openshift-jenkins-does-not-appear-to-send-node-label-during-build

@bparees

This comment has been minimized.

Show comment
Hide comment
@bparees

bparees Jun 9, 2014

Contributor

Since you are using Jenkins 1.564, are you setting JENKINS_JAR_CACHE_PATH on your Jenkins application instance?

https://github.com/openshift/jenkins-cloud-plugin/blob/master/src/main/java/hudson/plugins/openshift/OpenShiftComputerLauncher.java#L110

It should be set to an existing and writeable directory

It doesn't immediately appear related to your error, but the slaves will not launch successfully w/o this configuration and that could be causing a downstream issue w/ provision.

Ben Parees | OpenShift

----- Original Message -----

From: "stuart-warren" notifications@github.com
To: "openshift/jenkins-cloud-plugin" jenkins-cloud-plugin@noreply.github.com
Sent: Monday, June 9, 2014 6:38:02 AM
Subject: [jenkins-cloud-plugin] UnsupportedOperationException: No Label (#30)

Hi,

I get the following exception everytime I try to build using Jenkins. If I do
a build without using the Jenkins client it works fine.

Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Jun 09, 2014 11:22:03 AM hudson.triggers.SafeTimerTask run
SEVERE: Timer task
hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@9c56b52 failed
java.lang.UnsupportedOperationException: No Label
  at
  hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:405)
  at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
  at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
  at
  hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:366)
  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)

Does this plugin interact with anything other than Jenkins before this point,
or is it a bug in Jenkins/the plugin?

The Node label is not actually null according to the job config:
"python-build"

I've added more details here:
http://stackoverflow.com/questions/24083455/openshift-jenkins-does-not-appear-to-send-node-label-during-build


Reply to this email directly or view it on GitHub:
#30

Contributor

bparees commented Jun 9, 2014

Since you are using Jenkins 1.564, are you setting JENKINS_JAR_CACHE_PATH on your Jenkins application instance?

https://github.com/openshift/jenkins-cloud-plugin/blob/master/src/main/java/hudson/plugins/openshift/OpenShiftComputerLauncher.java#L110

It should be set to an existing and writeable directory

It doesn't immediately appear related to your error, but the slaves will not launch successfully w/o this configuration and that could be causing a downstream issue w/ provision.

Ben Parees | OpenShift

----- Original Message -----

From: "stuart-warren" notifications@github.com
To: "openshift/jenkins-cloud-plugin" jenkins-cloud-plugin@noreply.github.com
Sent: Monday, June 9, 2014 6:38:02 AM
Subject: [jenkins-cloud-plugin] UnsupportedOperationException: No Label (#30)

Hi,

I get the following exception everytime I try to build using Jenkins. If I do
a build without using the Jenkins client it works fine.

Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item
Jun 09, 2014 11:22:03 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Jun 09, 2014 11:22:03 AM hudson.triggers.SafeTimerTask run
SEVERE: Timer task
hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@9c56b52 failed
java.lang.UnsupportedOperationException: No Label
  at
  hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:405)
  at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
  at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
  at
  hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:366)
  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)

Does this plugin interact with anything other than Jenkins before this point,
or is it a bug in Jenkins/the plugin?

The Node label is not actually null according to the job config:
"python-build"

I've added more details here:
http://stackoverflow.com/questions/24083455/openshift-jenkins-does-not-appear-to-send-node-label-during-build


Reply to this email directly or view it on GitHub:
#30

@stuart-warren

This comment has been minimized.

Show comment
Hide comment
@stuart-warren

stuart-warren Jun 10, 2014

I did manage to get further running an older version of Jenkins (1.536), then may have hit the issue you mention. Will check further tomorrow, need to leave the office.
Thanks for the reply

stuart-warren commented Jun 10, 2014

I did manage to get further running an older version of Jenkins (1.536), then may have hit the issue you mention. Will check further tomorrow, need to leave the office.
Thanks for the reply

@stuart-warren

This comment has been minimized.

Show comment
Hide comment
@stuart-warren

stuart-warren Jun 11, 2014

I've tried a few different versions of Jenkins with the latest openshift cloud plugin
1.510 - works, but a bit old
1.554 - works if you set JENKINS_JAR_CACHE_PATH
1.564 - hits the above issue, doesn't ever spin up a gear let alone start the Jenkins slave

I'll probably try to find which version introduces the problem, but in the meantime how do you recommend setting the JENKINS_JAR_CACHE_PATH on all Jenkins gears?

I don't see anything in openshift/origin-server or openshift/puppet-openshift_origin

stuart-warren commented Jun 11, 2014

I've tried a few different versions of Jenkins with the latest openshift cloud plugin
1.510 - works, but a bit old
1.554 - works if you set JENKINS_JAR_CACHE_PATH
1.564 - hits the above issue, doesn't ever spin up a gear let alone start the Jenkins slave

I'll probably try to find which version introduces the problem, but in the meantime how do you recommend setting the JENKINS_JAR_CACHE_PATH on all Jenkins gears?

I don't see anything in openshift/origin-server or openshift/puppet-openshift_origin

@bparees

This comment has been minimized.

Show comment
Hide comment
@bparees

bparees Jun 11, 2014

Contributor

If you are running an origin or OSE deployment, you can set a global env variable that all gears will get automatically by creating a file under "/etc/openshift/env" with the name "JENKINS_JAR_CACHE_PATH" and the value you want. All gears (not just jenkins gears) will end up with that environment variable/value.

You need to create that file on every node in your deployment.

If you're running in Online, you'll have to do it per jenkins application:

You can use "rhc set-env" to set it once you've created the application, or you can also pass environment variables/values into "rhc app create".

Also we will be upgrading OS to use 1.554 (the latest LTS release) by default soon, at which point we'll set the jar cache path automatically.

Ben Parees | OpenShift

----- Original Message -----

From: "stuart-warren" notifications@github.com
To: "openshift/jenkins-cloud-plugin" jenkins-cloud-plugin@noreply.github.com
Cc: "Ben Parees" bparees@redhat.com
Sent: Wednesday, June 11, 2014 9:21:11 AM
Subject: Re: [jenkins-cloud-plugin] UnsupportedOperationException: No Label (#30)

I've tried a few different versions of Jenkins with the latest openshift
cloud plugin
1.510 - works, but a bit old
1.554 - works if you set JENKINS_JAR_CACHE_PATH
1.564 - hits the above issue, doesn't ever spin up a gear let alone start the
Jenkins slave

I'll probably try to find which version introduces the problem, but in the
meantime how do you recommend setting the JENKINS_JAR_CACHE_PATH on all
Jenkins gears?

I don't see anything in
openshift/origin-server@84b0623 or
openshift/puppet-openshift_origin@b34cd76


Reply to this email directly or view it on GitHub:
#30 (comment)

Contributor

bparees commented Jun 11, 2014

If you are running an origin or OSE deployment, you can set a global env variable that all gears will get automatically by creating a file under "/etc/openshift/env" with the name "JENKINS_JAR_CACHE_PATH" and the value you want. All gears (not just jenkins gears) will end up with that environment variable/value.

You need to create that file on every node in your deployment.

If you're running in Online, you'll have to do it per jenkins application:

You can use "rhc set-env" to set it once you've created the application, or you can also pass environment variables/values into "rhc app create".

Also we will be upgrading OS to use 1.554 (the latest LTS release) by default soon, at which point we'll set the jar cache path automatically.

Ben Parees | OpenShift

----- Original Message -----

From: "stuart-warren" notifications@github.com
To: "openshift/jenkins-cloud-plugin" jenkins-cloud-plugin@noreply.github.com
Cc: "Ben Parees" bparees@redhat.com
Sent: Wednesday, June 11, 2014 9:21:11 AM
Subject: Re: [jenkins-cloud-plugin] UnsupportedOperationException: No Label (#30)

I've tried a few different versions of Jenkins with the latest openshift
cloud plugin
1.510 - works, but a bit old
1.554 - works if you set JENKINS_JAR_CACHE_PATH
1.564 - hits the above issue, doesn't ever spin up a gear let alone start the
Jenkins slave

I'll probably try to find which version introduces the problem, but in the
meantime how do you recommend setting the JENKINS_JAR_CACHE_PATH on all
Jenkins gears?

I don't see anything in
openshift/origin-server@84b0623 or
openshift/puppet-openshift_origin@b34cd76


Reply to this email directly or view it on GitHub:
#30 (comment)

@stuart-warren

This comment has been minimized.

Show comment
Hide comment
@stuart-warren

stuart-warren Jun 11, 2014

Awesome, I'll create a /etc/openshift/env/JENKINS_JAR_CACHE_PATH in Puppet

Cheers

stuart-warren commented Jun 11, 2014

Awesome, I'll create a /etc/openshift/env/JENKINS_JAR_CACHE_PATH in Puppet

Cheers

@needforspeed

This comment has been minimized.

Show comment
Hide comment
@needforspeed

needforspeed Jul 29, 2014

@bparees Is the upgrade complete? I still see the same issue

needforspeed commented Jul 29, 2014

@bparees Is the upgrade complete? I still see the same issue

@bparees

This comment has been minimized.

Show comment
Hide comment
@bparees

bparees Jul 29, 2014

Contributor

@needforspeed openshift online is updated to jenkins 1.554 and you do not need to set a JENKINS_JAR_CACHE_PATH. Are you using online, origin, or OSE?

Contributor

bparees commented Jul 29, 2014

@needforspeed openshift online is updated to jenkins 1.554 and you do not need to set a JENKINS_JAR_CACHE_PATH. Are you using online, origin, or OSE?

@needforspeed

This comment has been minimized.

Show comment
Hide comment
@needforspeed

needforspeed Jul 29, 2014

@bparees I'm not sure. I added it from https://openshift.redhat.com/app/console/applications "Add Application". The version is Jenkins ver. 1.554.2 I think it should be online?

Here is the rhc tail jenkins result:

Jul 29, 2014 9:32:35 AM hudson.triggers.SCMTrigger$Runner run
INFO: SCM changes detected in hello-jenkins. Triggering  #1
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null in domain needforspeed
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item 
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Jul 29, 2014 9:32:38 AM hudson.triggers.SafeTimerTask run
SEVERE: Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@1348400 failed
java.lang.UnsupportedOperationException: No Label
    at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:402)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:366)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
^CInterrupted

needforspeed commented Jul 29, 2014

@bparees I'm not sure. I added it from https://openshift.redhat.com/app/console/applications "Add Application". The version is Jenkins ver. 1.554.2 I think it should be online?

Here is the rhc tail jenkins result:

Jul 29, 2014 9:32:35 AM hudson.triggers.SCMTrigger$Runner run
INFO: SCM changes detected in hello-jenkins. Triggering  #1
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null in domain needforspeed
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item 
Jul 29, 2014 9:32:38 AM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Jul 29, 2014 9:32:38 AM hudson.triggers.SafeTimerTask run
SEVERE: Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@1348400 failed
java.lang.UnsupportedOperationException: No Label
    at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:402)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:366)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
^CInterrupted
@bparees

This comment has been minimized.

Show comment
Hide comment
@bparees

bparees Jul 29, 2014

Contributor

Yes that would be online. Can you take me through the exact steps you're taking? The jenkins cartridge is working for doing application builds today, so I have to assume there is some configuration or other environment difference in what you are doing.

Contributor

bparees commented Jul 29, 2014

Yes that would be online. Can you take me through the exact steps you're taking? The jenkins cartridge is working for doing application builds today, so I have to assume there is some configuration or other environment difference in what you are doing.

@needforspeed

This comment has been minimized.

Show comment
Hide comment
@needforspeed

needforspeed Jul 29, 2014

@bparees
I was following a tutorial and playing around with jenkins. Here are my steps:

I create a job with all default values from jenkins free style.

I choose "Git" in "Source Code Management", and "Repository URL" is https://github.com/needforspeed/hello-jenkins.git

I choose "Poll SCM" in "Build Triggers". I pull * * * * * in "Schedule", this is just for the beginning. Once it's working, I can decrease the frequency.

Then "Build"

pwd
./script/test

needforspeed commented Jul 29, 2014

@bparees
I was following a tutorial and playing around with jenkins. Here are my steps:

I create a job with all default values from jenkins free style.

I choose "Git" in "Source Code Management", and "Repository URL" is https://github.com/needforspeed/hello-jenkins.git

I choose "Poll SCM" in "Build Triggers". I pull * * * * * in "Schedule", this is just for the beginning. Once it's working, I can decrease the frequency.

Then "Build"

pwd
./script/test
@bparees

This comment has been minimized.

Show comment
Hide comment
@bparees

bparees Jul 29, 2014

Contributor

I followed your steps and it seemed to work fine (at least, it ran the build, I did not look into why the actual ./script/test execution appears to have failed):
https://gist.github.com/bparees/e15341dfb3c0da3e3087

Note that I had to change the jenkins number of executors to 1 since no slave builder will be automatically created in this configuration.

Contributor

bparees commented Jul 29, 2014

I followed your steps and it seemed to work fine (at least, it ran the build, I did not look into why the actual ./script/test execution appears to have failed):
https://gist.github.com/bparees/e15341dfb3c0da3e3087

Note that I had to change the jenkins number of executors to 1 since no slave builder will be automatically created in this configuration.

@needforspeed

This comment has been minimized.

Show comment
Hide comment
@needforspeed

needforspeed Jul 29, 2014

@bparees Thanks for the help. The note is really where my issue is.

needforspeed commented Jul 29, 2014

@bparees Thanks for the help. The note is really where my issue is.

@abstratt

This comment has been minimized.

Show comment
Hide comment
@abstratt

abstratt Sep 17, 2014

I just had the same issue.

Note that I had to change the jenkins number of executors to 1 since no slave builder will be
automatically created in this configuration.

That was actually the workaround for me. Having it as 0/empty (the default) causes the issue in this ticket.

abstratt commented Sep 17, 2014

I just had the same issue.

Note that I had to change the jenkins number of executors to 1 since no slave builder will be
automatically created in this configuration.

That was actually the workaround for me. Having it as 0/empty (the default) causes the issue in this ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.