Skip to content

Commit 1e6a241

Browse files
committed
fix('contrib/azure/azure-coreos-cluster'): make this not found error more user friendly
Currently this error spews for any little reason. It helps if we catch and explain some quick things to look for
1 parent e153834 commit 1e6a241

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

contrib/azure/azure-coreos-cluster

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,19 @@ for i in range(args.num_nodes):
257257

258258
#get the ip addresses
259259
def get_ips(service_name, deployment_name):
260+
try:
260261
result = sms.get_deployment_by_name(service_name, deployment_name)
261262
for instance in result.role_instance_list:
262263
ips.append(instance.public_ips[0].address)
263264
return ips
264-
265+
except WindowsAzureMissingResourceError:
266+
# some helpful user error info
267+
print 'Could not find cloud service ip address. This is likely due to the fact that the'
268+
print 'cloud service failed to start. Check that the storage account for the'
269+
print '--blob-container-url argument exists, ends with a \'/\' and that there is a container named \'vhds\' '
270+
print 'within it. You may need to delete the cloud service \'' + service_name + '\' if you try'
271+
print 'this script again'
272+
sys.exit(1)
265273
#print dns config
266274
if args.pip:
267275
ips = []

0 commit comments

Comments
 (0)