fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Problem running any command on an EC2 instance


From: Ognen Duzlevski
Subject: [Fab-user] Problem running any command on an EC2 instance
Date: Thu, 18 Sep 2014 19:54:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hello,

I have a fabric script that provisions an instance with an elastic IP.

The succession of steps is:

public_ip = provision_instance()
with settings(host_string=public_ip,user='ubuntu',key_filename=ssh_key,reject_unknown_hosts=False,disable_known_hosts=True):
    run("ls -l")

First time I run the script I see that the machine is provisioned (via the AWS console) but the run("ls -l") step fails with a timeout exception.

If I then go back and comment out the first step (the provision_instance() step) and re-run the script, the command run("ls -l") runs just fine. Also, when the script fails the first time I can ssh to the EC2 instance from the same terminal just fine.

The provision_instance() function does not finish until the status of the instance is "running" and both status checks (2/2) are OK so I know the instance is accessible via ssh.

What gives? :-)

Thanks!
ODDO



reply via email to

[Prev in Thread] Current Thread [Next in Thread]