mxschmitt / ui-driver-hetzner

Rancher UI driver for the Hetzner Cloud docker driver.
https://mxschmitt.github.io/ui-driver-hetzner
Apache License 2.0
254 stars 50 forks source link

Changes via Rancher API call are not persistet #105

Open mschickervxob opened 3 years ago

mschickervxob commented 3 years ago

I want to change a node template via API, because I run into a issue creating node that the machine driver complains about "Error setting machine configuration from flags provided: --hetzner-image and --hetzner-image-id are mutually exclusive; Timeout waiting for ssh key"

{
"annotations": {
"ownerBindingsCreated": "true"
},
"baseType": "nodeTemplate",
"cloudCredentialId": null,
"created": "2020-11-04T08:56:05Z",
"createdTS": 1604480165000,
"creatorId": "user-8b49n",
"driver": "hetzner",
"engineInstallURL": "https://releases.rancher.com/install-docker/19.03.sh",
"engineRegistryMirror": null,
"hetznerConfig": {
"apiToken": "REDACTED",
"existingKeyId": "0",
"existingKeyPath": "",
"image": "ubuntu-18.04",
"imageId": "168855",
"networks": null,
"serverLocation": "nbg1",
"serverType": "cpx41",
"usePrivateNetwork": false,
"userData": "REDACTED"
},
"id": "cattle-global-nt:nt-pt7qm",
"labels": {
"cattle.io/creator": "norman"
},
"links": {
"nodePools": "…/v3/nodePools?nodeTemplateId=cattle-global-nt%3Ant-pt7qm",
"nodes": "…/v3/nodes?nodeTemplateId=cattle-global-nt%3Ant-pt7qm",
"remove": "…/v3/nodeTemplates/cattle-global-nt:nt-pt7qm",
"self": "…/v3/nodeTemplates/cattle-global-nt:nt-pt7qm",
"update": "…/v3/nodeTemplates/cattle-global-nt:nt-pt7qm"
},
"name": "CPX41",
"principalId": "local://user-8b49n",
"state": "active",
"transitioning": "no",
"transitioningMessage": "",
"type": "nodeTemplate",
"useInternalIpAddress": true,
"uuid": "b8dfabfc-dc14-4fb0-a436-02dc57e19299"
}

As the driver does not like to have both image and imageId set at the same time I tried to remove the image property in hetznerConfig object. The request looks good. But the answer contains the image set to "ubuntu-18.04" again.