Hello,
I was very happy to see the availability of 'reboot' operation in the newly
released v0.9.2. However, when I try to use the method, the remote machine
reboots but the fabric script fails to execute subsequent commands. The
script does not seem to wait the specified amount of time before proceeding.
Should a back-off system be implemented following the call to reboot?

Here is my sample script:
from fabric.api import *
from fabric.operations import *
env.user = 'ubuntu'
def s():
    print env.hosts[0]
    print env.user
    reboot(35)
    run('uname -a')

And here is the result of running the script:
$ fab -i ~/keypair.private -f simple_fabfile.py -H
ec2-75-101-190-218.compute-1.amazonaws.com s
[ec2-75-101-190-218.compute-1.amazonaws.com] Executing task 's'
ec2-75-101-190-218.compute-1.amazonaws.com
ubuntu
[ec2-75-101-190-218.compute-1.amazonaws.com] sudo: reboot
Traceback (most recent call last):
  File "build/bdist.macosx-10.3-fat/egg/fabric/main.py", line 532, in main
  File "/Users/afgane/Dropbox/tmp/code/simple_fabfile.py", line 30, in s
    reboot('35')
  File "build/bdist.macosx-10.3-fat/egg/fabric/operations.py", line 633, in
reboot
KeyError: 'ec2-75-101-190-218.compute-1.amazonaws.com'
Disconnecting from ec2-75-101-190-218.compute-1.amazonaws.com... done.

Any suggestions as to what I'm doing wrong would be appreciated,
Enis
_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to