diff options
author | Matthew Treinish <treinish@linux.vnet.ibm.com> | 2012-12-20 14:32:13 -0500 |
---|---|---|
committer | Matthew Treinish <treinish@linux.vnet.ibm.com> | 2012-12-20 14:37:04 -0500 |
commit | 67d188cf4a9a61902ab7109b9a80b5b52dfa4d07 (patch) | |
tree | 54ede4b94e0dfb1c584da7c21b944a96dc7deb7c | |
parent | 59206947af095cbeadde27a88a40eb4fec266948 (diff) | |
download | nova-67d188cf4a9a61902ab7109b9a80b5b52dfa4d07.tar.gz nova-67d188cf4a9a61902ab7109b9a80b5b52dfa4d07.tar.xz nova-67d188cf4a9a61902ab7109b9a80b5b52dfa4d07.zip |
Fix _find_ports() for when backdoor_port is None.
For the case when backdoor_port is None for a service, then the
backdoor_port configuration option was not set for that service.
Instead of failing for this case, just skip establishing a backdoor
connection to services without a backdoor_port, and move on to the
other services.
Change-Id: I0fad967f94b9d9928e9134fe5901d5e256b6ab69
-rw-r--r-- | nova/api/openstack/compute/contrib/coverage_ext.py | 11 |
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 |