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

Pipeline projects do not trigger libvirt VM snapshot reverts.

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: libvirt-slave-plugin
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      Configuring a snapshot revert within the project via the "Use Snapshots" checkbox or via the "Revert Snapshot" and "Before Snapshot" options on the node configuration does not appear to do anything on pipeline projects. They run exactly as though those settings were completely ignored.

        Attachments

          Activity

          Hide
          xaymar Michael Dirks added a comment -

          I officially give up. I can't seem to hook into enough points of the Pipeline to prevent it from re-using "dead" nodes, which means that builds will unexpectedly fail for no other reason than that the VM was reset to the original state. I'm sure there's a lot of hook points I've missed, but the documentation is a bit large and I got lost quite a few times in it trying to find how to even figure out what node of a pipeline is being executed on what VM node.

          The code I have right now restarts the VM if it was known to be used by the Pipeline build system during any pipeline projects, which is unfortunately not enough. I will likely revisit this once I have more knowledge, but for now it's up for grabs for anyone that wants to try their hand at it.

          Show
          xaymar Michael Dirks added a comment - I officially give up. I can't seem to hook into enough points of the Pipeline to prevent it from re-using "dead" nodes, which means that builds will unexpectedly fail for no other reason than that the VM was reset to the original state. I'm sure there's a lot of hook points I've missed, but the documentation is a bit large and I got lost quite a few times in it trying to find how to even figure out what node of a pipeline is being executed on what VM node. The code I have right now restarts the VM if it was known to be used by the Pipeline build system during any pipeline projects, which is unfortunately not enough. I will likely revisit this once I have more knowledge, but for now it's up for grabs for anyone that wants to try their hand at it.
          Hide
          xaymar Michael Dirks added a comment -

          David Taylor Unfortunately my patch breaks when you have the pipeline project running on more than one machine. I have actually managed to make it watch for what machines are being used, but unfortunately the pipeline projects are a bit difficult to manage.

          I am still working on it though. I really want to get rid of Travis and AppVeyor as my primary CIs and instead adopt Jenkins CI, simple because of the massive speed difference that I have observed when building (Jenkins CI is usually 2x to 3x faster on nearly identical build machines).

          Show
          xaymar Michael Dirks added a comment - David Taylor Unfortunately my patch breaks when you have the pipeline project running on more than one machine. I have actually managed to make it watch for what machines are being used, but unfortunately the pipeline projects are a bit difficult to manage. I am still working on it though. I really want to get rid of Travis and AppVeyor as my primary CIs and instead adopt Jenkins CI, simple because of the massive speed difference that I have observed when building (Jenkins CI is usually 2x to 3x faster on nearly identical build machines).
          Hide
          taylor01 David Taylor added a comment -

          Michael Dirks any update on the plugin fix? my team is waiting for the "Before Snapshot" and "After Build" options to work within the node config. Any updates?

          Show
          taylor01 David Taylor added a comment - Michael Dirks any update on the plugin fix? my team is waiting for the "Before Snapshot" and "After Build" options to work within the node config. Any updates?
          Hide
          xaymar Michael Dirks added a comment -

          Fix is working. Cleaning up, then submitting a PR.

          Show
          xaymar Michael Dirks added a comment - Fix is working. Cleaning up, then submitting a PR.
          Hide
          xaymar Michael Dirks added a comment -

          Work on a fix for this has begun. I have the plugin listening to the pipeline complete event now, though I don't think I can make the "Before Snapshot" option work with Pipeline projects.

          Show
          xaymar Michael Dirks added a comment - Work on a fix for this has begun. I have the plugin listening to the pipeline complete event now, though I don't think I can make the "Before Snapshot" option work with Pipeline projects.
          Hide
          xaymar Michael Dirks added a comment -

          Can unfortunately confirm this happening. I wanted to switch off of AppVeyor and Travis and have builds in-house (faster and less costly) and ended up running into a situation where the build bots had old versions of the repository and configuration left around, resulting in faster later builds, but eventually resulting in failures due to configuration changes and the same directories being used.

          Jenkins Version: 2.141
          libvirt Slaves plugin Version: 1.8.5
          Remote VM Manager: KVM/QEMU

          Show
          xaymar Michael Dirks added a comment - Can unfortunately confirm this happening. I wanted to switch off of AppVeyor and Travis and have builds in-house (faster and less costly) and ended up running into a situation where the build bots had old versions of the repository and configuration left around, resulting in faster later builds, but eventually resulting in failures due to configuration changes and the same directories being used. Jenkins Version: 2.141 libvirt Slaves plugin Version: 1.8.5 Remote VM Manager: KVM/QEMU

            People

            • Assignee:
              Unassigned
              Reporter:
              zetasyanthis Zeta Syanthis
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: