c334bf2a14
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>
29 lines
740 B
Puppet
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],
|
|
}
|
|
|
|
}
|
|
|