From: Scott Baker Date: Tue, 23 Sep 2014 00:17:08 +0000 (-0700) Subject: Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=bf49e81efc66b5852403e535c82f3ce0f87f1608;hp=db224395546e450675daa758c781ec9f3ad2993d Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi --- diff --git a/planetstack/openstack_observer/steps/sync_nodes.py b/planetstack/openstack_observer/steps/sync_nodes.py index d648b7d..1c1096c 100644 --- a/planetstack/openstack_observer/steps/sync_nodes.py +++ b/planetstack/openstack_observer/steps/sync_nodes.py @@ -38,11 +38,12 @@ class SyncNodes(OpenStackSyncStep): continue for compute_node in compute_nodes: - if compute_node.hypervisor_hostname not in node_hostnames: + hostname = compute_node.hypervisor_hostname.lower() + if hostname not in node_hostnames: # XX TODO:figure out how to correctly identify a node's site. # XX pick a random site to add the node to for now site_index = random.randint(0, len(sites)) - node = Node(name=compute_node.hypervisor_hostname, + node = Node(name=hostname, site=sites[site_index], deployment=deployment) new_nodes.append(node)