Closed Nbushkov closed 8 years ago
Hummm... I'll try to have a look. I'm currently working on merging the OVH APIs wrappers for golang to release an official one. I should be able to get back to Docker machine driver after that.
Can you login on api.ovh.com/console and run https://api.ovh.com/console/#/cloud/project#GET ? You can replace the string content with fake data. It should be an array of strings https://github.com/yadutaf/docker-machine-driver-ovh/blob/master/api.go#L25
Given your arguments, the call is triggered here https://github.com/yadutaf/docker-machine-driver-ovh/blob/master/driver.go#L148.
I suspect that if you don't yet have a Cloud project, the API may return null
. Unfortunately, I don't have access to an account without Cloud project...
I have Cloud Project https://api.ovh.com/console/#/cloud/project#GET
[
"e587251d258a4352be05e9c************",
"4fda800b23824e39a7c8b11************"
]
I insert log.Debug https://github.com/Nbushkov/docker-machine-driver-ovh/blob/master/api.go#L117 result:
...
(node-1) DBG | Validating project
(node-1) DBG | my validating project - &{400 400 Bad Request [123 34 101 114 114 111 114 67 111 100 101 34 58 34 77 73 83 83 73 78 71 95 72 69 65 68 69 82 34 44 34 104 116 116 112 67 111 100 101 34 58 34 52 48 48 32 66 97 100 32 82 101 113 117 101 115 116 34 44 34 109 101 115 115 97 103 101 34 58 34 77 105 115 115 105 110 103 32 88 45 79 118 104 45 67 111 110 115 117 109 101 114 32 104 101 97 100 101 114 34 125]}
Error with pre-create check: "json: cannot unmarshal object into Go value of type main.Projects"
open : no such file or directory
notifying bugsnag: [Error with pre-create check: "json: cannot unmarshal object into Go value of type main.Projects"]
in https://github.com/Nbushkov/docker-machine-driver-ovh/blob/master/api.go#L117 log.Debug("my validating project - ", string(res.Body[:]))
(node-1) DBG | my validating project - {"errorCode":"MISSING_HEADER","httpCode":"400 Bad Request","message":"Missing X-Ovh-Consumer header"}
I have the exact same issue.
Check https://github.com/yadutaf/docker-machine-driver-ovh#1-get-your-ovh-credentials configurations Create /etc/ovh.conf and all worked!
yeah, I came to the same conclusion just 40 minutes after you xD
Thanks for the feedback. I'll keep the issue opened until the bug is fixed in the underlying lib.
This is fixed in https://www.github.com/ovh/go-ovh which we just released. Time to give some love to docker-machine.
Error with pre-create check: "json: cannot unmarshal object into Go value of type main.Projects"