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

Fix VirtualMachine.IsPaused #169

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

rybnico
Copy link
Contributor

@rybnico rybnico commented Oct 5, 2024

Found a small bug in the VirtualMachine.IsPaused function:

The condition in the IsPaused function checks whether the VM is running, not whether it's in a pause state.

The condition in the IsPaused function checks whether the VM is running, not whether it's in a pause state.
@luthermonson luthermonson merged commit 4265950 into luthermonson:main Oct 6, 2024
1 check passed
mcbenjemaa added a commit to ionos-cloud/cluster-api-provider-proxmox that referenced this pull request Dec 5, 2024
* Return VMIDFreeErr or the error object itself if CheckID returns true/an error

* Rename VMIDFreeErr to ErrVMIDFree and fix comment to make linter happy

* feat: Add ability to specify range of VM IDs to use

* Fix codespell error: fix spelling

* When checking if a vmid is free, first check the existing ProxmoxMachines before querying the Proxmox API.

* Check that the vmid of the Proxmox machine is set (not -1) before adding it to usedVMIDs

* Move spec.vmidRange from ProxmoxCluster to ProxmoxMachine

* Update github.com/luthermonson/go-proxmox to v0.2.0

* Revert "Update github.com/luthermonson/go-proxmox to v0.2.0"

This reverts commit c5d15e5.

Because of this bug luthermonson/go-proxmox#169

* Update github.com/luthermonson/go-proxmox to v0.2.1

* Add test for ClusterScope.ListProxmoxMachinesForCluster

* Fix wording in ProxmoxMachine types test

* Rename vmidRange to vmIDRange to follow k8s API conventions

* Add validation for vmIDRange: end should be greater than or equal to start

* Set failureMessage and failureReason when ErrNoVMIDInRangeFree is thrown

* Refactor getVMID to improve code quality

---------

Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants