summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-20 23:42:01 +0000
committerGerrit Code Review <review@openstack.org>2012-12-20 23:42:01 +0000
commit15528379fcd138cbb68f2522bb177d2aede73b10 (patch)
tree7ce2603a552edebbe7d373961719dd12b846ec63
parentb827dc2983b2604bb00d79f372c8a696370d83c8 (diff)
parent67d188cf4a9a61902ab7109b9a80b5b52dfa4d07 (diff)
downloadnova-15528379fcd138cbb68f2522bb177d2aede73b10.tar.gz
nova-15528379fcd138cbb68f2522bb177d2aede73b10.tar.xz
nova-15528379fcd138cbb68f2522bb177d2aede73b10.zip
Merge "Fix _find_ports() for when backdoor_port is None."
-rw-r--r--nova/api/openstack/compute/contrib/coverage_ext.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/coverage_ext.py b/nova/api/openstack/compute/contrib/coverage_ext.py
index 954eddf4c..98a067fc8 100644
--- a/nova/api/openstack/compute/contrib/coverage_ext.py
+++ b/nova/api/openstack/compute/contrib/coverage_ext.py
@@ -80,7 +80,16 @@ class CoverageController(object):
get_port_fn = apicommands[host['service']]
_host = host
_host['port'] = get_port_fn(context, host['host'])
- ports.append(_host)
+ #NOTE(mtreinish): if the port is None then it wasn't set in
+ # the configuration file for this service. However, that
+ # doesn't necessarily mean that we don't have backdoor ports
+ # for all the services. So, skip the telnet connection for
+ # this service.
+ if _host['port']:
+ ports.append(_host)
+ else:
+ LOG.warning(_("Can't connect to service: %s, no port"
+ "specified\n"), host['service'])
else:
LOG.debug(_("No backdoor API command for service: %s\n"), host)
return ports