[ARVADOS] updated: 44494089c502572ee231bb421da70889b68fae4f

git at public.curoverse.com git at public.curoverse.com
Thu Aug 20 14:02:46 EDT 2015


Summary of changes:
 services/nodemanager/arvnodeman/computenode/driver/azure.py |  6 +++---
 services/nodemanager/tests/test_computenode_driver_azure.py | 12 +++---------
 2 files changed, 6 insertions(+), 12 deletions(-)

       via  44494089c502572ee231bb421da70889b68fae4f (commit)
       via  5467329d6822455de4644a277f741068cf5f1ec9 (commit)
       via  0600e45775658866f624b87efeef6a1067db5c39 (commit)
      from  8552d32092e45a1f6ee1424e92882ec84b51cb8a (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 44494089c502572ee231bb421da70889b68fae4f
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Aug 20 14:04:03 2015 -0400

    6507: Use get_image() instead of list_images() for image lookup.

diff --git a/services/nodemanager/arvnodeman/computenode/driver/azure.py b/services/nodemanager/arvnodeman/computenode/driver/azure.py
index dd2b636..d075bdb 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/azure.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/azure.py
@@ -50,7 +50,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
         pass
 
     def _init_image(self, urn):
-        return "image", self.list_images(ex_urn=urn)[0]
+        return "image", self.get_image(urn)
 
     def _init_ssh_key(self, filename):
         with open(filename) as ssh_file:

commit 5467329d6822455de4644a277f741068cf5f1ec9
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Aug 19 11:22:35 2015 -0400

    6507: Fix tests

diff --git a/services/nodemanager/tests/test_computenode_driver_azure.py b/services/nodemanager/tests/test_computenode_driver_azure.py
index 049e708..3b7cca2 100644
--- a/services/nodemanager/tests/test_computenode_driver_azure.py
+++ b/services/nodemanager/tests/test_computenode_driver_azure.py
@@ -32,7 +32,7 @@ class AzureComputeNodeDriverTestCase(testutil.DriverTestMixin, unittest.TestCase
         driver = self.new_driver(create_kwargs={'image': 'id_b'})
         self.assertEqual(1, list_method.call_count)
 
-    def test_create_includes_ping_url(self):
+    def test_create_includes_ping_and_hostname(self):
         arv_node = testutil.arvados_node_mock(info={'ping_secret': 'ssshh'})
         driver = self.new_driver()
         driver.create_node(testutil.MockSize(1), arv_node)
@@ -41,6 +41,8 @@ class AzureComputeNodeDriverTestCase(testutil.DriverTestMixin, unittest.TestCase
         print(create_method.call_args[1])
         self.assertIn('ping_secret=ssshh',
                       create_method.call_args[1].get('ex_tags', {}).get('arv-ping-url', ""))
+        self.assertEqual('compute99.zzzzz.arvadosapi.com',
+                      create_method.call_args[1].get('ex_tags', {}).get('hostname', ""))
 
     def test_name_from_new_arvados_node(self):
         arv_node = testutil.arvados_node_mock(hostname=None)
@@ -54,14 +56,6 @@ class AzureComputeNodeDriverTestCase(testutil.DriverTestMixin, unittest.TestCase
         self.assertIs(cloud_node, tag_mock.call_args[0][0])
         self.assertEqual(expected_tags, tag_mock.call_args[0][1])
 
-    def test_sync_node(self):
-        arv_node = testutil.arvados_node_mock(1)
-        cloud_node = testutil.cloud_node_mock(2)
-        driver = self.new_driver()
-        driver.sync_node(cloud_node, arv_node)
-        self.check_node_tagged(cloud_node,
-                               {'hostname': 'compute1.zzzzz.arvadosapi.com'})
-
     def test_node_create_time(self):
         refsecs = int(time.time())
         reftuple = time.gmtime(refsecs)

commit 0600e45775658866f624b87efeef6a1067db5c39
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Aug 19 11:19:45 2015 -0400

    6507: Set hostname tag in arvados_create_kwargs instead of sync_node.

diff --git a/services/nodemanager/arvnodeman/computenode/driver/azure.py b/services/nodemanager/arvnodeman/computenode/driver/azure.py
index 725020e..dd2b636 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/azure.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/azure.py
@@ -38,6 +38,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
         tags = {
             'booted_at': time.strftime(ARVADOS_TIMEFMT, time.gmtime()),
             'arv-ping-url': self._make_ping_url(arvados_node),
+            'hostname': arvados_node_fqdn(arvados_node)
         }
         tags.update(self.tags)
         return {
@@ -46,8 +47,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
         }
 
     def sync_node(self, cloud_node, arvados_node):
-        hostname = arvados_node_fqdn(arvados_node)
-        self.real.ex_create_tags(cloud_node, {"hostname": hostname})
+        pass
 
     def _init_image(self, urn):
         return "image", self.list_images(ex_urn=urn)[0]

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list