mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #25] [MERGED] Fix an issue where next id already exists #163
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/25
Author: @lausser
Created: 5/4/2019
Status: ✅ Merged
Merged: 6/5/2019
Merged by: @ggongaware
Base:
master← Head:master📝 Commits (1)
489a263Fix an issue where next id already exists📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
proxmox/client.go(+2 -0)📄 Description
Hi,
i'm using your terraform-provider-proxmox and ran into a problem. When i wanted to create 6 qemu machines node1...node6, only two appeared in the Proxmox gui and terraform war running forever. The reason was:
The next free ID was 102
Only 102 and 103 were available, but proxmox-api-go requried that a whole range of 6 consecutive IDs were free.
I added a few debug logs to client.go and session.go and found out that in fact Proxmox returned a message {"errors":{"vmid":"VM 104 already exists"},"data":null}, which unfortunately got unhandled.
proxmox-api-go/proxmox/session.go Request->Do throws away the text so that it is not available in client.go::GetNextID. But at least the err object still contains the 400 http code. So i use this value to send another nextid request which then jumps beyond the 104 ID.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.