mirror of https://github.com/apache/cloudstack.git
instead of adding zone wide primary storage in the cluster block,
added it in the zone block.
CLOUDSTACK-8229
Testing: tested with KVM and zone deployment was fine.
In the config file, zone wide primary storage details looks like this:
"primaryStorages": [
{
"url": "nfs://10.147.28.7/export/home/talluri/primary1",
"XRT_PriStorageType": "NFS",
"name": "XenRT-Zone-0-Pod-0-Cluster-0-Primary-Store-0",
"hypervisor": "KVM",
"scope" : "zone"
}
],
reviewed-by: talluri
This commit is contained in:
parent
446e08d25d
commit
9c381a21c4
|
|
@ -196,8 +196,7 @@ class DeployDataCenters(object):
|
|||
self.createPrimaryStorages(cluster.primaryStorages,
|
||||
zoneId,
|
||||
podId,
|
||||
clusterId,
|
||||
cluster.hypervisor)
|
||||
clusterId)
|
||||
except Exception as e:
|
||||
print "Exception Occurred %s" % GetDetailExceptionInfo(e)
|
||||
self.__tcRunLogger.exception("====Cluster %s Creation Failed"
|
||||
|
|
@ -230,9 +229,8 @@ class DeployDataCenters(object):
|
|||
def createPrimaryStorages(self,
|
||||
primaryStorages,
|
||||
zoneId,
|
||||
podId,
|
||||
clusterId,
|
||||
hypervisor):
|
||||
podId=None,
|
||||
clusterId=None):
|
||||
try:
|
||||
if primaryStorages is None:
|
||||
return
|
||||
|
|
@ -242,13 +240,14 @@ class DeployDataCenters(object):
|
|||
for key, value in vars(primary.details).iteritems():
|
||||
primarycmd.details.append({ key: value})
|
||||
primarycmd.name = primary.name
|
||||
primarycmd.podid = podId
|
||||
|
||||
primarycmd.tags = primary.tags
|
||||
primarycmd.url = primary.url
|
||||
if primary.scope == 'zone':
|
||||
primarycmd.scope = primary.scope
|
||||
primarycmd.hypervisor = hypervisor
|
||||
primarycmd.hypervisor = primary.hypervisor
|
||||
else:
|
||||
primarycmd.podid = podId
|
||||
primarycmd.clusterid = clusterId
|
||||
primarycmd.zoneid = zoneId
|
||||
|
||||
|
|
@ -786,6 +785,11 @@ class DeployDataCenters(object):
|
|||
'''Note: Swift needs cache storage first'''
|
||||
self.createCacheStorages(zone.cacheStorages, zoneId)
|
||||
self.createSecondaryStorages(zone.secondaryStorages, zoneId)
|
||||
#add zone wide primary storages if any
|
||||
if zone.primaryStorages:
|
||||
self.createPrimaryStorages(zone.primaryStorages,
|
||||
zoneId,
|
||||
)
|
||||
enabled = getattr(zone, 'enabled', 'True')
|
||||
if enabled == 'True' or enabled is None:
|
||||
self.enableZone(zoneId, "Enabled")
|
||||
|
|
|
|||
Loading…
Reference in New Issue