[ARVADOS] created: ee9bfde99d0916cdc325d75fc480972d498d4c15

git at public.curoverse.com git at public.curoverse.com
Fri Dec 4 14:37:10 EST 2015


        at  ee9bfde99d0916cdc325d75fc480972d498d4c15 (commit)


commit ee9bfde99d0916cdc325d75fc480972d498d4c15
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Dec 4 14:37:06 2015 -0500

    Remove redundant exception from Node Manager NETWORK_ERRORS.

diff --git a/services/nodemanager/arvnodeman/config.py b/services/nodemanager/arvnodeman/config.py
index 50c3ceb..dd45165 100644
--- a/services/nodemanager/arvnodeman/config.py
+++ b/services/nodemanager/arvnodeman/config.py
@@ -5,7 +5,6 @@ from __future__ import absolute_import, print_function
 import ConfigParser
 import importlib
 import logging
-import ssl
 import sys
 
 import arvados
@@ -13,10 +12,10 @@ import httplib2
 import pykka
 from apiclient import errors as apierror
 
-# IOError is the base class for socket.error and friends.
+# IOError is the base class for socket.error, ssl.SSLError, and friends.
 # It seems like it hits the sweet spot for operations we want to retry:
 # it's low-level, but unlikely to catch code bugs.
-NETWORK_ERRORS = (IOError, ssl.SSLError)
+NETWORK_ERRORS = (IOError,)
 ARVADOS_ERRORS = NETWORK_ERRORS + (apierror.Error,)
 
 actor_class = pykka.ThreadingActor

commit 08fa0adb7499db4dd89b6c535966f4654f680674
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Dec 4 14:35:30 2015 -0500

    7835: Node Manager coerces node size prices to float.

diff --git a/services/nodemanager/arvnodeman/config.py b/services/nodemanager/arvnodeman/config.py
index af9c8c0..50c3ceb 100644
--- a/services/nodemanager/arvnodeman/config.py
+++ b/services/nodemanager/arvnodeman/config.py
@@ -117,7 +117,10 @@ class NodeManagerConfig(ConfigParser.SafeConfigParser):
             sec_words = sec_name.split(None, 2)
             if sec_words[0] != 'Size':
                 continue
-            size_kwargs[sec_words[1]] = self.get_section(sec_name, int)
+            size_spec = self.get_section(sec_name, int)
+            if 'price' in size_spec:
+                size_spec['price'] = float(size_spec['price'])
+            size_kwargs[sec_words[1]] = size_spec
         # EC2 node sizes are identified by id. GCE sizes are identified by name.
         matching_sizes = []
         for size in all_sizes:
diff --git a/services/nodemanager/tests/test_config.py b/services/nodemanager/tests/test_config.py
index d43491e..e566928 100644
--- a/services/nodemanager/tests/test_config.py
+++ b/services/nodemanager/tests/test_config.py
@@ -24,6 +24,7 @@ creds = dummy_creds
 
 [Size 1]
 cores = 1
+price = 0.8
 
 [Logging]
 file = /dev/null
@@ -55,6 +56,7 @@ testlogger = INFO
         size, kwargs = sizes[0]
         self.assertEqual('Small', size.name)
         self.assertEqual(1, kwargs['cores'])
+        self.assertEqual(0.8, kwargs['price'])
 
     def test_shutdown_windows(self):
         config = self.load_config()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list