docker-plugin
docker-plugin copied to clipboard
Docker "Use container only once" option is selectable for non-docker slaves
hi,
Since the 1.5 update on docker-plugin, I'm unable to add or configure a node. I have the following exception raised: (I use jenkins 2.121.2.)
java.lang.ClassCastException: hudson.slaves.SlaveComputer cannot be cast to io.jenkins.docker.DockerComputer at com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy.start(DockerOnceRetentionStrategy.java:33) at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:145) at hudson.model.AbstractCIBase.access$000(AbstractCIBase.java:46) at hudson.model.AbstractCIBase$2.run(AbstractCIBase.java:207) at hudson.model.Queue._withLock(Queue.java:1380) at hudson.model.Queue.withLock(Queue.java:1257) at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:190) at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1551) at jenkins.model.Nodes$2.run(Nodes.java:138) at hudson.model.Queue._withLock(Queue.java:1380) at hudson.model.Queue.withLock(Queue.java:1257) at jenkins.model.Nodes.addNode(Nodes.java:134) at jenkins.model.Jenkins.addNode(Jenkins.java:2058) at hudson.model.ComputerSet.doDoCreateItem(ComputerSet.java:301) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:784) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864) at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:530) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
The same happens when creating a virtualbox node:
java.lang.ClassCastException: hudson.plugins.virtualbox.VirtualBoxComputer cannot be cast to io.jenkins.docker.DockerComputer at com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy.start(DockerOnceRetentionStrategy.java:33) at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:145) at hudson.model.AbstractCIBase.access$000(AbstractCIBase.java:46) at hudson.model.AbstractCIBase$2.run(AbstractCIBase.java:207) at hudson.model.Queue._withLock(Queue.java:1380) at hudson.model.Queue.withLock(Queue.java:1257) at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:190) at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1552) at jenkins.model.Nodes$2.run(Nodes.java:138) at hudson.model.Queue._withLock(Queue.java:1380) at hudson.model.Queue.withLock(Queue.java:1257) at jenkins.model.Nodes.addNode(Nodes.java:134) at jenkins.model.Jenkins.addNode(Jenkins.java:2059) at hudson.model.ComputerSet.doDoCreateItem(ComputerSet.java:301) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:784) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864) at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:531) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) at java.lang.Thread.run(Thread.java:748)
I think that you're using the DockerOnceRetentionStrategy for nodes that aren't docker nodes. I'm not sure how you're doing this, but it isn't a valid use case - the docker-plugin's retention strategies are only intended to be used by the docker-plugin's own nodes. You're getting this error because you've selected the DockerOnceRetentionStrategy
for a node that isn't a docker container.
Can you explain, in simple terms and including screenshots, how you can cause this error?
You're right ! I did not saw it was a 'docker' strategy ! In fact the issue is that this run once strategy is available for all nodes, even the non-docker ones !
Thanks a lot.
Um, if it's "available for all nodes" then that probably is a bug in this plugin.
If you'd be good enough to describe a step-by-step repro case (ideally including pictures) then I might be able to fix it so that other folks won't fall into the same trap you did.
OK, here is all information I can easily get:
Name ↓ | Value |
---|---|
awt.toolkit | sun.awt.X11.XToolkit |
executable-war | /usr/share/jenkins/jenkins.war |
file.encoding | UTF-8 |
file.encoding.pkg | sun.io |
file.separator | / |
hudson.TcpSlaveAgentListener.hostName | xxxxxxxxxxxxxxxxxxxx |
java.awt.graphicsenv | sun.awt.X11GraphicsEnvironment |
java.awt.headless | true |
java.awt.printerjob | sun.print.PSPrinterJob |
java.class.path | /usr/share/jenkins/jenkins.war |
java.class.version | 52.0 |
java.endorsed.dirs | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed |
java.ext.dirs | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext |
java.home | /usr/lib/jvm/java-8-openjdk-amd64/jre |
java.io.tmpdir | /tmp |
java.library.path | /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib |
java.runtime.name | OpenJDK Runtime Environment |
java.runtime.version | 1.8.0_181-8u181-b13-1~deb9u1-b13 |
java.specification.name | Java Platform API Specification |
java.specification.vendor | Oracle Corporation |
java.specification.version | 1.8 |
java.vendor | Oracle Corporation |
java.vendor.url | http://java.oracle.com/ |
java.vendor.url.bug | http://bugreport.sun.com/bugreport/ |
java.version | 1.8.0_181 |
java.vm.info | mixed mode |
java.vm.name | OpenJDK 64-Bit Server VM |
java.vm.specification.name | Java Virtual Machine Specification |
java.vm.specification.vendor | Oracle Corporation |
java.vm.specification.version | 1.8 |
java.vm.vendor | Oracle Corporation |
java.vm.version | 25.181-b13 |
javax.accessibility.assistive_technologies | org.GNOME.Accessibility.AtkWrapper |
jetty.git.hash | 82b8fb23f757335bb3329d540ce37a2a2615f0a8 |
jna.loaded | true |
jna.platform.library.path | /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib |
jnidispatch.path | /tmp/jna--1712433994/jna7710711859176195795.tmp |
line.separator | |
mail.smtp.sendpartial | true |
mail.smtps.sendpartial | true |
os.arch | amd64 |
os.name | Linux |
os.version | 4.14.12-xxxx-std-ipv6-64 |
path.separator | : |
sun.arch.data.model | 64 |
sun.boot.class.path | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes |
sun.boot.library.path | /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 |
sun.cpu.endian | little |
sun.cpu.isalist | |
sun.font.fontmanager | sun.awt.X11FontManager |
sun.io.unicode.encoding | UnicodeLittle |
sun.java.command | /usr/share/jenkins/jenkins.war |
sun.java.launcher | SUN_STANDARD |
sun.jnu.encoding | UTF-8 |
sun.management.compiler | HotSpot 64-Bit Tiered Compilers |
sun.nio.ch.bugLevel | |
sun.os.patch.level | unknown |
svnkit.http.methods | Digest,Basic,NTLM,Negotiate |
svnkit.ssh2.persistent | false |
user.dir | / |
user.home | /var/jenkins_home |
user.language | en |
user.name | jenkins |
user.timezone | Etc/UTC |
Name ↓ | Value |
---|---|
CA_CERTIFICATES_JAVA_VERSION | 20170531+nmu1 |
COPY_REFERENCE_FILE_LOG | /var/jenkins_home/copy_reference_file.log |
HOME | /var/jenkins_home |
HOSTNAME | f5c6b574e66e |
JAVA_DEBIAN_VERSION | 8u181-b13-1~deb9u1 |
JAVA_HOME | /docker-java-home |
JAVA_OPTS | "-Dhudson.TcpSlaveAgentListener.hostName=xxxxxxxxxxx" |
JAVA_VERSION | 8u181 |
JENKINS_HOME | /var/jenkins_home |
JENKINS_INCREMENTALS_REPO_MIRROR | https://repo.jenkins-ci.org/incrementals |
JENKINS_SLAVE_AGENT_PORT | 50000 |
JENKINS_UC | https://updates.jenkins.io |
JENKINS_UC_EXPERIMENTAL | https://updates.jenkins.io/experimental |
JENKINS_URL | "jenkins.u-test-factory.org" |
JENKINS_VERSION | 2.121.3 |
LANG | C.UTF-8 |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
PWD | / |
SHLVL | 0 |
Name ↓ | Version | Enabled |
---|---|---|
ant | 1.8 | true |
antisamy-markup-formatter | 1.5 | true |
apache-httpcomponents-client-4-api | 4.5.5-3.0 | true |
authentication-tokens | 1.3 | true |
bouncycastle-api | 2.17 | true |
cobertura | 1.13 | true |
code-coverage-api | 1.0.5 | true |
command-launcher | 1.2 | true |
credentials | 2.1.18 | true |
credentials-binding | 1.16 | true |
cvs | 2.14 | true |
display-url-api | 2.2.0 | true |
docker-commons | 1.13 | true |
docker-java-api | 3.0.14 | true |
docker-plugin | 1.1.5 | true |
durable-task | 1.26 | true |
external-monitor-job | 1.7 | true |
git | 3.9.1 | true |
git-client | 2.7.3 | true |
gitlab-plugin | 1.5.10 | true |
icon-shim | 2.0.3 | true |
jackson2-api | 2.8.11.3 | true |
javadoc | 1.4 | true |
jdk-tool | 1.1 | true |
jsch | 0.1.54.2 | true |
junit | 1.26.1 | true |
ldap | 1.20 | true |
mailer | 1.21 | true |
mapdb-api | 1.0.9.0 | true |
matrix-auth | 2.3 | true |
matrix-project | 1.13 | true |
maven-plugin | 3.1.2 | true |
pam-auth | 1.4 | true |
plain-credentials | 1.4 | true |
rebuild | 1.29 | true |
role-strategy | 2.9.0 | true |
scm-api | 2.2.7 | true |
script-security | 1.46 | true |
ssh-credentials | 1.14 | true |
ssh-slaves | 1.28.1 | true |
structs | 1.15 | true |
subversion | 2.12.1 | true |
token-macro | 2.5 | true |
translation | 1.16 | true |
virtualbox | 0.8-SNAPSHOT (private-3840f1b1-Wurzinger) | true |
windows-slaves | 1.3.1 | true |
workflow-api | 2.29 | true |
workflow-job | 2.25 | true |
workflow-scm-step | 2.6 | true |
workflow-step-api | 2.16 | true |
workflow-support | 2.20 | true |
xunit | 2.2.5 | true |
Here is a capture of a new VirtualBox node creation where the docker retention strategy is proposed.
Tell me if you need more things.
regards
So, just to confirm....
- in the screenshot above, that was reached simply by doing "New Node"?
- "Use container only once" is suggested as the default "Availability" where it should not even be an option here.
In the "New Node" view, I had to define a name and select either "Permanent Agent", "Virtualbox Slave" or "Copy Existing Node". Then, both in "Permanent Agent" or "Virtualbox Slave", in the Availability combo-box the default is "Keep this agent online as much as possible", but I can select the "Use container only once" option.
OK, then this sounds like it's a bug in the docker-plugin - that option should not be available for anything other than slave nodes that are based on docker containers (i.e. created by the docker plugin). That "retention strategy" is not a general-purpose one.
I'm fairly sure that the vsphere-plugin and openstack plugins have their own retention strategies that don't show up in the general case - I guess the docker plugin needs to do whatever they do to keep their retention stuff "private".
Note: The openstack-cloud-plugin code has this comment:
// no @Extension since this retention strategy is used only for cloud nodes that we provision automatically.
I suspect that this is the key factor here - our code specifies that this is an extension and hence makes it available for everyone.
Any fix for it?
The description field was modified so it said "Use docker container only once" with the hope that folks wouldn't select it for things that aren't a docker container.
Other than that, no, nobody's come up with a (non-breaking!) change that'll actually prevent folks from selecting it outside the scope of this plugin.
If you can figure out a way of doing that, feel free to submit a PR.
But then this should be highlighted in the plugin page and manage plugin page inside Jenkins, as people installs it and later they get to know once there Jenkins controller is not able to run.
If you can come up with some documentation improvements that will help people avoid this issue in future (and/or identify and resolve the issue if they do hit it) then feel free to submit a PR. i.e. This is open-source; if you care about this issue, you can fix it yourself 😁
FYI it was exactly this kind of "I want something fixed, and nobody else is fixing it for me" situation that first got me involved in this plugin many years ago; while I am no longer doing maintenance for this plugin (or even using it anymore), I can provide a bit of guidance if you're willing to get stuck in...
I can understand your feelings, let me see if I can find someone to work on this :)
in my case i had to disable the docker plugin manualy by exec -it into the jenkins container and deleting the docker plugin file > /jenkins_home/plugins/ found the docker plugin file and renamed it to .disabled