[cs615asa] HW3 Getting the hostname
Rob Hoffmann
rhoffman at stevens.edu
Thu Mar 1 14:41:46 EST 2012
Question about retrieving the hostname in the helper tool.
Since the images take some time to boot up, ec2-run-instances does not
necessarily return the hostname right away. A logical way of getting it
would be to keep calling ec2-describe-instances <instance> until a
hostname is returned in the description. However I didn't want to put
the ec2-describe-instances in an infinite loop as an instance boot
failure on Amazon's end would leave the user with a hanging script which
wasn't their fault.
Currently my script runs the describe command X number of times before
it "times out", but I'm not sure if this is a good approach as some AMIs
may take longer to boot than others and X might end up being too small.
Is there another way I should be looking at this issue? Should I simply
trust that the instances will always boot?
-Rob
More information about the cs615asa
mailing list