[ARVADOS] updated: 116d6fd671641ecb7d1d491ef4798a0d1b5b48ac
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 3 10:10:17 EST 2015
Summary of changes:
services/nodemanager/arvnodeman/computenode/driver/gce.py | 12 ------------
services/nodemanager/doc/gce.example.cfg | 7 +++----
services/nodemanager/tests/test_computenode_driver_gce.py | 15 ---------------
3 files changed, 3 insertions(+), 31 deletions(-)
via 116d6fd671641ecb7d1d491ef4798a0d1b5b48ac (commit)
via e2ab0a122f3b721a7663b61769f15713dbcf1a5e (commit)
via d3b57b6111e49f80c725bb85b0c7883008884309 (commit)
from 74b568d3b0ae82f853618e49c128c1258630b125 (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 116d6fd671641ecb7d1d491ef4798a0d1b5b48ac
Merge: 74b568d e2ab0a1
Author: Brett Smith <brett at curoverse.com>
Date: Tue Mar 3 10:10:10 2015 -0500
Merge branch '5313-node-manager-gce-fixups2-wip'
Refs #5313.
commit e2ab0a122f3b721a7663b61769f15713dbcf1a5e
Author: Brett Smith <brett at curoverse.com>
Date: Tue Mar 3 10:08:17 2015 -0500
5313: Rely more on datacenter constructor in Node Manager GCE driver.
When initialized with a datacenter argument, the GCE libcloud driver
acts a lot more like the EC2 one. Many listings are implicitly
limited to that zone, saving us the need of limiting searches
ourselves. Let's rely on libcloud instead of our own code.
diff --git a/services/nodemanager/arvnodeman/computenode/driver/gce.py b/services/nodemanager/arvnodeman/computenode/driver/gce.py
index 280de98..ccd1937 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/gce.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/gce.py
@@ -43,10 +43,6 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
return 'image', self.search_for(
image_name, 'list_images', self._name_key)
- def _init_location(self, location_name):
- return 'location', self.search_for(
- location_name, 'list_locations', self._name_key)
-
def _init_network(self, network_name):
return 'ex_network', self.search_for(
network_name, 'ex_list_networks', self._name_key)
@@ -61,10 +57,6 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
self.create_kwargs['ex_metadata']['sshKeys'] = (
'root:' + ssh_file.read().strip())
- def list_sizes(self):
- return super(ComputeNodeDriver, self).list_sizes(
- self.create_kwargs['location'])
-
def arvados_create_kwargs(self, arvados_node):
cluster_id, _, node_id = arvados_node['uuid'].split('-')
result = {'name': 'compute-{}-{}'.format(node_id, cluster_id),
diff --git a/services/nodemanager/doc/gce.example.cfg b/services/nodemanager/doc/gce.example.cfg
index 7e7813c..6770370 100644
--- a/services/nodemanager/doc/gce.example.cfg
+++ b/services/nodemanager/doc/gce.example.cfg
@@ -86,10 +86,12 @@ key = path_to_certificate.pem
project = project-id-from-google-cloud-dashboard
timeout = 60
+# Valid location (zone) names: https://cloud.google.com/compute/docs/zones
+datacenter = us-central1-a
+
# Optional settings. For full documentation see
# http://libcloud.readthedocs.org/en/latest/compute/drivers/gce.html#libcloud.compute.drivers.gce.GCENodeDriver
#
-# datacenter = us-central1-a
# auth_type = SA # SA, IA or GCE
# scopes = https://www.googleapis.com/auth/compute
# credential_file =
@@ -109,10 +111,7 @@ ping_host = hostname:port
# ssh_key = path
# The GCE image name and network zone name to use when creating new nodes.
-# * Valid image aliases: https://cloud.google.com/sdk/gcloud/reference/compute/instances/create
-# * Valid location (zone) names: https://cloud.google.com/compute/docs/zones
image = debian-7
-location = us-central1-a
# network = your_network_name
# JSON string of service account authorizations for this cluster.
diff --git a/services/nodemanager/tests/test_computenode_driver_gce.py b/services/nodemanager/tests/test_computenode_driver_gce.py
index 080c9bb..17114b6 100644
--- a/services/nodemanager/tests/test_computenode_driver_gce.py
+++ b/services/nodemanager/tests/test_computenode_driver_gce.py
@@ -27,15 +27,6 @@ class GCEComputeNodeDriverTestCase(testutil.DriverTestMixin, unittest.TestCase):
driver = self.new_driver(create_kwargs={'image': 'B'})
self.assertEqual(1, list_method.call_count)
- def test_list_sizes_requires_location_match(self):
- locations = [testutil.cloud_object_mock(name)
- for name in ['there', 'here', 'other']]
- self.driver_mock().list_locations.return_value = locations
- driver = self.new_driver(create_kwargs={'location': 'HERE'})
- driver.list_sizes()
- self.assertIs(locations[1],
- self.driver_mock().list_sizes.call_args[0][0])
-
def test_create_includes_ping_secret(self):
arv_node = testutil.arvados_node_mock(info={'ping_secret': 'ssshh'})
driver = self.new_driver()
commit d3b57b6111e49f80c725bb85b0c7883008884309
Author: Brett Smith <brett at curoverse.com>
Date: Tue Mar 3 10:06:24 2015 -0500
5313: Revert Node Manager's GCE boot disk destroy code.
After upgrading to libcloud>=0.16, it's redundant to create a node
with ex_disk_auto_delete=True, then destroy the node with
destory_boot_disk=True. During the destroy process, libcloud will
fail to destroy the boot disk, because Google has already deleted it.
ex_disk_auto_delete is closer to what we want, so just rely on that.
diff --git a/services/nodemanager/arvnodeman/computenode/driver/gce.py b/services/nodemanager/arvnodeman/computenode/driver/gce.py
index 689105c..280de98 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/gce.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/gce.py
@@ -84,10 +84,6 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
super(ComputeNodeDriver, self).list_nodes()
if self.node_tags.issubset(node.extra.get('tags', []))]
- def destroy_node(self, cloud_node):
- return super(ComputeNodeDriver, self).destroy_node(
- cloud_node, destroy_boot_disk=True)
-
@classmethod
def _find_metadata(cls, metadata_items, key):
# Given a list of two-item metadata dictonaries, return the one with
diff --git a/services/nodemanager/tests/test_computenode_driver_gce.py b/services/nodemanager/tests/test_computenode_driver_gce.py
index fbb0c82..080c9bb 100644
--- a/services/nodemanager/tests/test_computenode_driver_gce.py
+++ b/services/nodemanager/tests/test_computenode_driver_gce.py
@@ -73,12 +73,6 @@ class GCEComputeNodeDriverTestCase(testutil.DriverTestMixin, unittest.TestCase):
driver = self.new_driver(list_kwargs={'tags': 'good, great'})
self.assertItemsEqual(['5', '6'], [n.id for n in driver.list_nodes()])
- def test_destroy_node_destroys_disk(self):
- driver = self.new_driver()
- driver.destroy_node(testutil.cloud_node_mock())
- self.assertTrue(self.driver_mock().destroy_node.call_args[1].get(
- 'destroy_boot_disk'))
-
def build_gce_metadata(self, metadata_dict):
# Convert a plain metadata dictionary to the GCE data structure.
return {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list