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

      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

          acharlieh Charlie Huggard created issue -
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          This is fixed in ba71264b6b6d75e0c86699d02700dea56f388105 toward 1.450.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - This is fixed in ba71264b6b6d75e0c86699d02700dea56f388105 toward 1.450.
          kohsuke Kohsuke Kawaguchi made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Kohsuke Kawaguchi [ kohsuke ]
          Resolution Fixed [ 1 ]
          karianna karianna made changes -
          Link This issue is blocking JENKINS-12449 [ JENKINS-12449 ]
          mc1arke Michael Clarke made changes -
          Link This issue is blocking JENKINS-12583 [ JENKINS-12583 ]
          Hide
          karianna karianna added a comment -

          Problem still exists in 1.450

          Show
          karianna karianna added a comment - Problem still exists in 1.450
          Hide
          karianna karianna added a comment -

          Problem still exists in 1.450, default plugin is now .jpi extension, but upgrade problem remains, even with fresh install.

          Show
          karianna karianna added a comment - Problem still exists in 1.450, default plugin is now .jpi extension, but upgrade problem remains, even with fresh install.
          karianna karianna made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          pmilliken Paul Milliken made changes -
          Link This issue is related to JENKINS-12632 [ JENKINS-12632 ]
          Hide
          alexlehm Alex Lehmann added a comment -

          I had to set up a "fresh" jenkins instance for dev testing, so I had a new chance to check if updating the plugins works or not, it turns out it doesn't.

          The file is updated in the plugin directory, but the .pinned file is not created so that old plugin is reinstalled when restarting the server.

          When I create the .pinned files manually after shutting down the server, the update works, that provides a work-around at least.

          Show
          alexlehm Alex Lehmann added a comment - I had to set up a "fresh" jenkins instance for dev testing, so I had a new chance to check if updating the plugins works or not, it turns out it doesn't. The file is updated in the plugin directory, but the .pinned file is not created so that old plugin is reinstalled when restarting the server. When I create the .pinned files manually after shutting down the server, the update works, that provides a work-around at least.
          Hide
          itl_software_developer Mark Andrews added a comment -

          Problem still exists in 1.451

          Show
          itl_software_developer Mark Andrews added a comment - Problem still exists in 1.451
          Hide
          tuomassiren Tuomas Siren added a comment -

          And in 1.454. I hate to use the pinning workaround for subversion upgrade, so I'd say this is more than just a minor issue.

          Show
          tuomassiren Tuomas Siren added a comment - And in 1.454. I hate to use the pinning workaround for subversion upgrade, so I'd say this is more than just a minor issue.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          I just tried it and it works for me. The change in ba71264b6b6d75e0c86699d02700dea56f388105 does the forced normalization of "s/hpi/jpi/".

          My current hypothesis is that this is only a problem on Windows, as I use "java.io.File.renameTo()" to move a file, and I expect the Unix semantis of overwrite when the destination already exists.

          Verifying this on Windows now.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - I just tried it and it works for me. The change in ba71264b6b6d75e0c86699d02700dea56f388105 does the forced normalization of "s/hpi/jpi/". My current hypothesis is that this is only a problem on Windows, as I use "java.io.File.renameTo()" to move a file, and I expect the Unix semantis of overwrite when the destination already exists. Verifying this on Windows now.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Yep.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Yep.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/PluginManager.java
          http://jenkins-ci.org/commit/jenkins/132f8b769d3cd39861d686ccf0751fd81cf8595d
          Log:
          [FIXED JENKINS-12514]

          Fixed the file overwrite problem on Windows.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/PluginManager.java http://jenkins-ci.org/commit/jenkins/132f8b769d3cd39861d686ccf0751fd81cf8595d Log: [FIXED JENKINS-12514] Fixed the file overwrite problem on Windows.
          scm_issue_link SCM/JIRA link daemon made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Bumping up the priority to merge this to LTS since this affects upgrading users.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Bumping up the priority to merge this to LTS since this affects upgrading users.
          kohsuke Kohsuke Kawaguchi made changes -
          Priority Minor [ 4 ] Blocker [ 1 ]
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1579
          [FIXED JENKINS-12514] (Revision 132f8b769d3cd39861d686ccf0751fd81cf8595d)

          Result = UNSTABLE
          Kohsuke Kawaguchi : 132f8b769d3cd39861d686ccf0751fd81cf8595d
          Files :

          • core/src/main/java/hudson/PluginManager.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1579 [FIXED JENKINS-12514] (Revision 132f8b769d3cd39861d686ccf0751fd81cf8595d) Result = UNSTABLE Kohsuke Kawaguchi : 132f8b769d3cd39861d686ccf0751fd81cf8595d Files : core/src/main/java/hudson/PluginManager.java changelog.html
          mc1arke Michael Clarke made changes -
          Link This issue is duplicated by JENKINS-13066 [ JENKINS-13066 ]
          Hide
          greg_allen Greg Allen added a comment -

          not fixed on Windows in 1.456.

          Tried upgrading Subversion plugin from default 1.34 to latest 1.39 using plugin update page.

          new version gets downloaded and can be seen in the plugins directory. old ".bak" version of plugin is there too. However, on restart the newly downloaded subversion.jpi file seems to get overwritten, and the installed version is still 1.34.

          Show
          greg_allen Greg Allen added a comment - not fixed on Windows in 1.456. Tried upgrading Subversion plugin from default 1.34 to latest 1.39 using plugin update page. new version gets downloaded and can be seen in the plugins directory. old ".bak" version of plugin is there too. However, on restart the newly downloaded subversion.jpi file seems to get overwritten, and the installed version is still 1.34.
          greg_allen Greg Allen made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          greg_allen Greg Allen made changes -
          Environment Ubuntu 11.10, OpenJDK 1.6.0_23, Tomcat 7.0.21, Jenkins 1.448 & 1.449 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
          Hide
          billm Bill Michell added a comment -

          The issue also affects Mac OS X 1.457

          Show
          billm Bill Michell added a comment - The issue also affects Mac OS X 1.457
          Hide
          alexlehm Alex Lehmann added a comment -

          fixed with JENKINS-13129

          Show
          alexlehm Alex Lehmann added a comment - fixed with JENKINS-13129
          alexlehm Alex Lehmann made changes -
          Link This issue is related to JENKINS-13129 [ JENKINS-13129 ]
          Hide
          rborer Reynald Borer added a comment -

          Still happening with Jenkins 1.458 running under debian squeeze (with the debian package).

          Show
          rborer Reynald Borer added a comment - Still happening with Jenkins 1.458 running under debian squeeze (with the debian package).
          Hide
          bhazard Bill Hazard added a comment -

          for those seeking a workaround:

          rm WEB-INF/plugins/subversion.hpi and re-install via Manage Plugins

          ditto for cvs and translation

          Show
          bhazard Bill Hazard added a comment - for those seeking a workaround: rm WEB-INF/plugins/subversion.hpi and re-install via Manage Plugins ditto for cvs and translation
          Hide
          lyle_lee Lyle Lee added a comment -

          Must be consider about upgrade subversion plugin by hand without internet connection.

          Following the instruction on wiki page, restarting the server with jenkins.war after putting subversion.hpi in $JENKINS_HOME/plugins overwrites just copied new version with old one included in jenkins.war.

          I found that this problem can be solved by removing $JENKINS_HOME/war/WEB-INF/plugins/subversion.hpi before restarting the server. But it's not general way and also conflicts over wiki instruction.

          Show
          lyle_lee Lyle Lee added a comment - Must be consider about upgrade subversion plugin by hand without internet connection. Following the instruction on wiki page, restarting the server with jenkins.war after putting subversion.hpi in $JENKINS_HOME/plugins overwrites just copied new version with old one included in jenkins.war. I found that this problem can be solved by removing $JENKINS_HOME/war/WEB-INF/plugins/subversion.hpi before restarting the server. But it's not general way and also conflicts over wiki instruction.
          Hide
          nikhilvasaikar Nikhil Vasaikar added a comment - - edited

          I am facing a similar issue, when uploading a new hpi file. The plugin gets uploaded form the Advanced Tab. I can see the .jpi file and the exploded folder under JENKINS_HOME\plugins. I restarted Jenkins.

          When I go on the Configure screen, I can't see my plugin options, as if the plugin was never installed.

          Jenkins version : 1.488

          Show
          nikhilvasaikar Nikhil Vasaikar added a comment - - edited I am facing a similar issue, when uploading a new hpi file. The plugin gets uploaded form the Advanced Tab. I can see the .jpi file and the exploded folder under JENKINS_HOME\plugins. I restarted Jenkins. When I go on the Configure screen, I can't see my plugin options, as if the plugin was never installed. Jenkins version : 1.488
          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.
          kohsuke Kohsuke Kawaguchi made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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
          ircbot IRCbot Run by Kohsuke made changes -
          Component/s core [ 15593 ]
          Component/s update-center [ 15629 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: