Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Bug: small shutdown_timeout and force_shutdown do not work as expecter #288

Open
justinc1 opened this issue Dec 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@justinc1
Copy link
Collaborator

justinc1 commented Dec 20, 2023

Describe the bug

VM was booted with Porteus ISO image (ACPI shutdown does work). I tried to update VM with something like:

#  vm_shutdown_timeout in tests/integration/targets/vm/tasks/01_main.yml
    - name: Update the VM
      environment:
        SC_DEBUG_LOG_TRAFFIC: 1
      scale_computing.hypercore.vm: &update-vm
        vm_name: vm-integration-test-vm
        force_reboot: true
        shutdown_timeout: "{{ vm_shutdown_timeout }}"

This works with vm_shutdown_timeout=300. VM needs (I think) about 20 sec to shutdown.

With vm_shutdown_timeout=3 it does not. VM gets SHUTDOWN power action (no tasktag is returned, so module pools for VM state change), VM starts to shutdown, after about 10 sec it gets STOP power action. The STOP tasktag is in running state for a long time, even after VM is already stopped, then it goes into state=ERROR. vm module keeps waiting on STOP tasktag.

It is hard to know in advance what shutdown_timeout is needed - it depends on VM OS and applications.

Maybe module should just ignore the failed STOP power action, since SHUTDOWN power action did work - it just took longer than expected.

Maybe HyperCore API should be update to tolerate this specific corner case. @TomboScaleComputing .

To Reproduce
Steps to reproduce the behavior:

# modify vm_shutdown_timeout in tests/integration/targets/vm/tasks/01_main.yml
ansible-test integration vm -v

Expected behavior

VM should shutdown. All is OK if both nice ACPI and force shutdown are tried, and one of them manages to stop the VM.

Screenshots

If applicable, add screenshots to help explain your problem.

System Info (please complete the following information):

Additional context

Add any other context about the problem here.

@justinc1 justinc1 added the bug Something isn't working label Dec 20, 2023
justinc1 added a commit that referenced this issue Dec 20, 2023
@justinc1 justinc1 self-assigned this Dec 22, 2023
justinc1 added a commit that referenced this issue Feb 23, 2024
justinc1 added a commit that referenced this issue Feb 24, 2024
justinc1 added a commit that referenced this issue Feb 24, 2024
justinc1 added a commit that referenced this issue Feb 24, 2024
justinc1 added a commit that referenced this issue Feb 26, 2024
justinc1 added a commit that referenced this issue Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant