4294: code review feedback
authorTim Pierce <twp@curoverse.com>
Tue, 11 Nov 2014 20:39:55 +0000 (15:39 -0500)
committerTim Pierce <twp@curoverse.com>
Tue, 11 Nov 2014 20:39:55 +0000 (15:39 -0500)
* Added min_nodes to sample config files
* Renamed idle_nodes to needed_nodes

services/nodemanager/arvnodeman/daemon.py
services/nodemanager/doc/ec2.example.cfg
services/nodemanager/doc/local.example.cfg

index d950e2a84208584ce350a6e8f2ac5c26e6637e21..eaf10be324de16811e655e2b8427bed85ad6709d 100644 (file)
@@ -204,8 +204,8 @@ class NodeManagerDaemonActor(actor_class):
                    self.max_nodes) - self._nodes_up()
 
     def _nodes_excess(self):
-        idle_nodes = self._nodes_busy() + len(self.last_wishlist)
-        return (self._nodes_up() - max(self.min_nodes, idle_nodes))
+        needed_nodes = self._nodes_busy() + len(self.last_wishlist)
+        return (self._nodes_up() - max(self.min_nodes, needed_nodes))
 
     def update_server_wishlist(self, wishlist):
         self._update_poll_time('server_wishlist')
index a56e69eea68f45f8edffcbd8b7e25091aec3cbb2..f4b27af70143dd813a0ec6923f9b71220c4f9ab3 100644 (file)
@@ -2,6 +2,10 @@
 # All times are in seconds unless specified otherwise.
 
 [Daemon]
+# Node Manager will ensure that there are at least this many nodes
+# running at all times.
+min_nodes = 0
+
 # Node Manager will not start any compute nodes when at least this
 # many are running.
 max_nodes = 8
index 8a6e626907a184775d8aedf23529f0897aa83545..314750e6cd3ade7c6bf6abdd25e4803b6a7acb2c 100644 (file)
@@ -6,6 +6,7 @@
 # IP address to 10.10.0.N (where N is the cloud node's ID), and save.
 
 [Daemon]
+min_nodes = 0
 max_nodes = 8
 poll_time = 15
 max_poll_time = 60