ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

:lady_beetle: ACPI shutdown migth be ignored #293

Open justinc1 opened 6 months ago

justinc1 commented 6 months ago

Describe the bug

Observed during #287 - VM is started and immediately after start an ACPI shutdown is sent. OS is not up yet, so ACPI shutdown seems to be lost.

The modules could resend the ACPI shutdown while waiting for VM to shutdown.

However, the tests\integration/vm_params__power_state test shows that sending ACPI shutdown a second time results in 500 error. Maybe we need to wait on previous taskTag to finish?

BTW, we were adding similar resend shutdown to update_single_node_system role.

To Reproduce Steps to reproduce the behavior: Observer the tests/integration/targets/vm/tasks/01_main.yml test, task:

    # SLOW 5 min
    # boot_devices and nics are different, disk is added.
    # VM needs to be rebooted.
    # A running OS will accept ACPI signal.
    # Otherwise, module waits a long time, then a force reboot happens.
    # TODO maybe vm_module sends ACPI shutdown while VM is not fully up, and it gets lost.
    # Resend ACPI shutdown. Would help Windows VMs too - we added something like this to shutdown role.
    - name: Update the VM

Update - #288 is related.

Expected behavior

VM should shutdown nicely.

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.