diff options
author | Richard Kreuter <richard@10gen.com> | 2010-07-08 10:10:41 -0400 |
---|---|---|
committer | Richard Kreuter <richard@10gen.com> | 2010-07-08 10:10:41 -0400 |
commit | 9a9e88ad92d70969a2423de04bcf43502a9058ac (patch) | |
tree | e7b6666ab73b0d3cab737fca1ba92991e64fa600 /buildscripts | |
parent | 0545efcdb234a6ba66938d4569afbbaa25619b40 (diff) | |
download | mongo-9a9e88ad92d70969a2423de04bcf43502a9058ac.tar.gz |
Work around some missing EC2 node data.
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/makedist.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/buildscripts/makedist.py b/buildscripts/makedist.py index a305b3aa27a..43d0720d5dd 100644 --- a/buildscripts/makedist.py +++ b/buildscripts/makedist.py @@ -154,10 +154,20 @@ class nodeWrapper(object): self.use_internal_name = False def getHostname(self): + internal_name=self.node.private_ip[0] + public_name=self.node.public_ip[0] + if not (internal_name or external_name): + raise Exception('host has no name?') if self.use_internal_name: - return self.node.private_ip[0] + # FIXME: by inspection, it seems this is sometimes the + # empty string. Dunno if that's EC2 or libcloud being + # stupid, but it's not good. + if internal_name: + return internal_name + else: + return public_name else: - return self.node.public_ip[0] # FIXME private_ip? + return public_name def initwait(self): print "waiting for node to spin up" |