Replace fuel_version comparison with specifig flag
To avoid bugs between different fuel versions Change-Id: Idcbc62dfafea3ee6f1c041dee59a4afe9c87c2a6
This commit is contained in:
parent
69ca86e05b
commit
65dd97dc90
|
@ -159,8 +159,8 @@ if $scaleio['metadata']['enabled'] {
|
|||
$all_nodes = hiera('nodes')
|
||||
# primary controller configures cluster
|
||||
if ! empty(filter_nodes(filter_nodes($all_nodes, 'name', $::hostname), 'role', 'primary-controller')) {
|
||||
$fuel_version = hiera('fuel_version')
|
||||
if $fuel_version <= '8.0' {
|
||||
$use_plugin_roles = $scaleio['enable_sds_role']
|
||||
if ! $use_plugin_roles {
|
||||
$storage_nodes = filter_nodes($all_nodes, 'role', 'compute')
|
||||
if $scaleio['sds_on_controller'] {
|
||||
$controller_nodes = filter_nodes($all_nodes, 'role', 'controller')
|
||||
|
|
|
@ -82,8 +82,8 @@ if $scaleio['metadata']['enabled'] {
|
|||
$ctrl_ips = join($controller_ips_array, ',')
|
||||
notify{"ScaleIO cluster: ctrl_ips=${ctrl_ips}": }
|
||||
# Check SDS count
|
||||
$fuel_version = hiera('fuel_version')
|
||||
if $fuel_version <= '8.0' {
|
||||
$use_plugin_roles = $scaleio['enable_sds_role']
|
||||
if ! $use_plugin_roles {
|
||||
$controller_sds_count = $scaleio['sds_on_controller'] ? {
|
||||
true => count($controller_ips_array),
|
||||
default => 0
|
||||
|
|
|
@ -13,8 +13,7 @@ define sds_device_cleanup() {
|
|||
$scaleio = hiera('scaleio')
|
||||
if $scaleio['metadata']['enabled'] {
|
||||
if ! $scaleio['existing_cluster'] {
|
||||
$fuel_version = hiera('fuel_version')
|
||||
$use_plugin_roles = $fuel_version > '8.0'
|
||||
$use_plugin_roles = $scaleio['enable_sds_role']
|
||||
if ! $use_plugin_roles {
|
||||
#it is supposed that task is run on compute or controller
|
||||
$node_ips = split($::ip_address_array, ',')
|
||||
|
|
|
@ -14,7 +14,7 @@ if File.exists?($astute_config)
|
|||
setcode do
|
||||
result = nil
|
||||
config = YAML.load_file($astute_config)
|
||||
if config and config.key('fuel_version') and config.key('fuel_version') > '8.0'
|
||||
if config and config.key('scaleio') and config['scaleio'].key('enable_sds_role')
|
||||
galera_host = config['management_vip']
|
||||
mysql_opts = config['mysql']
|
||||
password = mysql_opts['root_password']
|
||||
|
|
|
@ -3,6 +3,16 @@ attributes:
|
|||
# Settings group can be one of "general", "security", "compute", "network",
|
||||
# "storage", "logging", "openstack_services" and "other".
|
||||
group: 'storage'
|
||||
|
||||
enable_sds_role:
|
||||
type: "checkbox"
|
||||
value: false
|
||||
label: "Use ScaleIO SDS role."
|
||||
description: "Enables role based deployment."
|
||||
weight: 5
|
||||
restrictions:
|
||||
- condition: "true"
|
||||
action: hide
|
||||
|
||||
existing_cluster:
|
||||
type: "checkbox"
|
||||
|
@ -96,7 +106,7 @@ attributes:
|
|||
source: '^(\w+){1}((,){1}(?=\w+))*'
|
||||
error: "Can contain characters, numbers and underlines"
|
||||
restrictions:
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or cluster:fuel_version == '10.0'"
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or settings:scaleio.enable_sds_role.value == true"
|
||||
action: hide
|
||||
|
||||
existing_storage_pools:
|
||||
|
@ -122,7 +132,7 @@ attributes:
|
|||
source: '^(/[a-zA-Z0-9:-_]+)+(,(/[a-zA-Z0-9:-_]+)+)*$'
|
||||
error: 'List of path is incorrect. It is comma separated list aka /dev/sdb,/dev/sdc'
|
||||
restrictions:
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or cluster:fuel_version == '10.0'"
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or settings:scaleio.enable_sds_role.value == true"
|
||||
action: hide
|
||||
|
||||
sds_on_controller:
|
||||
|
@ -132,7 +142,7 @@ attributes:
|
|||
description: "Setup SDS-es on controller nodes."
|
||||
weight: 105
|
||||
restrictions:
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or cluster:fuel_version == '10.0'"
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or settings:scaleio.enable_sds_role.value == true"
|
||||
action: hide
|
||||
|
||||
provisioning_type:
|
||||
|
@ -208,7 +218,7 @@ attributes:
|
|||
source: '^(/[a-zA-Z0-9:-_]+)*(,(/[a-zA-Z0-9:-_]+)+)*$'
|
||||
error: 'List of path is incorrect. It could be either empty or the comma separated list e.g. /dev/sdb,/dev/sdc'
|
||||
restrictions:
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or cluster:fuel_version == '10.0'"
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or settings:scaleio.enable_sds_role.value == true"
|
||||
action: hide
|
||||
|
||||
cached_storage_pools:
|
||||
|
@ -221,7 +231,7 @@ attributes:
|
|||
source: '^(\w+)*((,){1}(?=\w+))*'
|
||||
error: 'List of storage pools incorrect. It could be either empty or the comma separated list e.g. pool1,pool2'
|
||||
restrictions:
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or cluster:fuel_version == '10.0'"
|
||||
- condition: "settings:scaleio.existing_cluster.value == true or settings:scaleio.enable_sds_role.value == true"
|
||||
action: hide
|
||||
|
||||
capacity_high_alert_threshold:
|
||||
|
|
Loading…
Reference in New Issue