Skip to content

Commit

Permalink
Sm-storage: change replica size, and call hdparm
Browse files Browse the repository at this point in the history
Change-Id: I7cc1485a3adda7d7eccfea5d4c6338cd8d82ec41
Closes-Bug:#1671701
  • Loading branch information
Dheeraj Gautam committed Mar 10, 2017
1 parent ce4071e commit f941d3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Expand Up @@ -166,6 +166,13 @@
inject => $inject_keys,
}

if $contrail_num_storage_hosts > 1 {
$contrail_storage_replica_size = 3
} else {
$contrail_storage_replica_size = 1
}


if 'storage-compute' in $contrail_host_roles {
if $contrail_storage_osd_disks != '' {
contrail::lib::storage_disk { $contrail_storage_osd_disks:}
Expand All @@ -175,7 +182,7 @@
$contrail_pool_map = join($pool_data, "', '")
$host_num_disk = size($contrail_storage_osd_disks)

ceph::pool {'internal': size => 1 } ->
ceph::pool {'internal': size => $contrail_storage_replica_size } ->
file { 'compute_pool_config' :
path => '/opt/contrail/bin/compute_pool_config.py',
content => template("${module_name}/compute-pool-config.erb"),
Expand Down Expand Up @@ -294,12 +301,6 @@
Exec['setup_storage_chassis_config']-> Exec['setup-config-storage-openstack']
}

if $contrail_num_storage_hosts > 1 {
$contrail_storage_replica_size = 2
} else {
$contrail_storage_replica_size = 1
}

$contrail_ceph_pg_num = 32 * $contrail_storage_num_osd
## if no disks on this host, don't run pools related stuf
ceph::pool{['data', 'metadata', 'rbd']:
Expand Down
Expand Up @@ -48,6 +48,11 @@
->
ceph::osd { $ready_disk_name:
require => Contrail::Lib::Prepare_disk[$ready_disk_name]
} ->
exec {"hdparm_$ready_disk_name":
command => "/sbin/hdparm -z ${disk_details[0]} || true",
provider => shell,
logoutput => true,
}
}
#contrail::lib::storage_disk {'/dev/sda':}
Expand Down

0 comments on commit f941d3f

Please sign in to comment.