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

Stop slave options should list all possible options, not just "save" and "poweroff"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • virtualbox-plugin
    • None

      In the latest release there were added the possibility to also poweroff a VM instead of just suspend (savestate) it.

      Poweroff is fine, if you've made the root disk reverting back to orig state on poweroff (or sometimes have to recover your machine from a snapshot if the filesystems were corrupted by the hard poweroff).

      But it would be better to be able to shutdown VMs in a clean way -> send ACPI Poweroff event to the VM, so the kernel can shut down (acpid does this on Linux, on Windows it depends on your energy settings what the poweroff button does).

      There should be at least all options to stop the slave that the API offers: https://www.virtualbox.org/sdkref/interface_i_console.html

      Or vboxmanage:

      VBoxManage controlvm        <uuid>|<name>
                                  pause|resume|reset|poweroff|savestate|
                                  acpipowerbutton|acpisleepbutton
      

          [JENKINS-16231] Stop slave options should list all possible options, not just "save" and "poweroff"

          Henri Gomez added a comment - - edited

          Do you want option to use powerButton also ?

          Problem powerButton didn't send back IProgress so no way to know what happen ;(

          https://www.virtualbox.org/sdkref/interface_i_console.html#a8a07a416cc969ece198f63152508c24a

          Henri Gomez added a comment - - edited Do you want option to use powerButton also ? Problem powerButton didn't send back IProgress so no way to know what happen ;( https://www.virtualbox.org/sdkref/interface_i_console.html#a8a07a416cc969ece198f63152508c24a

          Uwe Schindler added a comment -

          I think its also unknown to virtualbox what powerbutton does: The machine can do anything when powerbutton is pressed, it could also ignore it. The only way to check is maybe poll on the state.

          Uwe Schindler added a comment - I think its also unknown to virtualbox what powerbutton does: The machine can do anything when powerbutton is pressed, it could also ignore it. The only way to check is maybe poll on the state.

          Henri Gomez added a comment -

          Yes and with polling we may end to endless loop.
          And protect loop with max time and then defined max time for looping.
          And may be retry or fallback to poweroff.

          This will complexify current code

          Henri Gomez added a comment - Yes and with polling we may end to endless loop. And protect loop with max time and then defined max time for looping. And may be retry or fallback to poweroff. This will complexify current code

          p r added a comment - - edited

          But with the option to actually have an acpipowerbutton option the end user can set what action is taken when that acpi button is pressed. End users have to setup what action is taken when that signal is received it does not just automatically send the OS the proper shutdown command for a clean and safe shutdown in every OS.

          Using the poweroff is essentially the same as pulling the power cord from a box. That is not a good choice at all.

          Also once you send the acpipoweroff you could easily poll to make sure it is not running anymore through checking what is left running or just checking the state of said machine that just got the acpi button press signal.

          Just my opinion and the biggest downfall I see to this plugin. Not everyone wants or needs to save state and really no one should use the poweroff command unless you want to corrupt your file system VERY quickly.

          p r added a comment - - edited But with the option to actually have an acpipowerbutton option the end user can set what action is taken when that acpi button is pressed. End users have to setup what action is taken when that signal is received it does not just automatically send the OS the proper shutdown command for a clean and safe shutdown in every OS. Using the poweroff is essentially the same as pulling the power cord from a box. That is not a good choice at all. Also once you send the acpipoweroff you could easily poll to make sure it is not running anymore through checking what is left running or just checking the state of said machine that just got the acpi button press signal. Just my opinion and the biggest downfall I see to this plugin. Not everyone wants or needs to save state and really no one should use the poweroff command unless you want to corrupt your file system VERY quickly.

          Henri Gomez added a comment -

          What about PR, so I could review it and apply.
          Side note, I'm not using VB Plugin anymore.

          Henri Gomez added a comment - What about PR, so I could review it and apply. Side note, I'm not using VB Plugin anymore.

            godin godin
            thetaphi Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: