scaleway / docker-machine-driver-scaleway

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

problems with default boot image Ubuntu Xenial #48

Closed RicardovanTongeren closed 6 years ago

RicardovanTongeren commented 8 years ago

I have a problem creating a docker instance.

$ docker-machine create -d scaleway --scaleway-name="scw-docker01" --scaleway-commercial-type "VC1S"  scw-docker01
Running pre-create checks...
Creating machine...
(scw-docker01) Creating SSH key...
(scw-docker01) Creating server...
(scw-docker01) Starting server...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded

The solution (for now) is to specify another (older) boot image

$ docker-machine create -d scaleway --scaleway-token=xxxxxxxx --scaleway-organization=xxxxxxxx --scaleway-name="scw-docker01" --scaleway-image="ubuntu-trusty" --scaleway-commercial-type="VC1S"  scw-docker01
Running pre-create checks...
Creating machine...
(scw-docker01) Creating SSH key...
(scw-docker01) Creating server...
(scw-docker01) Starting server...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine env scw-docker01

Does anyone else have the same problem and is there a solution?

QuentinPerez commented 8 years ago

Hi @RicardovanTongeren, thanks you for your feedback.

Which is your version of docker-machine-driver-scaleway ?

RicardovanTongeren commented 8 years ago

@QuentinPerez Sorry for the late response, did a lot of coding last week.

At the moment I had the master branch checked out and in de machine driver I can read.

    VERSION           = "v1.2.1+dev"

I'am mostly using Debian, and the main difference between the last two versions is the new init system (systemd). Does this also apply to Ubuntu en could this be the reason that the docker daemon can't start? When I login to the server I'am unable to start the docker daemon so that is the main problem.

QuentinPerez commented 8 years ago

@RicardovanTongeren, this issue come from our kernel modules, which are not loaded before the docker installation, (we are looking for another way to load the modules). Sometimes it work, sometimes not.

This week, I tested your command docker-machine create -d scaleway --scaleway-name="scw-docker01" --scaleway-commercial-type "VC1S" scw-docker01 without any problems

For now, I haven't a good workaround, but as I said we are looking for a better solution 😊

RicardovanTongeren commented 8 years ago

Thanks for the reply. I've had some other issues as well. When I use docker 1.11.x (the latest version that gets installed by docker-machine) the networking agent container doesn't want to start (keeps restarting).

I've read a lot about it online and the only solution for me is to use docker 1.10.3. Is there a way to force docker-machine to install docker 1.10.3?

asthomasdk commented 8 years ago

I have also been having issues with this - and found that it is best to get the guid for the image and use this instead of the name of the image.

However, when I choose the right ubuntu-xenial image wiht: --scaleway-image="75c28f52-6c64-40fc-bb31-f53ca9d02de9"

I get this: Error creating machine: Error in driver during machine creation: No such bootscript: docker

This is using the 1.2.1 version of the driver with a C2L server type.

QuentinPerez commented 8 years ago

Hi @asthomasdk,

Can you remove your ~/.scw-cache.db and give me the output of this command ?

$ docker-machine -D create -d scaleway --scaleway-commercial-type=C2L --scaleway-image "75c28f52-6c64-40fc-bb31-f53ca9d02de9" test1
asthomasdk commented 8 years ago

I did - and this worked very nicely.

Are the properties like the commercial type case sensitive? Could that be it?

I'll do some more testing.

QuentinPerez commented 8 years ago

Unfortunately yes.

alpunch commented 7 years ago

Hi, I'm having the same issue as the OP : using --scaleway-image="ubuntu-xenial" won't work. The server boots but docker-machine can't validate the node and proceed with docker installation. My workaround was to use --scaleway-image "d0c50b37-f0f5-4924-97b0-1fd40c457efe" which refers to Docker image from the ImageHub.

megastef commented 7 years ago

When I use instance type C2l I get:

Error creating machine: Error in driver during machine creation: Too many candidates for ubuntu-xenial (2)

Then I used --scaleway-image=d0c50b37-f0f5-4924-97b0-1fd40c457efe and it worked. Where can I find the Image IDs?

megastef commented 7 years ago

Is there a RancherOS image?

alpunch commented 7 years ago

You can find it here.

I don't know about RancherOS images.

pascalandy commented 7 years ago

I just updated the images name here: https://gist.github.com/pascalandy/b03fd6ed8a33651bbe7c0d70f474c910

garethknowles commented 7 years ago

I couldn't get the default Ubuntu Xenial image working at all. I managed to instead use the scaleway Docker image 3803a8a7 - which is actually based on Ubuntu Xenial, it provisioned successfully with docker-machine.

It did also require a quick ssh into for a apt-get update && apt-get upgrade to get docker updated to the latest version 17.05.

RicardovanTongeren commented 6 years ago

Old issue, lets close it.