scaleway / docker-machine-driver-scaleway

:whale: Scaleway driver for Docker Machine
MIT License
249 stars 34 forks source link

Problem creating non-default scaleway-commercial-type server #56

Closed Gerrel closed 7 years ago

Gerrel commented 8 years ago

I have success creating a server with the following command:

docker-machine create -d scaleway --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-name=“Server” server

This results in the default VC1S - Ubuntu Server


But now I want to upgrade the server to C2S with the following command:

docker-machine create -d scaleway --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-commercial-type=“C2S” --scaleway-name=“Server” server

This results in error:

Running pre-create checks...
Creating machine...
(server) Creating SSH key...
(server) Creating server...
Error creating machine: Error in driver during machine creation: No such image: ubuntu-xenial

Explicitly setting the commercial-type with the following command:

docker-machine create -d scaleway --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-commercial-type=“C2S” --scaleway-name=“Server” server

Also results in error:

Running pre-create checks...
Creating machine...
(server) Creating SSH key...
(server) Creating server...
Error creating machine: Error in driver during machine creation: No such image: ubuntu-xenial

Explicitly setting the image also does not help:

docker-machine create -d scaleway --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-commercial-type=“C2S” --scaleway-image=“delian-jessie” --scaleway-name=“Server” server
Running pre-create checks...
Creating machine...
(server) Creating SSH key...
(server) Creating server...
Error creating machine: Error in driver during machine creation: No such image: “delian-jessie”

After a few tries I get:

Running pre-create checks...
Creating machine...
(server) Creating SSH key...
(server) Creating server...
Error creating machine: Error in driver during machine creation: Quota exceeded for this resource.

Seems that setting the --scaleway-commercial-type parameter is causing a problem with the image selection.

using docker-machine/0.8.1 and docker-machine-driver-scaleway-1.2.1

QuentinPerez commented 8 years ago

Hi @Gerrel

Can you retry this case with -D and --scaleway-debug

docker-machine -D create -d scaleway --scaleway-debug --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-commercial-type=“C2S” --scaleway-name=“Server” server

In this case you made a typo : delian-jessie -> debian-jessie

docker-machine create -d scaleway --scaleway-token=*-*-*-*-* --scaleway-organization=*-*-*-*-* --scaleway-commercial-type=“C2S” --scaleway-image=“delian-jessie” --scaleway-name=“Server” server

And the last case you reached the limit Quota exceeded for this resource (C2S)

Gerrel commented 8 years ago

(I will retry tomorrow)

Gerrel commented 8 years ago

little late...

:~ Gerrel$ docker-machine -D create -d scaleway --scaleway-debug --scaleway-token=----* --scaleway-organization=----* --scaleway-commercial-type=“C2S” --scaleway-name=“Server” server Docker Machine Version: 0.8.1, build 41b3b25 Found binary path at /usr/local/bin/docker-machine-driver-scaleway Launching plugin server for driver scaleway Plugin server listening at address 127.0.0.1:49357 () Calling .GetVersion Using API Version 1 () Calling .SetConfigRaw () Calling .GetMachineName (flag-lookup) Calling .GetMachineName (flag-lookup) Calling .DriverName (flag-lookup) Calling .GetCreateFlags Found binary path at /usr/local/bin/docker-machine-driver-scaleway Launching plugin server for driver scaleway Plugin server listening at address 127.0.0.1:49361 () Calling .GetVersion Using API Version 1 () Calling .SetConfigRaw () Calling .GetMachineName (server) Calling .GetMachineName (server) Calling .DriverName (server) Calling .GetCreateFlags (server) Calling .SetConfigFromFlags Running pre-create checks... (server) Calling .PreCreateCheck (server) Calling .GetConfigRaw Creating machine... (server) Calling .Create (server) Creating SSH key... (server) Creating server... (server) DBG | time="2016-09-05T21:15:17+02:00" level=debug msg="curl -X POST -d \"{\"organization\":\"11111111-1111-1111-1111-111111111111\"}\" -H \"Content-Type: application/json\" -H \"User-Agent: docker-machine-driver-scaleway/%vv1.2.1\" -H \"X-Auth-Token: 00000000-0000-1000-0000-000000000000\" https://api.scaleway.com/ips" (server) DBG | time="2016-09-05T21:15:18+02:00" level=debug msg="curl -X GET -H \"Content-Type: application/json\" -H \"User-Agent: docker-machine-driver-scaleway/%vv1.2.1\" -H \"X-Auth-Token: 00000000-0000-1000-0000-000000000000\" https://api-marketplace.scaleway.com/images/" (server) DBG | time="2016-09-05T21:15:19+02:00" level=debug msg="curl -X GET -H \"Content-Type: application/json\" -H \"User-Agent: docker-machine-driver-scaleway/%vv1.2.1\" -H \"X-Auth-Token: 00000000-0000-1000-0000-000000000000\" https://api.scaleway.com/images?organization=11111111-1111-1111-1111-111111111111" Error creating machine: Error in driver during machine creation: No such image: ubuntu-xenial Opting out of crash reporting. :~ Gerrel$

asthomasdk commented 8 years ago

I have found that it is more reliable to find the id for the image to use and set this - rather than the name of the image.

Gerrel commented 7 years ago

Solution: wrong quotes “C2S” is not the same as "C2S"