Why are my plugins updated on restart when running versions 2.277.1.2 until 2.289.1.2?

Article ID:4403826661019
1 minute readKnowledge base

Issue

  • Plugins are forcefully updated on reboot to latest version even if users manually downgrade plugin to a lower version.

  • CloudBees Assurance Program (CAP) configuration option Allow automatic upgrades of plugins on restart is already FALSE.

  • On Jenkins startup you have following log or similar:

INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
INFO    hudson.PluginManager#loadDetachedPlugins: Upgrading Jenkins. The last running version was 2.277.1.2. This Jenkins is version 2.277.2.3.
INFO    hudson.PluginManager#loadDetachedPlugins: Upgraded Jenkins from version 2.277.1.2 to version 2.277.2.3. Loaded detached plugins (and dependencies): []

Resolution

This is caused by a bug that causes the version to not be recorded after upgrade, so during each restart Jenkins will think it is upgrading, and it will extract plugins from the war file. This bug is tracked as JENKINS-65329.

This issue is resolved with release version 2.289.1.2.

Workaround

Prior to the resolution, the workaround is:

Tested for 2.277.2.3

After upgrading to 2.277.2.3 for the first time:

1) Perform a backup

2) Stop the instance

3) Edit the files JENKINS_HOME/jenkins.install.InstallUtil.lastExecVersion and jenkins.install.UpgradeWizard.state overwriting the listed previous version of CI with the current version installed (2.277.2.3 in this example)

4) Start the instance again.

5) Go to Plugin Manager and click on Check now to make sure the plugin manager has the latest data for the current version.

Tested product/plugin versions

References