Jenkins slave machines not created after upgrading Jenkins server and changing the workspace

January 13, 2018 539 views
DigitalOcean Java Ubuntu 16.04

I have already configured the Digital Ocean slave machines in the Jenkins CI and it was working fine. but all of the sudden the slave couldn't created in Jenkins server at last three days, when I updated the Jennkins server and changed the workspace.

When I see the error log, I got these two different errors. How could resolve these errors?

Jenkins Version: 2.90

Cannot create a droplet with a smaller disk (20GB) than the image (320GB).
com.myjeeva.digitalocean.exception.DigitalOceanException: Cannot create a droplet with a smaller disk (20GB) than the image (320GB).
    at com.myjeeva.digitalocean.impl.DigitalOceanClient.evaluateResponse(DigitalOceanClient.java:1210)
    at com.myjeeva.digitalocean.impl.DigitalOceanClient.executeHttpRequest(DigitalOceanClient.java:1155)
    at com.myjeeva.digitalocean.impl.DigitalOceanClient.doPost(DigitalOceanClient.java:1117)
    at com.myjeeva.digitalocean.impl.DigitalOceanClient.perform(DigitalOceanClient.java:1074)
    at com.myjeeva.digitalocean.impl.DigitalOceanClient.createDroplet(DigitalOceanClient.java:296)
    at com.dubture.jenkins.digitalocean.SlaveTemplate.provision(SlaveTemplate.java:224)
    at com.dubture.jenkins.digitalocean.Cloud$1.call(Cloud.java:224)
    at com.dubture.jenkins.digitalocean.Cloud$1.call(Cloud.java:216)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

Unexpected exception encountered while provisioning agent jenkins-slave-slave-7be01428-2fea-451d-bdf8-e7e4dbfc3bc3
java.lang.AssertionError
    at com.dubture.jenkins.digitalocean.SlaveTemplate.provision(SlaveTemplate.java:229)
    at com.dubture.jenkins.digitalocean.Cloud$1.call(Cloud.java:224)
    at com.dubture.jenkins.digitalocean.Cloud$1.call(Cloud.java:216)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

1 Answer

The key piece of the error message is:

Cannot create a droplet with a smaller disk (20GB) than the image (320GB).

That is being returned by the DigitalOcean API. It's telling you that the image being used to create the Jenkins slave has more used disk space than is available in the Droplet plan you are using. This is usually the result of creating a snapshot from a larger Droplet and then trying to create a smaller Droplet from it.

Have another answer? Share your knowledge.