Fixed bug in SIO gateway configuration

Change-Id: Ib2f9cfbd82720051d3e0c722f13ff45a8fe6aed4
This commit is contained in:
Adrian Moreno 2015-11-18 09:26:54 -08:00
parent 5da78e492b
commit 7edcc84aa9
5 changed files with 42 additions and 36 deletions

@ -1 +1 @@
Subproject commit 876d33ab14c37527d0e164f228b1d74106fc840b
Subproject commit 45ec7c75f060200cc726f6498b59c2fc5f8c7b43

View File

@ -6,21 +6,18 @@ module Puppet::Parser::Functions
protection_domain = args[2]
pool_size = args[3]
storage_pool = args[4]
gw_ip = args[5]
nodes.each do |node|
if node["internal_address"] != gw_ip
result[node["fqdn"]] = {
"ip" => node["internal_address"],
"protection_domain" => protection_domain,
"devices" => {
device => {
"size" => pool_size,
"storage_pool" => storage_pool
}
result[node["fqdn"]] = {
"ip" => node["internal_address"],
"protection_domain" => protection_domain,
"devices" => {
device => {
"size" => pool_size,
"storage_pool" => storage_pool
}
}
end
}
end
return result
end

View File

@ -1,7 +1,12 @@
class scaleio_fuel::controller
inherits scaleio_fuel::params {
notice("Configuring Controller node for ScaleIO integration")
$mdm_ip = $scaleio_fuel::params::mdm_ip
$gw_password = $scaleio_fuel::params::gw_password
$protection_domain = $scaleio_fuel::params::protection_domain
$storage_pool = $scaleio_fuel::params::storage_pool
notice('Configuring Controller node for ScaleIO integration')
$services = ['openstack-cinder-volume', 'openstack-cinder-api', 'openstack-cinder-scheduler', 'openstack-nova-scheduler']
@ -25,12 +30,12 @@ inherits scaleio_fuel::params {
# 3. Create config for ScaleIO
$cinder_scaleio_config = "[scaleio]
rest_server_ip=$gw_ip
rest_server_ip=${mdm_ip[0]}
rest_server_username=admin
rest_server_password=$gw_password
protection_domain_name=$protection_domain
storage_pools=$protection_domain:$storage_pool
storage_pool_name=$storage_pool
rest_server_password=${gw_password}
protection_domain_name=${protection_domain}
storage_pools=${protection_domain}:${storage_pool}
storage_pool_name=${storage_pool}
round_volume_capacity=True
force_delete=True
verify_server_certificate=False
@ -80,13 +85,14 @@ verify_server_certificate=False
section => 'ScaleIO',
setting => 'volume_backend_name',
value => 'ScaleIO',
}~>
} ~>
service { $services:
ensure => running,
} ->
class {'scaleio_fuel::ha':
controllers => $controller_nodes,
}
# ->
#
# class {'scaleio_fuel::ha':
# controllers => $controller_nodes,
# }
}

View File

@ -32,7 +32,8 @@ class scaleio_fuel::params
$tb_ip = $controller_ips[2]
$current_node = filter_nodes($nodes_hash,'uid', $::fuel_settings['uid'])
$node_ip = join(values(nodes_to_hash($current_node,'name','internal_address')))
$node_ip = join(values(
nodes_to_hash($current_node,'name','internal_address')))
notice("Current Node: ${current_node}")
@ -52,21 +53,23 @@ class scaleio_fuel::params
notice("Node role: ${role}, IP: ${node_ip}, FQDN: ${::fqdn}")
$sio_sds_device = get_sds_devices($nodes_hash, $device, $protection_domain, $pool_size, $storage_pool, $gw_ip)
$sio_sds_device = get_sds_devices(
$nodes_hash, $device, $protection_domain,
$pool_size, $storage_pool)
notice("sio_sds_device: ${sio_sds_device}")
#TODO: Get callhome information from UI
$callhome_cfg = {
'email_to' => "emailto@address.com",
'email_from' => "emailfrom@address.com",
'username' => "monitor_username",
'password' => "monitor_password",
'customer' => "customer_name",
'smtp_host' => "smtp_host",
'smtp_port' => "smtp_port",
'smtp_user' => "smtp_user",
'smtp_password' => "smtp_password",
'severity' => "error",
'email_to' => 'emailto@address.com',
'email_from' => 'emailfrom@address.com',
'username' => 'monitor_username',
'password' => 'monitor_password',
'customer' => 'customer_name',
'smtp_host' => 'smtp_host',
'smtp_port' => 'smtp_port',
'smtp_user' => 'smtp_user',
'smtp_password' => 'smtp_password',
'severity' => 'error',
}
}

View File

@ -3,7 +3,7 @@ name: scaleio
# Human-readable name for your plugin
title: Fuel plugin for ScaleIO
# Plugin version
version: '0.2.3'
version: '0.2.4'
# Description
description: Enable ScaleIO as a storage backend
# Required fuel version