mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[GH-ISSUE #11] cloudinit can't config ifconfig #2
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#2
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?
Originally created by @huangmingyou on GitHub (Oct 16, 2018).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/11
get error like this.
{"data":{"upid":"UPID:r7208:003377E3:0C58F6D4:5BC59E4D:qmclone:9999:hmy@pam:","pid":3373027,"user":"hmy@pam","id":"9999","status":"stopped","starttime":1539677773,"exitstatus":"OK","pstart":207156948,"node":"r7208","type":"qmclone"}})
2018/10/16 16:16:34 >>>>>>>>>> REQUEST:
%!(EXTRA string=POST /api2/json/nodes/r7201/qemu/10000/config HTTP/1.1
Host: wxpve1.vphotos.cn:8006
User-Agent: Go-http-client/1.1
Content-Length: 85
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Cookie: PVEAuthCookie=PVE:hmy@pam:5BC59E4D::ZeFGuZeV9nNeulIzdWBXu/tJPdEsv/cFm2IKH7+JAqzUHraqgzxgvNM94zo3OgvWkOg1JEQZvIynSBdM6KCsCtXaeIh/lro4wDs5U6D2zBqB4lcP8Y22297bKbrd1GX4mwWdB2Tw/aafKxTwYNU0jejc8lvQ9yhhGMlNR8uf/yjc6AKfrXM566EpFigZ6PYOO6aMc10U+Il+jqPTyKsO8LCr6JQpz4hpbEHUDeGSPGYbbaINplBxwJ6j69/QmRhnemMG5XOdlHmAmRL0lSorSlm/Y5JETwSTlC78oB/tsVLIouWF6wm3YsRc2vWSfWCeH53bo0TGg2Dpeat1r51opA==
Csrfpreventiontoken: 5BC59E4D:X4cwA1Q/KgXsFfebliU/6+AmcUc
Accept-Encoding: gzip
cores=2&description=Test+proxmox-api-go+clone&memory=2048&net0=%2Cbridge%3D&sockets=1)
2018/10/16 16:16:34 <<<<<<<<<< RESULT:
%!(EXTRA string=HTTP/1.1 400 Parameter verification failed.
Connection: close
Content-Length: 97
Cache-Control: max-age=0
Content-Type: application/json;charset=UTF-8
Date: Tue, 16 Oct 2018 08:16:34 GMT
Expires: Tue, 16 Oct 2018 08:16:34 GMT
Pragma: no-cache
Server: pve-api-daemon/3.0
{"errors":{"net0":"invalid format - missing key in comma-separated list property\n"},"data":null})
2018/10/16 16:16:34 Complete
2018/10/16 16:16:34
@ghost commented on GitHub (Jul 16, 2019):
Today, I encountered the same situation. The error occured after subsequent
terraform applyruns. The first iteration ofapplyruns just fine.I fixed it by supplying a MAC address manually, see also https://github.com/Telmate/terraform-provider-proxmox/issues/47#issuecomment-494627802.
Let me try to explain the situation if no MAC is defined (correct me if I'm wrong). After the first
apply, a random MAC will be generated byproxmox-api-go. All subsequentapplyattempts leave theterraform.tfstatein an inconsistent state. The local state will have two network interfaces defined, whereas the remote/API state registered just one interface. If yourplanorapplypreview shows similar to the following output, supplying the MAC manually can fix this problem:You can see here, that after all subsequent
applys, Terraform will split the interface into two parts which will result in an error inproxmox-api-go, becausemacaddrisnullin one interface. After you hitapplya second time, you can examine the corrupt state interraform.tfstateas well:@davidchua commented on GitHub (Aug 11, 2019):
@in0rdr I am having the same issue as OP, I've supplied a manual macaddr:
ie.
When I plan, I still see 2 macaddr generated:
Not sure how to get past this.
@ghost commented on GitHub (Aug 13, 2019):
@davidchua What is the version of the code you are using? I fail to reproduce this behavior with the following versions:
6c97b76The output of plan stays identical for the network section in my setup.
However, I start with
id=0, notid=1.