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

If the libvirt plugin is installed you can't edit nodes

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If I have the libvirt-slave plugin installed and try to edit one of my nodes (dummy) it throws an exception when I hit save.

      Stack trace:
      java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"":["hudson.slaves.CommandLauncher","hudson.slaves.RetentionStrategy$Always"],"labelString":"64bot","launcher":

      {"command":"/var/lib/jenkins/bin/go_slave_nunit.sh 151.155.248.175","host":"","javaPath":"","jvmOptions":"","password":["",""],"port":"22","privatekey":"","stapler-class":["hudson.os.windows.ManagedWindowsServiceLauncher","hudson.slaves.CommandLauncher","hudson.slaves.JNLPLauncher","hudson.plugins.libvirt.VirtualMachineLauncher","hudson.plugins.sshslaves.SSHLauncher"],"tunnel":"","userName":"","username":"","vmargs":""}

      ,"mode":"NORMAL","name":"jenkins2","nodeDescription":"build1 - 64bit machine","nodeProperties":

      {"stapler-class-bag":"true"}

      ,"numExecutors":"5","remoteFS":"/var/lib/jenkins","retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"}}
      at hudson.model.Descriptor.newInstance(Descriptor.java:543)
      at hudson.model.Node.reconfigure(Node.java:392)
      at hudson.model.Computer.doConfigSubmit(Computer.java:1035)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:373)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:195)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:157)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:131)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:82)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:52)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:65)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.DumbSlave from {"":["hudson.slaves.CommandLauncher","hudson.slaves.RetentionStrategy$Always"],"labelString":"64bot","launcher":

      {"command":"/var/lib/jenkins/bin/go_slave_nunit.sh 151.155.248.175","host":"","javaPath":"","jvmOptions":"","password":["",""],"port":"22","privatekey":"","stapler-class":["hudson.os.windows.ManagedWindowsServiceLauncher","hudson.slaves.CommandLauncher","hudson.slaves.JNLPLauncher","hudson.plugins.libvirt.VirtualMachineLauncher","hudson.plugins.sshslaves.SSHLauncher"],"tunnel":"","userName":"","username":"","vmargs":""}

      ,"mode":"NORMAL","name":"jenkins2","nodeDescription":"build1 - 64bit machine","nodeProperties":

      {"stapler-class-bag":"true"}

      ,"numExecutors":"5","remoteFS":"/var/lib/jenkins","retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"}}
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:628)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:372)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:368)
      at hudson.model.Descriptor.newInstance(Descriptor.java:534)
      ... 54 more
      Caused by: java.lang.IllegalArgumentException: Failed to convert the launcher parameter of the constructor public hudson.slaves.DumbSlave(java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.model.Node$Mode,java.lang.String,hudson.slaves.ComputerLauncher,hudson.slaves.RetentionStrategy,java.util.List) throws java.io.IOException,hudson.model.Descriptor$FormException
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:622)
      ... 57 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.ComputerLauncher from

      {"command":"/var/lib/jenkins/bin/go_slave_nunit.sh 151.155.248.175","host":"","javaPath":"","jvmOptions":"","password":["",""],"port":"22","privatekey":"","stapler-class":["hudson.os.windows.ManagedWindowsServiceLauncher","hudson.slaves.CommandLauncher","hudson.slaves.JNLPLauncher","hudson.plugins.libvirt.VirtualMachineLauncher","hudson.plugins.sshslaves.SSHLauncher"],"tunnel":"","userName":"","username":"","vmargs":""}

      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:628)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:372)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:620)
      ... 57 more
      Caused by: java.lang.IllegalArgumentException: Class ["hudson.os.windows.ManagedWindowsServiceLauncher","hudson.slaves.CommandLauncher","hudson.slaves.JNLPLauncher","hudson.plugins.libvirt.VirtualMachineLauncher","hudson.plugins.sshslaves.SSHLauncher"] is specified in JSON, but no such class found in classLoader hudson.PluginManager$UberClassLoader
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:601)
      ... 59 more
      Caused by: java.lang.ClassNotFoundException: ["hudson.os.windows.ManagedWindowsServiceLauncher","hudson.slaves.CommandLauncher","hudson.slaves.JNLPLauncher","hudson.plugins.libvirt.VirtualMachineLauncher","hudson.plugins.sshslaves.SSHLauncher"]
      at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:642)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:596)
      ... 59 more

        Attachments

          Activity

          Hide
          orangina Ana-Maria M added a comment -

          Had the same problem... I managed to fix this... at least on my machines.
          What I found was that the DumbSlave page was affected because the VirtualMachineLauncher's Descriptor was added to the list of getComputerLauncherDescriptors() and somehow one of the functions in configure-entries.jelly was not supported for that Descriptor. It seems that the getConfigPage did the trick.

          <f:dropdownList name="slave.launcher" title="${%Launch method}"
          help="${descriptor.getHelpFile('launcher')}">
          <j:forEach var="d" items="${h.getComputerLauncherDescriptors()}">
          <f:dropdownListBlock value="${d.clazz.name}" name="${d.displayName}"
          selected="${it.launcher.descriptor==d}"
          title="${d.displayName}">
          <j:set var="descriptor" value="${d}"/>
          <j:set var="instance"
          value="${it.launcher.descriptor==d ? it.launcher : null}"/>
          <f:invisibleEntry>
          <input type="hidden" name="stapler-class" value="${d.clazz.name}" />
          </f:invisibleEntry>
          <st:include from="${d}" page="${d.configPage}" optional="true"/>
          </f:dropdownListBlock>
          </j:forEach>
          </f:dropdownList>

          I've attached the .hpi file give it a try

          Show
          orangina Ana-Maria M added a comment - Had the same problem... I managed to fix this... at least on my machines. What I found was that the DumbSlave page was affected because the VirtualMachineLauncher's Descriptor was added to the list of getComputerLauncherDescriptors() and somehow one of the functions in configure-entries.jelly was not supported for that Descriptor. It seems that the getConfigPage did the trick. <f:dropdownList name="slave.launcher" title="${%Launch method}" help="${descriptor.getHelpFile('launcher')}"> <j:forEach var="d" items="${h.getComputerLauncherDescriptors()}"> <f:dropdownListBlock value="${d.clazz.name}" name="${d.displayName}" selected="${it.launcher.descriptor==d}" title="${d.displayName}"> <j:set var="descriptor" value="${d}"/> <j:set var="instance" value="${it.launcher.descriptor==d ? it.launcher : null}"/> <f:invisibleEntry> <input type="hidden" name="stapler-class" value="${d.clazz.name}" /> </f:invisibleEntry> <st:include from="${d}" page="${d.configPage}" optional="true"/> </f:dropdownListBlock> </j:forEach> </f:dropdownList> I've attached the .hpi file give it a try
          Hide
          orangina Ana-Maria M added a comment -

          Sorry, I've attached twice .
          Oh, by the way, it fixes JENKINS-8240 and JENKINS-7179

          Sadly, although this bug is fixed we decided not to use this plugin because it does not support snapshot revert.

          Have a nice day

          Show
          orangina Ana-Maria M added a comment - Sorry, I've attached twice . Oh, by the way, it fixes JENKINS-8240 and JENKINS-7179 Sadly, although this bug is fixed we decided not to use this plugin because it does not support snapshot revert. Have a nice day
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: tastybug
          Path:
          src/main/java/hudson/plugins/libvirt/Hypervisor.java
          src/main/java/hudson/plugins/libvirt/PluginImpl.java
          src/main/java/hudson/plugins/libvirt/VirtualMachineLauncher.java
          src/main/java/hudson/plugins/libvirt/VirtualMachineSlave.java
          src/main/resources/hudson/plugins/libvirt/VirtualMachineSlave/configure-entries.jelly
          src/main/resources/index.jelly
          src/main/webapp/help-libvirt-computerName.html
          src/main/webapp/help-libvirt-hypervisorHost.html
          src/main/webapp/help-libvirt-hypervisorSshPort.html
          src/main/webapp/help-libvirt-hypervisorType.html
          src/main/webapp/help-libvirt-hypervisorUri.html
          http://jenkins-ci.org/commit/libvirt-slave-plugin/550e3286fa7df9514498562d4ba28ddf5784c1c1
          Log:
          -Fixed JENKINS-14468
          -Fixed JENKINS-9471 (and duplicates JENKINS-8240, JENKINS-7179)
          -Some comments improved

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: tastybug Path: src/main/java/hudson/plugins/libvirt/Hypervisor.java src/main/java/hudson/plugins/libvirt/PluginImpl.java src/main/java/hudson/plugins/libvirt/VirtualMachineLauncher.java src/main/java/hudson/plugins/libvirt/VirtualMachineSlave.java src/main/resources/hudson/plugins/libvirt/VirtualMachineSlave/configure-entries.jelly src/main/resources/index.jelly src/main/webapp/help-libvirt-computerName.html src/main/webapp/help-libvirt-hypervisorHost.html src/main/webapp/help-libvirt-hypervisorSshPort.html src/main/webapp/help-libvirt-hypervisorType.html src/main/webapp/help-libvirt-hypervisorUri.html http://jenkins-ci.org/commit/libvirt-slave-plugin/550e3286fa7df9514498562d4ba28ddf5784c1c1 Log: -Fixed JENKINS-14468 -Fixed JENKINS-9471 (and duplicates JENKINS-8240 , JENKINS-7179 ) -Some comments improved
          Hide
          tastybug Philipp Bartsch added a comment -

          Fixed in 1.7

          Show
          tastybug Philipp Bartsch added a comment - Fixed in 1.7
          Hide
          gkr G. Kr. added a comment -

          closing as fixed

          Show
          gkr G. Kr. added a comment - closing as fixed

            People

            • Assignee:
              tastybug Philipp Bartsch
              Reporter:
              decriptor decriptor
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: