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

Plugins included in hudson.war may not be updated via "Update Manager" or even manually via direct download

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      Even after upgrading SSH Slaves plugin to 0.5.1 it still reports in plugins as
      0.5.1 being available for upgrading and 0.4 as installed.
      This seems to be the source of trouble:

      • META-INF/maven/org.jvnet.hudson.plugins/ssh-slaves/pom.xml (both in
        ~/.hudson/plugins/ssh-slaves and ssh-slaves.hpi file itself):

      <version>0.4</version>

      whereas in pom.properties:

      #Generated by Maven
      #Mon Feb 02 15:47:44 GMT 2009
      version=0.4

      groupId=org.jvnet.hudson.plugins
      artifactId=ssh-slaves

      The contents inside seems to be timestamped with 2.02.2009 too, but the file:
      https://hudson.dev.java.net/servlets/ProjectDocumentList?folderID=9380&expandFolder=9380&folderID=5818
      having 0.5.1 seems to be made on 7.05.2009

      This is how it works from automatic upgrade from Hudson.
      When downloading directly from
      https://hudson.dev.java.net/servlets/ProjectDocumentList?folderID=9380&expandFolder=9380&folderID=5818
      I get the correct version.

          [JENKINS-3662] Plugins included in hudson.war may not be updated via "Update Manager" or even manually via direct download

          Alan Harder added a comment -

          changlog for Hudson 1.325 says:

          Update center wasn't capable of updating bundled plugins, such as subversion.

          so I'm marking this as resolved.. please reopen if this is a different problem that still exists on a current Hudson release, thanks.

          Alan Harder added a comment - changlog for Hudson 1.325 says: Update center wasn't capable of updating bundled plugins, such as subversion. so I'm marking this as resolved.. please reopen if this is a different problem that still exists on a current Hudson release, thanks.

          Hello,

          I reopen this bug. I am running version 1.338 of the war and "Update Center" insists on offering me:

          SSH Slaves plugin in version 0.9 (installed is 0.8)

          Subversion Plugin in version 1.8 (installed is 1.7)

          Downloads from the Update Center keeps hanging forever in the the last millimeter of the progress bar. I tried the following procedure as well:

          • stop Hudson
          • remove ssh-slaves and subversion in the plugins directory under HUDSON_HOME
          • download hpis manually (I checked the correct new version by looking into the META-INF/MANIFEST.MF)
          • restart

          This does not work, Update Center offers new versions again.
          After restart the new versions are gone in the HUDSON_HOME/plugins directory.

          I did see the workaround (copy plugins to expanded WAR WEB-INF/plugins directory) but was under the impression that this should be fixed now, so plugins are not replaced from the ones in the WAR (I am running the debian-package btw, so this is winstone serving).

          @mindless: Would you be so kind to clarify wether the workaround is still the way to go or download from "Update Manager" should work.

          Best Regards
          Mirko

          Mirko Friedenhagen added a comment - Hello, I reopen this bug. I am running version 1.338 of the war and "Update Center" insists on offering me: SSH Slaves plugin in version 0.9 (installed is 0.8) Subversion Plugin in version 1.8 (installed is 1.7) Downloads from the Update Center keeps hanging forever in the the last millimeter of the progress bar. I tried the following procedure as well: stop Hudson remove ssh-slaves and subversion in the plugins directory under HUDSON_HOME download hpis manually (I checked the correct new version by looking into the META-INF/MANIFEST.MF) restart This does not work, Update Center offers new versions again. After restart the new versions are gone in the HUDSON_HOME/plugins directory. I did see the workaround (copy plugins to expanded WAR WEB-INF/plugins directory) but was under the impression that this should be fixed now, so plugins are not replaced from the ones in the WAR (I am running the debian-package btw, so this is winstone serving). @mindless: Would you be so kind to clarify wether the workaround is still the way to go or download from "Update Manager" should work. Best Regards Mirko

          After update to 1.339 the newer versions are included.

          Mirko Friedenhagen added a comment - After update to 1.339 the newer versions are included.

          Alan Harder added a comment -

          Hm, I looked closer at the fix in 1.325. I guess you're supposed to create a file in your plugins directory called

          {plugin-file}

          .pinned to allow upgrade from the bundled version. For example, when you were still on 1.338 you could create subversion.hpi.pinned and then it should allow you to upgrade to subversion plugin 1.9 using update center. I've never seen an update hang, but I did see upgrade to 1.9 get switched back to 1.8 after restart. Not sure how you're supposed to know about this ".pinned" thing though!

          Alan Harder added a comment - Hm, I looked closer at the fix in 1.325. I guess you're supposed to create a file in your plugins directory called {plugin-file} .pinned to allow upgrade from the bundled version. For example, when you were still on 1.338 you could create subversion.hpi.pinned and then it should allow you to upgrade to subversion plugin 1.9 using update center. I've never seen an update hang, but I did see upgrade to 1.9 get switched back to 1.8 after restart. Not sure how you're supposed to know about this ".pinned" thing though!

          Mirko Friedenhagen added a comment - Hello, I wrote a wiki page ( http://wiki.jenkins-ci.org/display/JENKINS/How+to+update+plugins+included+in+the+Hudson+war ) and linked it to http://wiki.jenkins-ci.org/display/JENKINS/Plugins , so the information is at least available .

          Alan Harder added a comment -

          Ok, I did see an update hang now.. I tried an update with ssh-slaves and another non-bundled plugin. The non-bundled one finished, but ssh-slaves progress bar never reached the end.. stopping just before the end, as you said. Hudson restart went back to ssh-slaves 0.8 (bundled in Hudson 1.336 that I'm using).

          Thanks for the wiki update!

          Alan Harder added a comment - Ok, I did see an update hang now.. I tried an update with ssh-slaves and another non-bundled plugin. The non-bundled one finished, but ssh-slaves progress bar never reached the end.. stopping just before the end, as you said. Hudson restart went back to ssh-slaves 0.8 (bundled in Hudson 1.336 that I'm using). Thanks for the wiki update!

          This is a core problem.

          Mirko Friedenhagen added a comment - This is a core problem.

          Alan Harder added a comment -

          Ok, I've started investigating this.. when the update "hangs" I found that no threads in Hudson are working on it anymore. It downloads the plugin, moves the old file to ".bak" and puts the new file in place, then bails out. I think there must be a RuntimeException that the ExecutorService is silently ignoring. Still digging..

          Alan Harder added a comment - Ok, I've started investigating this.. when the update "hangs" I found that no threads in Hudson are working on it anymore. It downloads the plugin, moves the old file to ".bak" and puts the new file in place, then bails out. I think there must be a RuntimeException that the ExecutorService is silently ignoring. Still digging..

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/UpdateCenter.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25505
          Log:
          [FIXED JENKINS-3662] Fix ability to upgrade bundled plugins when security is enabled.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/UpdateCenter.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=25505 Log: [FIXED JENKINS-3662] Fix ability to upgrade bundled plugins when security is enabled.

          Worked for me as of 1.340.

          Mirko Friedenhagen added a comment - Worked for me as of 1.340.

            mindless Alan Harder
            krystian_nowak Krystian Nowak
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: