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

Using libvirt slave 'Before Job Snapshot' causes NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • libvirt-slave-plugin
    • None
    • Jenkins ver. 1.565.2
      libvirt-slave 1.8.4

      I tried configuring a node to reset to a snapshot before any job starts, but it seems the job does not wait for this to finish.

      You can see from the build log that it triggers a snapshot revert, and then immediately proceeds to the scm checkout step of the job:

      Started by user Mikal H Henriksen
      Got snapshot phoenix from slave/node configuration
      Preparing to revert phoenix to snapshot phoenix.
      Building remotely on node-host (amd64) in workspace /var/jenkins/workspace/one-phoenix-3.1
      java.io.IOException: remote file operation failed: /var/jenkins/workspace/one-phoenix-3.1 at hudson.remoting.Channel@56eac72e:bgo-vmeo-smokeandmirrors-libvirt
      	at hudson.FilePath.act(FilePath.java:916)
      	at hudson.FilePath.act(FilePath.java:893)
      	at hudson.FilePath.mkdirs(FilePath.java:1063)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1245)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524)
      	at hudson.model.Run.execute(Run.java:1706)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:232)
      Caused by: hudson.remoting.ChannelClosedException: channel is already closed
      	at hudson.remoting.Channel.send(Channel.java:541)
      	at hudson.remoting.Request.call(Request.java:129)
      	at hudson.remoting.Channel.call(Channel.java:739)
      	at hudson.FilePath.act(FilePath.java:909)
      	... 10 more
      Caused by: java.io.IOException
      	at hudson.remoting.Channel.close(Channel.java:1027)
      	at hudson.remoting.Channel.close(Channel.java:1009)
      	at hudson.plugins.libvirt.LibvirtSnapshotRevertRunListener.revertVMSnapshot(LibvirtSnapshotRevertRunListener.java:84)
      	at hudson.plugins.libvirt.LibvirtSnapshotRevertRunListener.onStarted(LibvirtSnapshotRevertRunListener.java:58)
      	at hudson.model.listeners.RunListener.fireStarted(RunListener.java:213)
      	at hudson.model.Run.execute(Run.java:1702)
      	... 3 more
      

      After that follows more steps like archiving failing in the same way.

            bgermann Bastian Germann
            stylpe Mikal Henriksen
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: