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: Create QEMU VMs directly in a configured Pool #367

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

mpywell
Copy link
Contributor

@mpywell mpywell commented Oct 17, 2024

  • Reintroduced Pool for maptoAPI (required for creating a VM within a Pool)
  • Removed step to add to Pool after creating of a VM (errors 500 already a member of pool when Pool added to maptoAPI)
  • Added tests for maptoAPI for Pool

Closes #366

- Reintroduced Pool for maptoAPI (required for creating a VM within a Pool)
- Removed step to add to Pool after creating of a VM (errors `500 already a member of pool` when Pool added to maptoAPI)
- Added tests for maptoAPI for Pool
@Tinyblargon
Copy link
Collaborator

@mpywell didn't know setting the pool during create would create it in the pool, expected it to be something with the url. That probably how this bug slipped in to begin with.

The createUpdate in the test is for when the create and update tests would be the same, a create and an update test is created from createUpdate

Not sure if the pool property may be set in the api when updating the vm.
Probably better to only add it during creation and omit it during update.

- Testing showed pool wasn't a supported option when Updating a QEMU VM (/config endpoint). Move pool setting out of maptoAPI, set only when creating a VM before calling CreateQemuVm
- Tested CloneVm and Update methods and confirmed they now handle Pools correctly
@mpywell
Copy link
Contributor Author

mpywell commented Oct 21, 2024

@Tinyblargon apologies after testing Update I found the /config endpoint doesn't support the Pool attribute, so I've moved it back out of maptoAPI. It's now set when creating a VM just before calling client.CreateQemuVm, which achieves the same result without breaking updates to VMs

@Tinyblargon Tinyblargon merged commit 0f47ff7 into Telmate:master Oct 22, 2024
5 checks passed
@mpywell mpywell deleted the exp/289 branch October 22, 2024 20:07
@Tinyblargon Tinyblargon added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue creating QEMU VMs with Pool scoped users or API tokens
2 participants