diff options
-rwxr-xr-x | plugins/discovery.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/discovery.py b/plugins/discovery.py index e236842..90a9e50 100755 --- a/plugins/discovery.py +++ b/plugins/discovery.py @@ -490,10 +490,12 @@ def _getHostGroupNames(hostConfig): def _findDuplicateHost(hosts, clusterName): for host in hosts: - hostConfig = server_utils.getHostConfigByName(host.get('hostname')) - if hostConfig: - if clusterName not in _getHostGroupNames(hostConfig): - return host.get('hostname') + #Host name may be empty if the host is in disconnected status + if host.get('hostname'): + hostConfig = server_utils.getHostConfigByName(host.get('hostname')) + if hostConfig: + if clusterName not in _getHostGroupNames(hostConfig): + return host.get('hostname') def getRemovedHostsCount(clusterDelta): |