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

proxmox_kvm: Add required timeout arg when force deleting #6827

Merged

Conversation

drewburr
Copy link
Contributor

@drewburr drewburr commented Jul 2, 2023

SUMMARY

When attempting to force delete a VM, the module fails with the following error:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "deletion of VM 102 failed with exception: ProxmoxKvmAnsible.stop_vm() missing 1 required positional argument: 'timeout'"}

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

proxmox_kvm

ADDITIONAL INFORMATION

This is caused by proxmox_kvm not passing the module's timeout argument to the stop_vm() method. This PR adds the passing of said timeout value.

Example task:

- name: Force delete VM
  community.general.proxmox_kvm:
    name: "{{ vm_name }}"
    state: absent
    force: true
    timeout: 60

@drewburr drewburr changed the title Add required timeout arg when force deleting proxmox_kvm: Add required timeout arg when force deleting Jul 2, 2023
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Jul 2, 2023
@ansibullbot ansibullbot removed the small_patch Hopefully easy to review label Jul 2, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 backport-7 Automatically create a backport for the stable-7 branch labels Jul 2, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

Co-authored-by: Felix Fontein <felix@fontein.de>
@felixfontein
Copy link
Collaborator

If nobody objects I'll merge this in ~a week.

@UnderGreen
Copy link
Contributor

Yeah, my bad. I introduced one more param to the function and looks like didn't update that function call in all places.
@drewburr thanks for fixing that!

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jul 6, 2023
@felixfontein felixfontein merged commit 216962a into ansible-collections:main Jul 6, 2023
151 checks passed
@patchback
Copy link

patchback bot commented Jul 6, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/216962a98cb1420f1b0ea16a27c68dfecb5f9db8/pr-6827

Backported as #6865

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 6, 2023
* Add required timeout arg when force deleting

* Add changelog fragment

* Update changelogs/fragments/6827-proxmox_kvm-force-delete-bug-fix.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 216962a)
@patchback
Copy link

patchback bot commented Jul 6, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/216962a98cb1420f1b0ea16a27c68dfecb5f9db8/pr-6827

Backported as #6866

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 6, 2023
* Add required timeout arg when force deleting

* Add changelog fragment

* Update changelogs/fragments/6827-proxmox_kvm-force-delete-bug-fix.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 216962a)
@felixfontein
Copy link
Collaborator

@drewburr thanks for your contribution!
@UnderGreen thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Jul 6, 2023
…out arg when force deleting (#6865)

proxmox_kvm: Add required timeout arg when force deleting (#6827)

* Add required timeout arg when force deleting

* Add changelog fragment

* Update changelogs/fragments/6827-proxmox_kvm-force-delete-bug-fix.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 216962a)

Co-authored-by: Drew Brown <drew@drewburr.com>
felixfontein pushed a commit that referenced this pull request Jul 6, 2023
…out arg when force deleting (#6866)

proxmox_kvm: Add required timeout arg when force deleting (#6827)

* Add required timeout arg when force deleting

* Add changelog fragment

* Update changelogs/fragments/6827-proxmox_kvm-force-delete-bug-fix.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 216962a)

Co-authored-by: Drew Brown <drew@drewburr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7 Automatically create a backport for the stable-7 branch bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants