-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Module proxmox_kvm
restarted
state bug fix
#6773
Conversation
Previously, the `restarted` state used both stop and start vm functions to restart a vm. This change introduces the a new function that utilizes the proxmox reboot endpoint instead for a more reliable method of restarting a vm.
proxmox_kvm
restarted
state bug fix
changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml
Outdated
Show resolved
Hide resolved
changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml
Outdated
Show resolved
Hide resolved
…yaml Co-authored-by: Felix Fontein <felix@fontein.de>
Backport to stable-6: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 3571df8 on top of patchback/backports/stable-6/3571df837d7c7f2c0aa5d6b02618635b0e4454cb/pr-6773 Backporting merged PR #6773 into main
🤖 @patchback |
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #6797 🤖 @patchback |
* Change proxmox_kvm restart to use new method Previously, the `restarted` state used both stop and start vm functions to restart a vm. This change introduces the a new function that utilizes the proxmox reboot endpoint instead for a more reliable method of restarting a vm. * Create 6773-proxmox_kvm-restarted-state-bug-fix.yaml * Fix typo * Add link to PR * Chanel log fragment formatting changes * Move try/catch to `restart_vm` function * Update changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 3571df8)
@juan210012 thanks for your contribution! |
…d` state bug fix (#6797) Module `proxmox_kvm` `restarted` state bug fix (#6773) * Change proxmox_kvm restart to use new method Previously, the `restarted` state used both stop and start vm functions to restart a vm. This change introduces the a new function that utilizes the proxmox reboot endpoint instead for a more reliable method of restarting a vm. * Create 6773-proxmox_kvm-restarted-state-bug-fix.yaml * Fix typo * Add link to PR * Chanel log fragment formatting changes * Move try/catch to `restart_vm` function * Update changelogs/fragments/6773-proxmox_kvm-restarted-state-bug-fix.yaml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 3571df8) Co-authored-by: Juan Estupinan <65736594+juan210012@users.noreply.github.com>
SUMMARY
Previously, the
restarted
state used both stop and start vm functions to restart a vm. In some cases, the start_vm function starts before the vm on Proxmox finishes shutting down. This causes the start_vm function to return saying that the vm is already running. The vm ends up in thestopped
state and the output will wrongly display that the restart was successful.This change introduces the a new function that utilizes the Proxmox reboot endpoint instead for a more reliable method of restarting a vm.
ISSUE TYPE
COMPONENT NAME
proxmox_kvm
ADDITIONAL INFORMATION
To reproduce this bug, have a running vm on Proxmox with these parameters set for High Availability:

Then run an Ansible playbook with the state set to
restarted
.There may be other vm configurations in which the restart fails but this is the one I have found to fail often.
This change does not produce a different output.