-
Bug
-
Resolution: Fixed
-
Critical
-
Jenkins 2.101
Seems to be caused by JENKINS-48365, similar to JENKINS-48604 but not the same.
Steps to reproduce:
- Install Jenkins 2.73
- Upgrade to 2.89
- Install/Upgrade command-launcher from the Plugin Manager (to version 1.2)
- Upgrade to 2.101
- command-launcher has been downgraded to 1.0
The problem seems to be that given that upgrade detection was also fixed by JENKINS-48365 in the upgrade from 2.89 to 2.101 the core thinks it is upgrading from 2.73 so it "blindly" install command-launcher without checking if it is installed, overwriting the installed version with the bundled, older one.
Last step logs:
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME") ene 11, 2018 6:55:08 PM Main deleteWinstoneTempContents ADVERTENCIA: Failed to delete the temporary Winstone file /var/folders/ry/pkk2p_d110lgzpwn80f_tr080000gn/T/winstone/jenkins-war-2.101.war ene 11, 2018 6:55:08 PM org.eclipse.jetty.util.log.Log initialized INFORMACIÓN: Logging initialized @464ms to org.eclipse.jetty.util.log.JavaUtilLog ene 11, 2018 6:55:08 PM winstone.Logger logInternal INFORMACIÓN: Beginning extraction from war file ene 11, 2018 6:55:11 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath ADVERTENCIA: Empty contextPath ene 11, 2018 6:55:11 PM org.eclipse.jetty.server.Server doStart INFORMACIÓN: jetty-9.4.z-SNAPSHOT ene 11, 2018 6:55:12 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet INFORMACIÓN: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet ene 11, 2018 6:55:12 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart INFORMACIÓN: DefaultSessionIdManager workerName=node0 ene 11, 2018 6:55:12 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart INFORMACIÓN: No SessionScavenger set, using defaults ene 11, 2018 6:55:12 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging INFORMACIÓN: Scavenging every 600000ms Jenkins home directory: /Users/andresrc/Documents/Testing/CJP-8205/oss/home found at: EnvVars.masterEnvVars.get("JENKINS_HOME") ene 11, 2018 6:55:14 PM org.eclipse.jetty.server.handler.ContextHandler doStart INFORMACIÓN: Started w.@74cec793{/,file:///Users/andresrc/Documents/Testing/CJP-8205/oss/home/war/,AVAILABLE}{/Users/andresrc/Documents/Testing/CJP-8205/oss/home/war} ene 11, 2018 6:55:14 PM org.eclipse.jetty.server.AbstractConnector doStart INFORMACIÓN: Started ServerConnector@754777cd{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} ene 11, 2018 6:55:14 PM org.eclipse.jetty.server.Server doStart INFORMACIÓN: Started @6726ms ene 11, 2018 6:55:14 PM winstone.Logger logInternal INFORMACIÓN: Winstone Servlet Engine v4.0 running: controlPort=disabled ene 11, 2018 6:55:15 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Started initialization ene 11, 2018 6:55:15 PM hudson.PluginManager loadDetachedPlugins INFORMACIÓN: Upgrading Jenkins. The last running version was 2.73. This Jenkins is version 2.101. ene 11, 2018 6:55:15 PM hudson.PluginManager loadDetachedPlugins INFORMACIÓN: Upgraded Jenkins from version 2.73 to version 2.101. Loaded detached plugins (and dependencies): [command-launcher.hpi] ene 11, 2018 6:55:15 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Listed all plugins ene 11, 2018 6:55:21 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Prepared all plugins ene 11, 2018 6:55:21 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Started all plugins ene 11, 2018 6:55:23 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Augmented all extensions ene 11, 2018 6:55:23 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Loaded all jobs ene 11, 2018 6:55:23 PM hudson.model.AsyncPeriodicWork$1 run INFORMACIÓN: Started Download metadata ene 11, 2018 6:55:23 PM hudson.model.AsyncPeriodicWork$1 run INFORMACIÓN: Finished Download metadata. 17 ms ene 11, 2018 6:55:24 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFORMACIÓN: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@58eb85b5: display name [Root WebApplicationContext]; startup date [Thu Jan 11 18:55:24 CET 2018]; root of context hierarchy ene 11, 2018 6:55:24 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFORMACIÓN: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@58eb85b5]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2f3a3b51 ene 11, 2018 6:55:24 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFORMACIÓN: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2f3a3b51: defining beans [authenticationManager]; root of factory hierarchy ene 11, 2018 6:55:24 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFORMACIÓN: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@4fa96319: display name [Root WebApplicationContext]; startup date [Thu Jan 11 18:55:24 CET 2018]; root of context hierarchy ene 11, 2018 6:55:24 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFORMACIÓN: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@4fa96319]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6a908666 ene 11, 2018 6:55:24 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFORMACIÓN: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6a908666: defining beans [filter,legacy]; root of factory hierarchy ene 11, 2018 6:55:24 PM jenkins.InitReactorRunner$1 onAttained INFORMACIÓN: Completed initialization ene 11, 2018 6:55:24 PM hudson.UDPBroadcastThread run INFORMACIÓN: Cannot listen to UDP port 33.848, skipping: java.net.SocketException: Can't assign requested address ene 11, 2018 6:55:24 PM hudson.WebAppMain$3 run INFORMACIÓN: Jenkins is fully up and running
- relates to
-
JENKINS-48604 Jenkins 2.96 downgrades script-security plugin on core update
-
- Resolved
-
-
JENKINS-48365 Command launcher plugin does not get installed on core update crossing 2.86
-
- Resolved
-
- links to
Ah, never mind, it is because the linked code only returns early if it knows the plugin should be installed, so it falls through to the next if statement which returns true because the last version is wrong, so it gets installed.
I think it makes sense to save the running version somewhere that happens more consistently than in the 4 places mentioned previously, and it also makes sense to invert the first check in LoadDetachedPlugins to return false early if the plugin is already installed and is newer than the currently running version.