machine icon indicating copy to clipboard operation
machine copied to clipboard

Docker Machine get stuck on IBM Softlayer

Open wzymaster opened this issue 11 years ago • 33 comments

Here is a derived issue from #863.

Sorry, I just download the pre-release of 0.2.0 and run docker-machine like below :

./docker-machine create --driver softlayer --softlayer-user leow --softlayer-api-key xxx --softlayer-cpu 4 --softlayer-memory 8192 --softlayer-disk-size 0 --softlayer-domain imdemocloud.com --softlayer-hostname "leo-demo1" --softlayer-image CENTOS_LATEST_64 --softlayer-region hkg02 leo-demo1 INFO[0000] Creating SSH key... INFO[0007] Getting Host IP INFO[0032] Waiting for host to become available INFO[0154] Waiting for host setup transactions to complete

Unfortunatley, it still get stuck at 'Waiting for host setup transaction to complete" step .

However, I do see this VM machine provisioned on SoftLayer and I can log in. It looks like a clean machine without docker.

Do I run something wrong here ? @hairyhenderson

The below is the build of docker-machine which I am using :

Zhongs-MacBook-Pro:Leo_Demo wzymaster$ ./docker-machine -v docker-machine version 0.2.0 (45f08d9)

wzymaster avatar Mar 30 '15 14:03 wzymaster

Currently, only Ubuntu is supported. Could you try with that and see if you still have the issue?

ehazlett avatar Mar 30 '15 17:03 ehazlett

I just created a machine on Softlayer fine with the defaults.

ehazlett avatar Mar 30 '15 20:03 ehazlett

@wzymaster - I'm thinking @ehazlett is right - you should use Ubuntu instead (just omit the --softlayer-image option and it'll default to the right image). But, can you retry with the --debug option (before the create subcommand) to make sure it's not something else?

hairyhenderson avatar Mar 30 '15 21:03 hairyhenderson

Here is what I tried but still hanging there after almost 40 minutes :

Zhongs-MacBook-Pro:Leo_Demo wzymaster$ ./docker-machine create --driver softlayer \
>      --softlayer-user leow \
>      --softlayer-api-key xxxxxxxxxx \
>       --softlayer-cpu 4 \
>      --softlayer-memory 8192 \
>      --softlayer-disk-size  0 \
>      --softlayer-domain imdemocloud.com \
>      --softlayer-hostname "leo-demo"  \
>      --softlayer-region hkg02  \
>     leo-demo
INFO[0000] Creating SSH key...
INFO[0007] Getting Host IP
INFO[0030] Waiting for host to become available
INFO[0195] Waiting for host setup transactions to complete

Can you share me your ./docker-machine cmd for a successful run ? @ehazlett @hairyhenderson

In fact, VM is provisioned on IBM SoftLayer but no docker is installed on it after I manually log in , like following :

root@leo-demo:~# docker
The program 'docker' is currently not installed. You can install it by typing:
apt-get install docker
root@leo-demo:~# uname -a
Linux leo-demo 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@leo-demo:/etc# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

wzymaster avatar Mar 31 '15 04:03 wzymaster

One more point: I am running ./docker-machine on my MacBook (OS X 10.9.2) using Boot2Docker instead.

Is it ever verified on Boot2docker on macBook ?

wzymaster avatar Mar 31 '15 04:03 wzymaster

@wzymaster - I'm not sure what you mean, do you mean you're running the docker-machine binary inside the boot2docker VM? Otherwise, docker-machine has no interaction with boot2docker and should be fine.

Can you please re-run the command with the --debug option? There's likely some useful debug information that might help track down what's going wrong.

hairyhenderson avatar Mar 31 '15 21:03 hairyhenderson

Sorry for the confusion. I mean the same cmd line works fine on a Linux Box(CentOS 6.6) but failed on my macBook installed with boot2docker.

wzymaster avatar Mar 31 '15 21:03 wzymaster

@wzymaster - Ah, I see.

hairyhenderson avatar Mar 31 '15 21:03 hairyhenderson

Seeing this as well with the latest rc.

Running with debug only yields a little more infromation.

...
DEBU[0132] Still waiting - active transaction is POWER_ON...
DEBU[0134] Still waiting - active transaction is POWER_ON...
DEBU[0136] Still waiting - active transaction is INSTALL_COMPLETE...
DEBU[0139] Still waiting - active transaction is START_SERVICE_SETUP...
DEBU[0141] Still waiting - active transaction is SERVICE_SETUP...

And then nothing. Visiting the SL console the host is up running, ssh is fine, etc.

metcalfc avatar Apr 02 '15 15:04 metcalfc

Hmm i can create SL instances fine. Perhaps it's a region related issue?

ehazlett avatar Apr 02 '15 19:04 ehazlett

I tried dal01 and sjc01. Using the default API endpoint. Hourly billing. 

On April 2, 2015 at 12:25:02 PM PDT, Evan Hazlett [email protected] wrote:Hmm i can create SL instances fine. Perhaps it's a region related issue? —Reply to this email directly or view it on GitHub.

metcalfc avatar Apr 02 '15 19:04 metcalfc

I am also able to reproduce. Here are the env vars I have set:

SOFTLAYER_API_KEY=<my key>
SOFTLAYER_USER=mbentley
SOFTLAYER_REGION=dal06
SOFTLAYER_DOMAIN=mbentley.dckrindy.io

And here is my output:

$ docker-machine -D create -d softlayer softlayer02
INFO[0000] Creating SSH key...
DEBU[0000] executing: /usr/bin/ssh-keygen ssh-keygen -t rsa -N  -f /Users/mbentley/.docker/machine/machines/softlayer02/id_rsa

Generating public/private rsa key pair.
Your identification has been saved in /Users/mbentley/.docker/machine/machines/softlayer02/id_rsa.
Your public key has been saved in /Users/mbentley/.docker/machine/machines/softlayer02/id_rsa.pub.
The key fingerprint is:
a6:1f:c8:49:50:b7:d5:b7:8e:fd:18:02:4f:40:4f:f9 mbentley@wafflemaker
The key's randomart image is:
+--[ RSA 2048]----+
|      . ..o...   |
|     . . o.oo .  |
|    .   .  ..o . |
|     .    . . E  |
|      . S  + +   |
|     o =    + +  |
|      = .    . + |
|       . .    . .|
|        .        |
+-----------------+
INFO[0006] Getting Host IP
INFO[0026] Waiting for host to become available
DEBU[0026] Still waiting - state is Stopped...
...
DEBU[0076] Still waiting - state is Stopped...
DEBU[0078] Still waiting - active transaction is POWER_ON...
...
DEBU[0132] Still waiting - active transaction is POWER_ON...
DEBU[0135] Still waiting - active transaction is INSTALL_COMPLETE...
DEBU[0138] Still waiting - active transaction is START_SERVICE_SETUP...
DEBU[0140] Still waiting - active transaction is SERVICE_SETUP...
DEBU[0143] Still waiting - active transaction is SERVICE_SETUP...
DEBU[0145] Still waiting - active transaction is SERVICE_SETUP...

I am using dal06 because the default keeps complaining about not having SAN space and I haven't had a change to figure out why SOFTLAYER_LOCAL_DISK isn't working for me (I am probably just not giving it the right parameter) but the problem exists anyway so it isn't really the focus at this point. :smile:

mbentley avatar Apr 09 '15 13:04 mbentley

@mbentley - Interesting... Seems like you and @metcalfc are both seeing the polling stop after ~140 seconds...

I've only been testing this out in the tor01 datacenter. When I get some time I'll see about testing in dal06 and hkg02.

I might also have the loop simply time out if it takes too long. I'm thinking 5 or 10 minutes is reasonable...

hairyhenderson avatar Apr 10 '15 11:04 hairyhenderson

I can also reproduce this with both docker-machine 0.1.0 and 0.2.0 (e4c2173)

I'm running this from OS X 10.10.2

For both versions I am using the following env variables and command...

export SOFTLAYER_API_KEY=xxxxxxxx
export SOFTLAYER_USER=dockeruser
export SOFTLAYER_REGION=ams03
export SOFTLAYER_DOMAIN=robsmart.org
export SOFTLAYER_HOSTNAME=dm01

docker-machine -D create -d softlayer dm01

Debug output for 0.1.0 is ...

INFO[0000] Creating CA: /Users/robsmart/.docker/machine/certs/ca.pem 
INFO[0000] Creating client certificate: /Users/robsmart/.docker/machine/certs/cert.pem 
INFO[0000] Creating SSH key...                          
DEBU[0000] executing: /usr/bin/ssh-keygen ssh-keygen -t rsa -N  -f /Users/robsmart/.docker/machine/machines/dm01/id_rsa

Generating public/private rsa key pair.
Your identification has been saved in /Users/robsmart/.docker/machine/machines/dm01/id_rsa.
Your public key has been saved in /Users/robsmart/.docker/machine/machines/dm01/id_rsa.pub.
The key fingerprint is:
91:3c:ae:21:99:32:cc:41:33:cc:58:eb:ef:e4:5f:c1 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
| ==              |
|..o+   . .       |
|  o     =        |
| + . o o o       |
|  * + . E        |
|   + . o .       |
|    o . .        |
|   +   .         |
|    o..          |
+-----------------+
INFO[0007] Getting Host IP                              
INFO[0032] Waiting for host to become available         
INFO[0259] Configuring host OS                          
DEBU[0259] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 22 -i /Users/robsmart/.docker/machine/machines/dm01/id_rsa [email protected] [ -f "$(which docker)" ] && [ -f "/etc/default/docker" ] || exit 1 
DEBU[0263] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 22 -i /Users/robsmart/.docker/machine/machines/dm01/id_rsa [email protected] [ -f "$(which docker)" ] && [ -f "/etc/default/docker" ] || exit 1 
DEBU[0265] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 22 -i /Users/robsmart/.docker/machine/machines/dm01/id_rsa [email protected] [ -f "$(which docker)" ] && [ -f "/etc/default/docker" ] || exit 1 

The last command repeats endlessly. Logging onto the VM I can see that docker has not been installed.

The debug output for 0.2.0 is...

docker-machine version 0.2.0 (e4c2173)
INFO[0000] Creating SSH key...                          
INFO[0007] Getting Host IP                              
INFO[0040] Waiting for host to become available         
DEBU[0042] Still waiting - state is Stopped...          
DEBU[0045] Still waiting - state is Stopped...          
DEBU[0047] Still waiting - state is Stopped...          
DEBU[0050] Still waiting - state is Stopped...          
DEBU[0054] Still waiting - state is Stopped...          
DEBU[0056] Still waiting - state is Stopped...          
DEBU[0059] Still waiting - state is Stopped...          
DEBU[0062] Still waiting - state is Stopped...          
DEBU[0065] Still waiting - state is Stopped...          
DEBU[0068] Still waiting - state is Stopped...          
DEBU[0071] Still waiting - state is Stopped...          
DEBU[0074] Still waiting - state is Stopped...          
DEBU[0077] Still waiting - state is Stopped...          
DEBU[0080] Still waiting - state is Stopped...          
DEBU[0083] Still waiting - state is Stopped...          
DEBU[0086] Still waiting - state is Stopped...          
DEBU[0088] Still waiting - state is Stopped...          
DEBU[0091] Still waiting - state is Stopped...          
DEBU[0094] Still waiting - state is Stopped...          
DEBU[0097] Still waiting - state is Stopped...          
DEBU[0100] Still waiting - state is Stopped...          
DEBU[0103] Still waiting - state is Stopped...          
DEBU[0106] Still waiting - state is Stopped...          
DEBU[0109] Still waiting - state is Stopped...          
DEBU[0112] Still waiting - state is Stopped...          
DEBU[0115] Still waiting - state is Stopped...          
DEBU[0118] Still waiting - state is Stopped...          
DEBU[0121] Still waiting - state is Stopped...          
DEBU[0124] Still waiting - state is Stopped...          
DEBU[0127] Still waiting - state is Stopped...          
DEBU[0130] Still waiting - state is Stopped...          
DEBU[0133] Still waiting - state is Stopped...          
DEBU[0135] Still waiting - state is Stopped...          
DEBU[0138] Still waiting - state is Stopped...          
DEBU[0142] Still waiting - state is Stopped...          
DEBU[0145] Still waiting - state is Stopped...          
DEBU[0148] Still waiting - state is Stopped...          
DEBU[0151] Still waiting - state is Stopped...          
DEBU[0154] Still waiting - state is Stopped...          
DEBU[0157] Still waiting - state is Stopped...          
DEBU[0160] Still waiting - state is Stopped...          
DEBU[0163] Still waiting - state is Stopped...          
DEBU[0165] Still waiting - state is Stopped...          
DEBU[0168] Still waiting - state is Stopped...          
DEBU[0171] Still waiting - state is Stopped...          
DEBU[0174] Still waiting - state is Stopped...          
DEBU[0177] Still waiting - state is Stopped...          
DEBU[0180] Still waiting - state is Stopped...          
DEBU[0183] Still waiting - state is Stopped...          
DEBU[0186] Still waiting - state is Stopped...          
DEBU[0189] Still waiting - state is Stopped...          
DEBU[0192] Still waiting - state is Stopped...          
DEBU[0195] Still waiting - state is Stopped...          
DEBU[0198] Still waiting - state is Stopped...          
DEBU[0201] Still waiting - state is Stopped...          
DEBU[0204] Still waiting - state is Stopped...          
DEBU[0207] Still waiting - state is Stopped...          
DEBU[0210] Still waiting - state is Stopped...          
DEBU[0213] Still waiting - state is Stopped...          
DEBU[0216] Still waiting - state is Stopped...          
DEBU[0218] Still waiting - state is Stopped...          
DEBU[0221] Still waiting - state is Stopped...          
DEBU[0224] Still waiting - state is Stopped...          
DEBU[0227] Still waiting - state is Stopped...          
DEBU[0230] Still waiting - state is Stopped...          
DEBU[0233] Still waiting - state is Stopped...          
DEBU[0236] Still waiting - state is Stopped...          
DEBU[0239] Still waiting - state is Stopped...          
DEBU[0242] Still waiting - state is Stopped...          
INFO[0244] Waiting for host setup transactions to complete 
DEBU[0246] Still waiting - active transaction is POWER_ON... 
DEBU[0249] Still waiting - active transaction is POWER_ON... 
DEBU[0251] Still waiting - active transaction is POWER_ON... 
DEBU[0254] Still waiting - active transaction is POWER_ON... 
DEBU[0257] Still waiting - active transaction is POWER_ON... 
DEBU[0260] Still waiting - active transaction is POWER_ON... 
DEBU[0263] Still waiting - active transaction is POWER_ON... 
DEBU[0266] Still waiting - active transaction is POWER_ON... 
DEBU[0269] Still waiting - active transaction is POWER_ON... 
DEBU[0271] Still waiting - active transaction is POWER_ON... 
DEBU[0274] Still waiting - active transaction is POWER_ON... 
DEBU[0277] Still waiting - active transaction is POWER_ON... 
DEBU[0280] Still waiting - active transaction is POWER_ON... 
DEBU[0283] Still waiting - active transaction is POWER_ON... 
DEBU[0286] Still waiting - active transaction is POWER_ON... 
DEBU[0289] Still waiting - active transaction is INSTALL_COMPLETE... 
DEBU[0292] Still waiting - active transaction is INSTALL_COMPLETE... 
DEBU[0295] Still waiting - active transaction is START_SERVICE_SETUP... 
DEBU[0297] Still waiting - active transaction is SERVICE_SETUP... 
DEBU[0300] Still waiting - active transaction is PUBLISH_SERVER_DATA... 

Again the vm is provisioned but Docker has not been installed despite the INSTALL_COMPLETE debug message above.

zekizeki avatar Apr 15 '15 07:04 zekizeki

@zekizeki - was there anything after the last line? The INSTALL_COMPLETE transaction isn't usually the last transaction - there's often a few transactions that happen afterwards.

hairyhenderson avatar Apr 15 '15 11:04 hairyhenderson

I'm seeing something interesting which may be related to this problem (or totally unrelated). I see much the same output as @zekizeki, but at the end:

...
DEBU[0274] Still waiting - active transaction is SERVICE_SETUP... 
DEBU[0277] Still waiting - active transaction is SERVICE_SETUP... 
DEBU[0279] Still waiting - active transaction is SERVICE_SETUP... 
DEBU[0290] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectionAttempts=30 -o LogLevel=quiet -p 22 -i /Users/hendersd/.docker/machine/machines/dmtest-tor01/id_rsa [email protected] sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -yq curl 

At this point, the process just hangs. Trying to SSH in to the public IP address of the VM fails. In my particular case, we have a firewall on our public VLAN, so by default SSH doesn't work to that IP. Given that the ssh command is told to make 30 connection attempts, it's probably not hanging, just quietly timing out 30 times...

I'm going to add more debug output, and also try this out in a few other regions...

hairyhenderson avatar Apr 15 '15 12:04 hairyhenderson

Just tried this out in ams01, and it took considerably longer to finish the setup transactions (after 521 seconds!), but it did complete, and because we don't have any firewalls on VLANs in ams01, the SSH commands completed correctly and docker installed no problem.

Will try out a few other regions...

hairyhenderson avatar Apr 15 '15 12:04 hairyhenderson

Ok, hkg02 works fine for me as well.

I have a feeling there's some difference in SL account permissions that's causing things to work fine for myself and @ehazlett, but not for everyone else on this thread.

hairyhenderson avatar Apr 15 '15 13:04 hairyhenderson

I just tried to replicate starting two instances, one with my credentials and one with those from @ehazlett and both instances hung.

Using my credentials:

...
DEBU[0153] Still waiting - active transaction is POWER_ON...
DEBU[0155] Still waiting - active transaction is INSTALL_COMPLETE...
DEBU[0158] Still waiting - active transaction is START_SERVICE_SETUP...
DEBU[0160] Still waiting - active transaction is SERVICE_SETUP...
DEBU[0163] Still waiting - active transaction is SERVICE_SETUP...

Using @ehazlett's:

...
DEBU[0138] Still waiting - active transaction is POWER_ON...
DEBU[0140] Still waiting - active transaction is INSTALL_COMPLETE...
DEBU[0143] Still waiting - active transaction is START_SERVICE_SETUP...
DEBU[0145] Still waiting - active transaction is SERVICE_SETUP...
DEBU[0148] Still waiting - active transaction is PUBLISH_SERVER_DATA..

All other environment variables are the same:

SOFTLAYER_API_KEY=removed
SOFTLAYER_USER=removed
SOFTLAYER_REGION=dal06
SOFTLAYER_DOMAIN=mbentley.dckrindy.io

mbentley avatar Apr 15 '15 15:04 mbentley

@hairyhenderson there was nothing after the line ...

DEBU[0300] Still waiting - active transaction is PUBLISH_SERVER_DATA...  

it just hung there, I left it overnight in the hope it might complete but no joy.

I tried it again on a different data center and it got as far as ...

DEBU[0328] Still waiting - active transaction is POWER_ON... 
DEBU[0331] Still waiting - active transaction is POWER_ON... 
DEBU[0334] Still waiting - active transaction is INSTALL_COMPLETE... 
DEBU[0337] Still waiting - active transaction is INSTALL_COMPLETE... 
DEBU[0340] Still waiting - active transaction is SERVICE_SETUP... 

then hung.

In terms of permissions on the SL account, my user does have full admin permissions for everything so that might be a red herring.

Do you have the exact command you used for docker-machine, if so i'll try it out with the same params (excepting the obvious differences)

Also any clues how to debug more, I'm just looking at the softlayer driver code and can't actually see any docker install steps in there? would there be some log output somewhere on the created VM that might give more info

zekizeki avatar Apr 15 '15 15:04 zekizeki