[ARVADOS] updated: 94442974428c037df716204296a3579dbc645bbc
git at public.curoverse.com
git at public.curoverse.com
Thu Nov 19 14:44:48 EST 2015
Summary of changes:
services/nodemanager/arvnodeman/computenode/driver/dummy.py | 1 +
services/nodemanager/arvnodeman/daemon.py | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
via 94442974428c037df716204296a3579dbc645bbc (commit)
from 23c3347fe9779c3826179285de86e8540d46d749 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 94442974428c037df716204296a3579dbc645bbc
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Nov 19 14:44:42 2015 -0500
5353: Remove checks that cloud_node.size is None (because it should never be None or
booting multiple node sizes won't work). Set size explicitly for the dummy driver.
diff --git a/services/nodemanager/arvnodeman/computenode/driver/dummy.py b/services/nodemanager/arvnodeman/computenode/driver/dummy.py
index c164a25..44ee715 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/dummy.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/dummy.py
@@ -38,6 +38,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
nodelist = super(ComputeNodeDriver, self).list_nodes()
for node in nodelist:
self._ensure_private_ip(node)
+ node.size = self.sizes["1"]
return nodelist
def create_node(self, size, arvados_node):
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index 64bb177..df0307a 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -222,7 +222,7 @@ class NodeManagerDaemonActor(actor_class):
up += sum(1
for i in (self.booted, self.cloud_nodes.nodes)
for c in i.itervalues()
- if size is None or (c.cloud_node.size and c.cloud_node.size.id == size.id))
+ if size is None or c.cloud_node.size.id == size.id)
return up
def _total_price(self):
@@ -231,22 +231,21 @@ class NodeManagerDaemonActor(actor_class):
for c in self.booting.itervalues())
cost += sum(c.cloud_node.size.price
for i in (self.booted, self.cloud_nodes.nodes)
- for c in i.itervalues()
- if c.cloud_node.size)
+ for c in i.itervalues())
return cost
def _nodes_busy(self, size):
return sum(1 for busy in
pykka.get_all(rec.actor.in_state('busy') for rec in
self.cloud_nodes.nodes.itervalues()
- if (rec.cloud_node.size and rec.cloud_node.size.id == size.id))
+ if rec.cloud_node.size.id == size.id)
if busy)
def _nodes_missing(self, size):
return sum(1 for arv_node in
pykka.get_all(rec.actor.arvados_node for rec in
self.cloud_nodes.nodes.itervalues()
- if rec.cloud_node.size and rec.cloud_node.size.id == size.id and rec.actor.cloud_node.get().id not in self.shutdowns)
+ if rec.cloud_node.size.id == size.id and rec.actor.cloud_node.get().id not in self.shutdowns)
if arv_node and cnode.arvados_node_missing(arv_node, self.node_stale_after))
def _size_wishlist(self, size):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list