Skip to content

Commit

Permalink
do not allow user to start 0-slave cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingCat committed Mar 3, 2014
1 parent 24a7c79 commit 9a71769
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ec2/spark_ec2.py
Expand Up @@ -678,6 +678,9 @@ def real_main():
opts.zone = random.choice(conn.get_all_zones()).name

if action == "launch":
if opts.slaves <= 0:
print "You have to start at least 1 slave"
sys.exit(1)
if opts.resume:
(master_nodes, slave_nodes) = get_existing_cluster(
conn, opts, cluster_name)
Expand Down

0 comments on commit 9a71769

Please sign in to comment.