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

Installing plugin (without restarting) is broken with other non-refreshable extension.

      Installing plugins without restart don't work in case if non-refreshable extension is activated. In my case I had https://wiki.jenkins-ci.org/display/JENKINS/Persona+Plugin installed, and received following exception:

      hudson.util.IOException2: Failed to dynamically deploy this plugin
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1137)
      at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:955)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: hudson.util.IOException2: Failed to install build-name-setter-plugin plugin
      at hudson.PluginManager.dynamicLoad(PluginManager.java:365)
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1133)
      ... 7 more
      Caused by: jenkins.ExtensionRefreshException: hudson.plugins.persona.xml.XmlPersonaFinder@1664d71 doesn't support refresh
      at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:1970)
      at hudson.PluginManager.dynamicLoad(PluginManager.java:358)
      ... 8 more

          [JENKINS-12803] Installing plugin (without restarting) is broken with other non-refreshable extension.

          Gavriil Konovalenko created issue -

          In the code, I see that ExtensionRefreshException thrown in Jenkins.refreshExtensions() is handled to raise IOException2 and fail plugin installation process.
          So it seems that such behavior is by design? If so, then I'd suggest to change this behavior, and this bug report should be reclassified as feature request.

          Gavriil Konovalenko added a comment - In the code, I see that ExtensionRefreshException thrown in Jenkins.refreshExtensions() is handled to raise IOException2 and fail plugin installation process. So it seems that such behavior is by design? If so, then I'd suggest to change this behavior, and this bug report should be reclassified as feature request.

          evernat added a comment - - edited

          @Gavriil
          And so this plugin currently says that its extension is not refreshable and you hope that it can be installed without restarting?
          I would say that something like this, saying that it can not be refreshed and so that it can not be installed without restarting is expected.
          In fact, if this plugin and the update-center can not do that, they should certainly say it.

          What do you expect instead?

          evernat added a comment - - edited @Gavriil And so this plugin currently says that its extension is not refreshable and you hope that it can be installed without restarting? I would say that something like this, saying that it can not be refreshed and so that it can not be installed without restarting is expected. In fact, if this plugin and the update-center can not do that, they should certainly say it. What do you expect instead?

          Hi evernat,

          A year has passed, but as I remember the issue – is that I'd try to install other plugin not this. And installation process failed due to non-refreshable extension was activated.

          So I expect that installation of one plugin shouldn't be affected with other extension.

          Gavriil Konovalenko added a comment - Hi evernat, A year has passed, but as I remember the issue – is that I'd try to install other plugin not this. And installation process failed due to non-refreshable extension was activated. So I expect that installation of one plugin shouldn't be affected with other extension.

          evernat added a comment -

          I understand your point of view now. It makes sense.

          But I think that the best solution is that this Persona plugin just upgrades its parent Jenkins dependency.
          And so that a "refresh()" method is added in hudson.plugins.persona.xml.XmlPersonaFinder
          It would make it compatible with installing a plugin without restarting.

          Anyway, this issue is probably valid and needs to be fixed one way or the other.
          (But I am not the author of the persona plugin)

          evernat added a comment - I understand your point of view now. It makes sense. But I think that the best solution is that this Persona plugin just upgrades its parent Jenkins dependency. And so that a "refresh()" method is added in hudson.plugins.persona.xml.XmlPersonaFinder It would make it compatible with installing a plugin without restarting. Anyway, this issue is probably valid and needs to be fixed one way or the other. (But I am not the author of the persona plugin)
          evernat made changes -
          Component/s New: persona [ 15760 ]
          sogabe made changes -
          Assignee New: sogabe [ sogabe ]

          Code changed in jenkins
          User: ssogabe
          Path:
          pom.xml
          src/main/java/hudson/plugins/persona/random/RandomPersonaFinder.java
          src/main/java/hudson/plugins/persona/xml/XmlPersonaFinder.java
          http://jenkins-ci.org/commit/persona-plugin/19321630fe9c0cccbc5a670baac4b7b1415807e4
          Log:
          [FIXED JENKINS-12803] support installing plugin without restarting

          Compare: https://github.com/jenkinsci/persona-plugin/compare/601e38a4c03c...19321630fe9c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ssogabe Path: pom.xml src/main/java/hudson/plugins/persona/random/RandomPersonaFinder.java src/main/java/hudson/plugins/persona/xml/XmlPersonaFinder.java http://jenkins-ci.org/commit/persona-plugin/19321630fe9c0cccbc5a670baac4b7b1415807e4 Log: [FIXED JENKINS-12803] support installing plugin without restarting Compare: https://github.com/jenkinsci/persona-plugin/compare/601e38a4c03c...19321630fe9c
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Still an issue for me with persona-2.3..

          hudson.util.IOException2: Failed to dynamically deploy this plugin
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
          at java.lang.Thread.run(Thread.java:722)
          Caused by: hudson.util.IOException2: Failed to install jeff-plugin plugin
          at hudson.PluginManager.dynamicLoad(PluginManager.java:438)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
          ... 6 more
          Caused by: java.lang.NullPointerException
          at java.util.ArrayList.batchRemove(ArrayList.java:669)
          at java.util.ArrayList.removeAll(ArrayList.java:640)
          at hudson.plugins.persona.xml.XmlPersonaFinder.refresh(XmlPersonaFinder.java:87)
          at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2138)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:431)
          ... 7 more

          Johno Crawford added a comment - Still an issue for me with persona-2.3.. hudson.util.IOException2: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104) at java.lang.Thread.run(Thread.java:722) Caused by: hudson.util.IOException2: Failed to install jeff-plugin plugin at hudson.PluginManager.dynamicLoad(PluginManager.java:438) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313) ... 6 more Caused by: java.lang.NullPointerException at java.util.ArrayList.batchRemove(ArrayList.java:669) at java.util.ArrayList.removeAll(ArrayList.java:640) at hudson.plugins.persona.xml.XmlPersonaFinder.refresh(XmlPersonaFinder.java:87) at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2138) at hudson.PluginManager.dynamicLoad(PluginManager.java:431) ... 7 more

            Unassigned Unassigned
            gkonovalenko Gavriil Konovalenko
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: