From: Tim Pierce Date: Tue, 11 Nov 2014 20:39:55 +0000 (-0500) Subject: 4294: code review feedback X-Git-Tag: 1.1.0~2014^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/ca136c579fc014b6428c18cc3a74a45550539543?ds=sidebyside 4294: code review feedback * Added min_nodes to sample config files * Renamed idle_nodes to needed_nodes --- diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py index d950e2a842..eaf10be324 100644 --- a/services/nodemanager/arvnodeman/daemon.py +++ b/services/nodemanager/arvnodeman/daemon.py @@ -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') diff --git a/services/nodemanager/doc/ec2.example.cfg b/services/nodemanager/doc/ec2.example.cfg index a56e69eea6..f4b27af701 100644 --- a/services/nodemanager/doc/ec2.example.cfg +++ b/services/nodemanager/doc/ec2.example.cfg @@ -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 diff --git a/services/nodemanager/doc/local.example.cfg b/services/nodemanager/doc/local.example.cfg index 8a6e626907..314750e6cd 100644 --- a/services/nodemanager/doc/local.example.cfg +++ b/services/nodemanager/doc/local.example.cfg @@ -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