summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-08-21 19:40:35 +0000
committerGerrit Code Review <review@openstack.org>2014-08-21 19:40:35 +0000
commitf8af69ab0aa2633406a2403ea6b4acd05c0ade2e (patch)
treefb6a0c957864e2e1033642d10be7bcad132dc9e2
parent8f0e58aff9d5e52e0567910738d685ccc2dc7b52 (diff)
parent8c4049c882a9396db7bbca1190d5e1599d46617b (diff)
downloadnova-f8af69ab0aa2633406a2403ea6b4acd05c0ade2e.tar.gz
Merge "Fixes hyper-v volume attach when host is AD member" into stable/havana
-rw-r--r--nova/virt/hyperv/basevolumeutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/virt/hyperv/basevolumeutils.py b/nova/virt/hyperv/basevolumeutils.py
index ff8e6722f2..47cda5f118 100644
--- a/nova/virt/hyperv/basevolumeutils.py
+++ b/nova/virt/hyperv/basevolumeutils.py
@@ -71,8 +71,9 @@ class BaseVolumeUtils(object):
except Exception:
LOG.info(_("The ISCSI initiator name can't be found. "
"Choosing the default one"))
- computer_system = self._conn_cimv2.Win32_ComputerSystem()[0]
initiator_name = "iqn.1991-05.com.microsoft:" + hostname.lower()
+ if computer_system.PartofDomain:
+ initiator_name += '.' + computer_system.Domain.lower()
return initiator_name
def volume_in_mapping(self, mount_device, block_device_info):