[ARVADOS] updated: 9dae71315a83504493952f9039de958594e45f31
Git user
git at public.curoverse.com
Tue Mar 7 12:54:05 EST 2017
Summary of changes:
services/nodemanager/doc/azure.example.cfg | 6 ++++++
services/nodemanager/doc/ec2.example.cfg | 6 ++++++
services/nodemanager/doc/gce.example.cfg | 6 ++++++
services/nodemanager/tests/test_jobqueue.py | 9 +++++++++
4 files changed, 27 insertions(+)
via 9dae71315a83504493952f9039de958594e45f31 (commit)
from b6423b5e5261f1ddaa88db2548e2190f82de21e8 (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 9dae71315a83504493952f9039de958594e45f31
Author: Lucas Di Pentima <lucas at curoverse.com>
Date: Tue Mar 7 14:52:59 2017 -0300
11139: Added new test to check for non-default values. Updated example config files.
diff --git a/services/nodemanager/doc/azure.example.cfg b/services/nodemanager/doc/azure.example.cfg
index 0b5f1d3..f253621 100644
--- a/services/nodemanager/doc/azure.example.cfg
+++ b/services/nodemanager/doc/azure.example.cfg
@@ -51,6 +51,12 @@ boot_fail_after = 1800
# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
diff --git a/services/nodemanager/doc/ec2.example.cfg b/services/nodemanager/doc/ec2.example.cfg
index 1c33bfd..b25bf94 100644
--- a/services/nodemanager/doc/ec2.example.cfg
+++ b/services/nodemanager/doc/ec2.example.cfg
@@ -51,6 +51,12 @@ boot_fail_after = 1800
# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
diff --git a/services/nodemanager/doc/gce.example.cfg b/services/nodemanager/doc/gce.example.cfg
index 06fcdff..ed7bdc3 100644
--- a/services/nodemanager/doc/gce.example.cfg
+++ b/services/nodemanager/doc/gce.example.cfg
@@ -40,6 +40,12 @@ poll_stale_after = 600
# an Arvados node that hasn't been updated for this long.
node_stale_after = 14400
+# Scaling factor to be applied to nodes' available RAM size. Usually there's a
+# variable discrepancy between the advertised RAM value on cloud nodes and the
+# actual amount available.
+# If not set, this value will be set to 0.95
+node_mem_scaling = 0.95
+
# File path for Certificate Authorities
certs_file = /etc/ssl/certs/ca-certificates.crt
diff --git a/services/nodemanager/tests/test_jobqueue.py b/services/nodemanager/tests/test_jobqueue.py
index 2c43052..c203139 100644
--- a/services/nodemanager/tests/test_jobqueue.py
+++ b/services/nodemanager/tests/test_jobqueue.py
@@ -35,6 +35,15 @@ class ServerCalculatorTestCase(unittest.TestCase):
servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 121})
self.assertEqual(1, len(servlist))
+ def test_custom_node_mem_scaling_factor(self):
+ # Simulate a custom 'node_mem_scaling' config parameter by passing
+ # the value to ServerCalculator
+ servcalc = self.make_calculator([1], node_mem_scaling=0.5)
+ servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 128})
+ self.assertEqual(0, len(servlist))
+ servlist = self.calculate(servcalc, {'min_ram_mb_per_node': 64})
+ self.assertEqual(1, len(servlist))
+
def test_implicit_server_count(self):
servcalc = self.make_calculator([1])
servlist = self.calculate(servcalc, {}, {'min_nodes': 3})
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list