Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12514

.hpi versus .jpi causes inability to upgrade Subversion Plugin

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Ubuntu 11.10, OpenJDK 1.6.0_23, Tomcat 7.0.21, Jenkins 1.448 & 1.449
      Jenkins 1.456 on Windows Server 2003 64-bit, Sun JDK 6.0.260.3
    • Similar Issues:
      Show 5 results

      Description

      Reproduction:
      $JENKINS_HOME/plugins: subversion (directory), subversion.hpi
      1) Open http://<root>/pluginManager. Update Subversion plugin from 1.34 -> 1.37 using download now and install after restart button.
      $JENKINS_HOME/plugins: subversion (directory), subversion.bak (1.34), subversion.hpi.pinned, subversion.jpi (1.37)
      2) Restart Tomcat/Jenkins
      $JENKINS_HOME/plugins: subversion (directory), subversion.bak (1.34), subversion.hpi (1.34) subversion.hpi.pinned, subversion.jpi (1.37)
      3) PluginManager still reports old version

      Should note that the logs report:
      INFO: Ignoring /ci/jenkins-home/plugins/subversion.jpi because /ci/jenkins-home/plugins/subversion.hpi is already loaded

      Also the plugin is broken at this point with a NoClassDefFound on org/tmatesoft/svn/core/SVNException

      Clean State:
      1) /etc/init.d/tomcat7 stop
      2) cd $JENKINS_HOME/plugins
      3) rm subversion*
      4) /etc/init.d/tomcat7 start

      Workaround:
      1) Restore clean state
      2) Update plugin
      3) Stop tomcat/jenkins
      4) cd $JENKINS_HOME/plugins
      5) mv subversion.jpi subversion.hpi
      6) Start tomcat/jenkins

        Issue Links

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Does anyone see the issue on newest Jenkins versions (1.532+)?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Does anyone see the issue on newest Jenkins versions (1.532+)?
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          No further input. Closing.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - No further input. Closing.
          Hide
          mr_dfuse Nico Mommaerts added a comment -

          Yes, I still see this happening on the latest lts (1.565.2)
          Also for the credentials plugin

          Show
          mr_dfuse Nico Mommaerts added a comment - Yes, I still see this happening on the latest lts (1.565.2) Also for the credentials plugin
          Hide
          martinb3 Martin Smith added a comment - - edited

          Hello! I'm still seeing this on the latest Jenkins LTS 1.609.3 (2015/09/02) as well. I've documented a lot of it in an issue filed against the Chef cookbook for Jenkins at https://github.com/chef-cookbooks/jenkins/issues/406, but the core of the issue is this:

          # sha256sum /var/chef/cache/cvs-2.12.plugin 
          6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba  /var/chef/cache/cvs-2.12.plugin
          
          # unzip /var/chef/cache/cvs-2.12.plugin
          # grep -i plugin-version META-INF/MANIFEST.MF 
          Plugin-Version: 2.12
          
          # sha256sum /var/lib/jenkins/plugins/cvs.jpi 
          6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba  cvs.jpi
          
          # grep -i plugin-version /var/lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF 
          Plugin-Version: 2.11
          
          # mv /var/lib/jenkins/war/WEB-INF/plugins/cvs.hpi /tmp/nonchef-cvs.hpi
          
          # service jenkins restart
          ok: run: jenkins: (pid 14918) 1s
          
          # grep -i plugin-version /var/lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF 
          Plugin-Version: 2.12
          

          As you can see, Jenkins won't upgrade the plugin, even though it's a newer version, until I manually remove the .hpi and restart Jenkins.

          Show
          martinb3 Martin Smith added a comment - - edited Hello! I'm still seeing this on the latest Jenkins LTS 1.609.3 (2015/09/02) as well. I've documented a lot of it in an issue filed against the Chef cookbook for Jenkins at https://github.com/chef-cookbooks/jenkins/issues/406 , but the core of the issue is this: # sha256sum / var /chef/cache/cvs-2.12.plugin 6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba / var /chef/cache/cvs-2.12.plugin # unzip / var /chef/cache/cvs-2.12.plugin # grep -i plugin-version META-INF/MANIFEST.MF Plugin-Version: 2.12 # sha256sum / var /lib/jenkins/plugins/cvs.jpi 6e6dfd35e8501bf5f84a9d43d210db61165ce51a606327fc81f2efc5208478ba cvs.jpi # grep -i plugin-version / var /lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF Plugin-Version: 2.11 # mv / var /lib/jenkins/war/WEB-INF/plugins/cvs.hpi /tmp/nonchef-cvs.hpi # service jenkins restart ok: run: jenkins: (pid 14918) 1s # grep -i plugin-version / var /lib/jenkins/plugins/cvs/META-INF/MANIFEST.MF Plugin-Version: 2.12 As you can see, Jenkins won't upgrade the plugin, even though it's a newer version, until I manually remove the .hpi and restart Jenkins.
          Hide
          danielbeck Daniel Beck added a comment -

          Whatever that is, it's probably a different problem than the one reported almost four years ago.

          Show
          danielbeck Daniel Beck added a comment - Whatever that is, it's probably a different problem than the one reported almost four years ago.

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              acharlieh Charlie Huggard
            • Votes:
              18 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: