Hello, I have been testing rancher with openstack and I could successfully launch rancher host on openstack through rancher UI. However, I’m unable to launch a rancher host when tried it through the rancher API.
Below is the request I tried:
HTTP Request:
HTTP/1.1 POST /v1/projects/1a5/openstackconfigs
Host: x.x.x.x
Accept: application/json
Content-Type: application/json
Content-Length: 319
{
“authUrl”: “http://x.x.x.x:5000/v2.0”,
“flavorName”: “custom.1.1.10”,
“imageName”: “ubuntu”,
“keypairName”: “adaikal_ssh_2”,
“netName”: “public”,
“password”: “*****”,
“privateKeyFile”: “/.ssh/adaikal_ssh_2”,
“region”: “RegionOne”,
“secGroups”: “default”,
“sshPort”: “22”,
“sshUser”: “ubuntu”,
“tenantName”: “demo”,
“username”: “demo”,
}
Posting the above JSON is giving the below error:
HTTP Response:
HTTP/1.1 500
Date: Mon, 28 Mar 2016 10:45:17 GMT
X-Api-Client-Ip: x.x.x.x
Server: Jetty(9.2.11.v20150529)
X-Api-Account-Id: 1a5
Content-Type: application/json; charset=utf-8
X-Api-Schemas: http://x.x.x.x/v1/projects/1a5/schemas
Content-Length: 176
Expires: Thu, 01 Jan 1970 00:00:00 GMT
{
“id”: “7effbd5e-0943-4292-b6f4-b21c11a1be79”,
“type”: “error”,
“links”: { },
“actions”: { },
“status”: 500,
“code”: “Internal Server Error”,
“message”: “Internal Server Error”,
“detail”: null,
}
And below is the error log I got from rancher server:
2016-03-28 10:24:02,545 ERROR [:] [] [] [] [p423436977-1224] [i.g.i.g.r.handler.ExceptionHandler ] Exception in API for request [io.github.ibuildthecloud.gdapi.request.ApiRequest@79d65d63] java.lang.IllegalArgumentException: Class [class io.cattle.platform.docker.machine.api.addon.BaseMachineConfig] is not an instanceof UpdatableRecord
Could you please advise how to fix this?!
And I also have been wondering, while I configured the openstack-rancher host in rancher UI, it asked me a host name for the host but there is no key as “name” in the API, why so?