4294: added min_nodes config parameter
authorTim Pierce <twp@curoverse.com>
Fri, 7 Nov 2014 14:37:24 +0000 (09:37 -0500)
committerTim Pierce <twp@curoverse.com>
Mon, 10 Nov 2014 21:28:08 +0000 (16:28 -0500)
commit3ee90fd536fbfc9d8d91d5fac7c12d0ebe0df5ab
tree694b35c4d4c42cc231ec7340b932d64607ee3994
parent890072727ff9c7f2cdb1864d7170fb74e0247af5
4294: added min_nodes config parameter

Added min_nodes configuration setting.  The job queue will return a
wishlist with at least min_nodes elements in it, and the node manager
daemon will avoid shutting down a node if it would bring the total below
min_nodes.

* arvnodeman.config sets default min_nodes to 0.
* NodeManagerDaemonActor:
** _nodes_wanted returns at least enough to keep the node count above
   min_nodes
** _nodes_excess will not allow the node count to drop below min_nodes
* jobqueue.ServerCalculator.servers_for_queue returns a list with at least
  min_nodes elements
* added test cases:
** NodeManagerDaemonActorTestCase.test_shutdown_declined_below_min_nodes
** ServerCalculatorTestCase.test_server_calc_returns_at_least_min_nodes
services/nodemanager/arvnodeman/config.py
services/nodemanager/arvnodeman/daemon.py
services/nodemanager/arvnodeman/jobqueue.py
services/nodemanager/arvnodeman/launcher.py
services/nodemanager/tests/test_daemon.py
services/nodemanager/tests/test_jobqueue.py