How can I check the Jenkins I'm running is aligned with the installed rpm package

Issue

Rpm is displaying an installed Jenkins version different that the one actually running.

For instance, you see in the UI that you are using <Product Name> 2.138.1.2.
But rpm -q jenkins displays jenkins-2.89.4.2-1.1.noarch.

Environment

Resolution

How to get details on the installation?

The most probable cause for this issue is that you updated Jenkins by simply swapping the Jenkins war instead of running the upgrade command of your package manager (either yum or rpm).

Rpm provides a utility to diff the installed package with the genuine one to check if it has been tempered with.
For instance, on an instance where the war has been swapped, you could see something like this:

$ rpm -V jenkins

..5....T.   c  /etc/init.d/jenkins
.......T.   c  /etc/logrotate.d/jenkins
S.5....T.   c  /etc/sysconfig/jenkins
S.5....T.      /usr/lib/jenkins/jenkins.war
.M...UG..      /var/log/jenkins
NOTE: You might need to install yum-utils for this command to work

You can then find the signification of the diff in the tool documentation.

In our example, one can see that the jenkins.war was swapped because:

  • S - File size differs.
  • 5 - The MD5 checksum differs.
  • T - The file time (mtime) differs.

What to do?

Daily Operations

This issue will probably not threaten your installation.
You need to make sure of that by reading the service configuration files to be sure you are pointing to the correct war.
In case of doubt, open a support ticket attaching the output of rpm -V jenkins and your service configuration file.

Upgrade

The issue could however cause trouble when you upgrade Jenkins.
In this case, the recommendation would be to backup the war and the init scripts.
Make sure to open an Assisted Update ticket mentioning this issue and attaching the output of rpm -V jenkins and your service configuration file.

Have more questions?

0 Comments

Please sign in to leave a comment.