[StarCluster] Fixed 'ZeroDivisionError: float division' error when launching a cluster

Stuart Young stuartpyoung at gmail.com
Wed Feb 9 18:28:02 EST 2011


Hi All,

Fyi, I came across an intermittent error message when launching a 
cluster with the latest versions of the trunk and the load balancer branch:

   File "build/bdist.linux-x86_64/egg/starcluster/progressbar.py", line 
261, in percentage
     return self.currval * 100.0 / self.maxval
ZeroDivisionError: float division

I fixed it by adding a pause in cluster.py BEFORE looking for running 
instances:

LINE 1039, cluster.py:

         # ADDED SLEEP TO AVOID CRASH JUST AFTER FIRST CHECK OF RUNNING 
INSTANCES
         # WHEN INSTANCES ARE NOT YET AVAILABLE
         # >>> Waiting for all nodes to be in a 'running' state...
         time.sleep(interval)


FULL ERROR OUTPUT:

starcluster start smallcluster
StarCluster - (http://web.mit.edu/starcluster) (v. 0.9999)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to starcluster at mit.edu

 >>> Using default cluster template: smallcluster
 >>> AutoMount.__init__    Running AutoMount plugin.
 >>> Validating cluster template settings...
 >>> Cluster template settings are valid
 >>> Starting cluster...
 >>> Launching a 2-node cluster...
 >>> Launching master (ami: ami-a5c42dcc, type: m1.large)
 >>> Launching node001 (ami: ami-a5c42dcc, type: m1.large)
 >>> Creating security group @sc-smallcluster...
Reservation:r-0664ab6b
 >>> Waiting for cluster to come up... (updating every 30s)
 >>> Waiting for all nodes to be in a 'running' state...
Traceback (most recent call last):
   File "build/bdist.linux-x86_64/egg/starcluster/cli.py", line 152, in main
     sc.execute(args)
   File "build/bdist.linux-x86_64/egg/starcluster/commands/start.py", 
line 195, in execute
     scluster.start(create=create, create_only=create_only, validate=False)
   File "build/bdist.linux-x86_64/egg/starcluster/cluster.py", line 
1191, in start
     return self._start(create, create_only)
   File "build/bdist.linux-x86_64/egg/starcluster/utils.py", line 69, in 
wrap_f
     res = func(*arg, **kargs)
   File "build/bdist.linux-x86_64/egg/starcluster/cluster.py", line 
1209, in _start
     self._setup_cluster()
   File "build/bdist.linux-x86_64/egg/starcluster/cluster.py", line 
1223, in _setup_cluster
     self.wait_for_cluster()
   File "build/bdist.linux-x86_64/egg/starcluster/cluster.py", line 
1041, in wait_for_cluster
     pbar.update(0)
   File "build/bdist.linux-x86_64/egg/starcluster/progressbar.py", line 
312, in update
     self.prev_percentage = self.percentage()
   File "build/bdist.linux-x86_64/egg/starcluster/progressbar.py", line 
261, in percentage
     return self.currval * 100.0 / self.maxval
ZeroDivisionError: float division

cli.py:173 - ERROR - Oops! Looks like you've found a bug in StarCluster
cli.py:174 - ERROR - Debug file written to: /tmp/starcluster-debug-root.log
cli.py:175 - ERROR - Look for lines starting with PID: 3104
cli.py:177 - ERROR - Please submit this file, minus any private information,
cli.py:178 - ERROR - to starcluster at mit.edu


Cheers,

Stuart



More information about the StarCluster mailing list