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

Additional options on slave disconnection

    Details

    • Similar Issues:

      Description

      Since vSphere virtual machines can be reverted and hard powered down without gracefully shutting down the guest operating system, can these be exposed as options for "What to do when the slave is disconnected"? We have some virtual machines that take some time to gracefully shutdown and would like the ability to hard shutdown a machine.

      Our scenario is that a vSphere virtual machine runs a number of jobs sequentially (from a matrix configuration) but the machine must be reverted between each job run. Our slaves are configured to disconnect after a single build and to revert to a snapshot before starting the machine. After the first configuration from the matrix runs, the slave disconnect starts but since the graceful shutdown takes too long, the second configuration starts running on the slave before the disconnect completes.

      We're hoping that doing a hard power down instead of graceful shutdown will prevent the second configuration from running before the disconnect completes.

        Attachments

          Activity

          Hide
          jswager1 Jason Swager added a comment -

          Please try the latest v1.1.19 and try the Revert and Reset/Revert and Restart options.

          Show
          jswager1 Jason Swager added a comment - Please try the latest v1.1.19 and try the Revert and Reset/Revert and Restart options.
          Hide
          jswager1 Jason Swager added a comment -

          v1.1.19 and v1.1.20 both have the Revert and Reset/Restart, which should meet this feature request. This issue will be closed on June 1st if no further information is added.

          Show
          jswager1 Jason Swager added a comment - v1.1.19 and v1.1.20 both have the Revert and Reset/Restart, which should meet this feature request. This issue will be closed on June 1st if no further information is added.
          Hide
          stevenv Steven Visagie added a comment -

          Sorry for the delayed response. I had a look and see that both new options "Revert and Restart" and "Revert and Reset" build on the "Revert" option which in turn builds on the "Shutdown" option which does a graceful shutdown i.e. shut down the virtual machine through the guest operating system. In VMWare vSphere client, a virtual machine doesn't have to be gracefully shutdown: it can be "hard powered down" which is like hitting the power switch on a physical machine. I haven't yet tested the new options but since the virtual machines takes some time to shutdown, we've found that a graceful shutdown doesn't work in our use case. Currently we're using the "Suspend" option which immediately suspends the machine, breaking the connection between the slave and the host. Since this option works, I suspect that providing a way to "hard power down" instead of "shutdown" will resolve the issue. This could take the form of options:

          • Power Down (turn it off)
          • Power Down and Revert (turn it off and then revert to the snapshot)
          • Power Down and Restart (turn it off and then restart in the current state)
          • Power Down, Revert and Restart (turn it off, revert to the snapshot and power up)
          Show
          stevenv Steven Visagie added a comment - Sorry for the delayed response. I had a look and see that both new options "Revert and Restart" and "Revert and Reset" build on the "Revert" option which in turn builds on the "Shutdown" option which does a graceful shutdown i.e. shut down the virtual machine through the guest operating system. In VMWare vSphere client, a virtual machine doesn't have to be gracefully shutdown: it can be "hard powered down" which is like hitting the power switch on a physical machine. I haven't yet tested the new options but since the virtual machines takes some time to shutdown, we've found that a graceful shutdown doesn't work in our use case. Currently we're using the "Suspend" option which immediately suspends the machine, breaking the connection between the slave and the host. Since this option works, I suspect that providing a way to "hard power down" instead of "shutdown" will resolve the issue. This could take the form of options: Power Down (turn it off) Power Down and Revert (turn it off and then revert to the snapshot) Power Down and Restart (turn it off and then restart in the current state) Power Down, Revert and Restart (turn it off, revert to the snapshot and power up)
          Hide
          jswager1 Jason Swager added a comment -

          Maybe you just need a "Hard Power Down"? If the slave is configured with a snapshot, that snapshot will be reverted to on slave startup as part of a normal startup.

          Show
          jswager1 Jason Swager added a comment - Maybe you just need a "Hard Power Down"? If the slave is configured with a snapshot, that snapshot will be reverted to on slave startup as part of a normal startup.
          Hide
          stevenv Steven Visagie added a comment -

          Yes, that would work and eliminate machines in a suspended state. We do use snapshots so the machine would be reverted when the next job runs on the same node, which is the way we run the job anyway.

          Show
          stevenv Steven Visagie added a comment - Yes, that would work and eliminate machines in a suspended state. We do use snapshots so the machine would be reverted when the next job runs on the same node, which is the way we run the job anyway.

            People

            • Assignee:
              Unassigned
              Reporter:
              stevenv Steven Visagie
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: