fuel-library/deployment/puppet/mellanox_openstack/manifests/iser_rename.pp
Aviram Bar-Haim c334bf2a14 Adding virtual port renaming in case of iSER
Due to RDMA requirement, storage port is changed to a virtual
port on the hypervisor in case of choosing iSER.

The virtual port is renamed to a predefined name that has
already been serialized to astute.yaml network scheme.

This change includes:
  1. Adding a call to a the bash script from stage zero in site.pp
     OS_common class, in case of choosing iSER.
  2. Adding a template of the bash script to a new empty puppet module
     that will include Mellanox manifests.
  3. Adding iser_rename manifest to call the bash script in stage zero.

partially implements: blueprint mellanox-features-support

Change-Id: I2828427e096245408fa536904ea9cece39256ef0
Signed-off-by: Aviram Bar-Haim <aviramb@mellanox.com>
2014-07-17 17:33:48 +03:00

29 lines
740 B
Puppet

class mellanox_openstack::iser_rename ($storage_parent, $iser_interface_name){
$interfaces_path = '/sys/class/net/'
$iser_script_dir = '/opt/iser'
$iser_rename_script = "$iser_script_dir/iser_rename.sh"
file { $iser_script_dir:
ensure => directory,
}
file { $iser_rename_script:
ensure => file,
owner => 'root',
group => 'root',
mode => '500',
content => template('mellanox_openstack/iser_rename.erb'),
}
exec { 'iser_rename':
command => "bash $iser_rename_script",
unless => "test -f $interfaces_path/$iser_interface_name",
path => ['/usr/bin','/usr/sbin','/bin','/sbin','/usr/local/bin'],
logoutput => true,
require => File[$iser_rename_script],
}
}