StratusLab / client

Command Line Interface (CLI) for StratusLab cloud services
Apache License 2.0
2 stars 1 forks source link

boot timeout is too short in stratus-create-image #36

Closed loomis closed 11 years ago

loomis commented 11 years ago

The timeout between the network of a VM being visible (with a ping) and having the machine fully booted is currently 50 seconds in stratus-create-image. This is too optimistic for more complex images. The timeout should be extended to something more like several minutes.

loomis commented 11 years ago

The message from the user was:

The Ubuntu image HZTKYZgX7XzSokCHMB60lS0wsiv takes a long time to start but there is much worse: it starts the SSH server before accepting the public keys of the users. As a result, for several minutes, you get Permission denied when trying to connect with ssh and you have to re-try.

But it is worse with stratus-create-image since the script tries to connect immediately and sometimes fails:

... :: Check if we can connect to the machine Error: Error executing command: true OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 debug1: Reading configuration data /home/bortzmeyer/.ssh/config debug1: /home/bortzmeyer/.ssh/config line 7: Applying options for debug1: /home/bortzmeyer/.ssh/config line 158: Applying options for debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for debug1: Connecting to 134.158.75.100 [134.158.75.100] port 22. debug1: fd 3 clearing O_NONBLOCK debug1: Connection established. debug1: identity file /home/bortzmeyer/.ssh/id_dsa type 2 debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024 debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024 debug1: identity file /home/bortzmeyer/.ssh/id_dsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1 debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1 pat OpenSSH_5 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA 37:60:15:47:85:70:8b:7d:bf:1e:ba:72:49:d6:4e:e1 debug1: Host '134.158.75.100' is known and matches the ECDSA host key. debug1: Found key in /home/bortzmeyer/.ssh/known_hosts:489 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering DSA public key: /home/bortzmeyer/.ssh/id_dsa debug1: Authentications that can continue: publickey debug1: Offering RSA public key: /home/bortzmeyer/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. Permission denied (publickey).

I find no way to add a delay in status-create-image, or to tell it to wait for a successful authentication. Currently, I have to restart stratus-create-image and hope that the timing will be better :-(