From 6070c15791a24f4bafaed2414c5713ef07accd81 Mon Sep 17 00:00:00 2001 From: alexey-mr Date: Sat, 13 Aug 2016 12:04:16 +0300 Subject: [PATCH] Use default protection domain in nova according to SDS. Each compute node is SDS. So, to balance ephemeral volumes between domains it is needed to use default domain according to assigned domain to the node. Change-Id: I5b7eddd276bda42250ce8c26f6d3510e886a8e13 --- deployment_scripts/puppet/manifests/nova.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deployment_scripts/puppet/manifests/nova.pp b/deployment_scripts/puppet/manifests/nova.pp index 02521fd..b34e612 100644 --- a/deployment_scripts/puppet/manifests/nova.pp +++ b/deployment_scripts/puppet/manifests/nova.pp @@ -25,13 +25,23 @@ if $scaleio['metadata']['enabled'] { $client_password_str = base64('encode', pw_hash($password, 'SHA-512', 'scaleio.client.access')) $client_password = inline_template('Sio-<%= @client_password_str[33..40] %>-<%= @client_password_str[41..48] %>') } + if $::scaleio_sds_with_protection_domain_list and $::scaleio_sds_with_protection_domain_list != '' { + $scaleio_sds_to_pd_map = hash(split($::scaleio_sds_with_protection_domain_list, ',')) + } else { + $scaleio_sds_to_pd_map = {} + } + if $::hostname in $scaleio_sds_to_pd_map { + $pd_name = $scaleio_sds_to_pd_map[$::hostname] + } else { + $pd_name = $scaleio['protection_domain'] + } class {'::scaleio_openstack::nova': ensure => present, gateway_user => $::gateway_user, gateway_password => $client_password, gateway_ip => $gateway_ip, gateway_port => $::gateway_port, - protection_domains => $scaleio['protection_domain'], + protection_domains => $pd_name, storage_pools => $::storage_pools, provisioning_type => $provisioning_type, }