summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorRichard Kreuter <richard@10gen.com>2010-07-08 10:10:41 -0400
committerRichard Kreuter <richard@10gen.com>2010-07-08 10:10:41 -0400
commit9a9e88ad92d70969a2423de04bcf43502a9058ac (patch)
treee7b6666ab73b0d3cab737fca1ba92991e64fa600 /buildscripts
parent0545efcdb234a6ba66938d4569afbbaa25619b40 (diff)
downloadmongo-9a9e88ad92d70969a2423de04bcf43502a9058ac.tar.gz
Work around some missing EC2 node data.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/makedist.py14
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"