Machine: Can't generate Centos Docker machine on Digital Ocean DO

Created on 2 Aug 2016  路  13Comments  路  Source: docker/machine

The problem is reproducible.
I use following command:
dm create --driver digitalocean --digitalocean-image centos-7-2-x64 --digitalocean-size 1gb --digitalocean-access-token $DOTOKEN testMeR2
The droplet start up. The the docker demon dies on start-up.

docker-machine create --driver digitalocean --digitalocean-image centos-7-2-x64 --digitalocean-size 1gb --digitalocean-access-token $DOTOKEN testMeR
Running pre-create checks...
Creating machine...
(testMeR) Creating SSH key...
(testMeR) Creating Digital Ocean droplet...
(testMeR) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with cents...

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: Something went wrong running an SSH command!
command : sudo systemctl -f start docker
err : exit status 6
output : Failed to start docker.service: Unit docker.socket failed to load: No such file or directory.

With Ubuntu (default at DO) it works fine. DO Support says, that there is no problem at the DO side.

Most helpful comment

(I am considering an 0.8.1 release for this fix, but might tie it to a Docker 1.12.1 if one comes up in the next few weeks -- it's just easier that way due to also needing to release Toolbox, etc.)

All 13 comments

I tested this myself using the latest docker/docker-machine software on my mac and got a slightly different error:

$ docker-machine create --driver digitalocean --digitalocean-image centos-7-2-x64 --digitalocean-size 1gb --digitalocean-access-token $DO_WORK Docker-Machine-Test 
Creating CA: /Users/Eris/.docker/machine/certs/ca.pem 
Creating client certificate: /Users/Eris/.docker/machine/certs/cert.pem 
Running pre-create checks... 
Creating machine... 
(Docker-Machine-Test) Creating SSH key... 
(Docker-Machine-Test) Creating Digital Ocean droplet... 
(Docker-Machine-Test) Waiting for IP address to be assigned to the Droplet... 
Waiting for machine to be running, this may take a few minutes... 
Detecting operating system of created instance... 
Waiting for SSH to be available... 
Detecting the provisioner... 
Provisioning with centos... 
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: exit status 6

Not sure of the cause, but it's happening after the Droplet is successfully provisioned on our end.

I think this will be fixed by: #3624

I can confirm it has been fixed with #3624. Next official release may be some time off, so if you build docker-machine from current master branch it will work with RHEL 7.2 (I just tested it). I assume the same holds for Centos. Referencing #3636 as well, since that is the same issue.

It's been fixed on master if I understand the issue correctly

(I am considering an 0.8.1 release for this fix, but might tie it to a Docker 1.12.1 if one comes up in the next few weeks -- it's just easier that way due to also needing to release Toolbox, etc.)

@jverhoeven @nathanleclaire - hoping you could spare a few minutes on where I can find a reference on how to build/compile from a commit rather than downloading from the release tags.
Really keen to confirm this on #3636

@richardkeit You could git clone https://github.com/docker/machine; cd machine; USE_CONTAINER=true make build-x -- that will spit out cross-compiled binaries into bin directory

hi @nathanleclaire - the build failed with

go build github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/types: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

Full Gist output

Can you share some guidance?

Hi @richardkeit: In Nathan's instructions 'USE_CONTAINER=true' should be 'export USE_CONTAINER=true'

Hi @richardkeit: In Nathan's instructions 'USE_CONTAINER=true' should be 'export USE_CONTAINER=true'

No, it should be fine with just USE_CONTAINER=true make build-x, since that indicates to the make process that environment variable USE_CONTAINER should be set to true.

The error is definitely a bit odd -- are you compiling on a machine with limited resources? A couple GBs of memory at least is definitely recommended for build

@nathanleclaire , @jverhoeven - just a quick revert - I used a higher spec'ed instance and it completed successfully using:

USE_CONTAINER=true make build-x

I got the same problem with a docker-machine client on Windows 10 and Centos 7:

Henrik@zenbook MINGW64 ~
$ docker-machine create --driver generic --generic-ip-address=$SOME_IP_ADDRESS --generic-ssh-user holst hentos
Running pre-create checks...
Creating machine...
(hentos) No SSH key specified. Connecting to this machine now and in the future will require the ssh agent to contain the appropriate key.
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with centos...
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: exit status 6

Henrik@zenbook MINGW64 ~
$ docker-machine --version
docker-machine.exe version 0.7.0, build a650a40

Henrik@zenbook MINGW64 ~
$

@hholst80 That version of Machine does not contain the fix. Please try 0.8.1.

Was this page helpful?
0 / 5 - 0 ratings