Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 8.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-infiniband', '4.1.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-infiniband
Installs the InfiniBand software stack.
Support
- RedHat/CentOS 7
- RedHat/Rocky/Alma 8
Usage
infiniband
Standard usage to enable InfiniBand support
class { 'infiniband': }
Define a IBoIP interface
class { 'infiniband':
interfaces => {
'ib0' => {'ipaddr' => '192.168.1.1', 'netmask' => '255.255.255.0'}
}
}
Reference
http://treydock.github.io/puppet-infiniband/
Facts
has_infiniband
Determine if the system's hardware supports InfiniBand.
infiniband_fw_version
Reports the firmware version of the InfiniBand interface card.
NOTE: Only supports getting the value from the first interface card found.
infiniband_board_id
Returns the board_id (PSID) of the InfiniBand interface card.
NOTE: Only supports getting the value from the first interface card found.
infiniband_rate
Returns the rate of the InfiniBand interface card.
NOTE: Only supports getting the value from the first interface card found.
infiniband_hcas
Returns Array of HCAs:
[
"mlx5_0",
"mlx5_1",
"mlx5_2",
"mlx5_3"
]
infiniband_hca_board_id
Returns Hash of PSID / Board IDs for each HCA:
{
mlx5_0 => "MT_0000000023",
mlx5_1 => "MT_0000000023",
mlx5_2 => "MT_0000000023",
mlx5_3 => "MT_0000000023"
}
infiniband_hca_port_guids
Return Hash of HCA port GUIDs:
{
mlx5_0 => {
1 => "0x506b4b0300aaffcc"
},
mlx5_1 => {
1 => "0x506b4b0300aaffcd"
},
mlx5_2 => {
1 => "0x506b4b0300aaffc6"
},
mlx5_3 => {
1 => "0x506b4b0300aaffc7"
}
}
infiniband_netdevs
Return Hash of IPoIB netdev information:
{
ib0 => {
hca => "mlx5_0",
port => "1",
state => "ACTIVE",
rate => "100",
link_layer => "InfiniBand"
}
}
Reference
Table of Contents
Classes
Public Classes
infiniband
: Manage InfiniBand support
Private Classes
infiniband::config
: Manage InfiniBand configinfiniband::install
: Install InfiniBand supportinfiniband::params
: The infiniband default configuration settings.infiniband::providers
: Convenience class to call defined types provided by this module.infiniband::service
: Manage InfiniBand services
Defined types
infiniband::interface
: Manage IPoIB interface
Functions
infiniband::calc_log_num_mtt
: This function calculates the appropriate value for mlx4_core module'slog_num_mtt
parameter. The formula is `max_reg_mem = (2^log_num_mtt)
Classes
infiniband
Manage InfiniBand support
Examples
include ::infiniband
Parameters
The following parameters are available in the infiniband
class:
extra_packages
rdma_service_ensure
rdma_service_enable
rdma_service_name
rdma_service_has_status
rdma_service_has_restart
ibacm_service_ensure
ibacm_service_enable
ibacm_service_name
ibacm_service_has_status
ibacm_service_has_restart
rdma_conf_path
ipoib_load
srp_load
iser_load
rds_load
fixup_mtrr_regs
nfsordma_load
nfsordma_port
manage_mlx4_core_options
log_num_mtt
log_mtts_per_seg
interfaces
extra_packages
Data type: Array
The extra packges to install.
Default value: []
rdma_service_ensure
Data type: String
RDMA service ensure parameter.
Default to 'running' if has_infiniband
fact is 'true', and 'stopped' if 'has_infiniband' fact is 'false'.
Default value: $infiniband::params::service_ensure
rdma_service_enable
Data type: Boolean
RDMA service enable parameter.
Default to true if has_infiniband
fact is 'true', and false if 'has_infiniband' fact is 'false'.
Default value: $infiniband::params::service_enable
rdma_service_name
Data type: String
RDMA service name.
Default value: $infiniband::params::rdma_service_name
rdma_service_has_status
Data type: Boolean
RDMA service has_status parameter.
Default value: $infiniband::params::rdma_service_has_status
rdma_service_has_restart
Data type: Boolean
RDMA service has_restart parameter.
Default value: $infiniband::params::rdma_service_has_restart
ibacm_service_ensure
Data type: String
ibacm service ensure parameter.
Default to 'running' if has_infiniband
fact is 'true', and 'stopped' if 'has_infiniband' fact is 'false'.
Default value: $infiniband::params::service_ensure
ibacm_service_enable
Data type: Boolean
ibacm service enable parameter.
Default to true if has_infiniband
fact is 'true', and false if 'has_infiniband' fact is 'false'.
Default value: $infiniband::params::service_enable
ibacm_service_name
Data type: String
ibacm service name.
Default value: $infiniband::params::ibacm_service_name
ibacm_service_has_status
Data type: Boolean
ibacm service has_status parameter.
Default value: $infiniband::params::ibacm_service_has_status
ibacm_service_has_restart
Data type: Boolean
ibacm service has_restart parameter.
Default value: $infiniband::params::ibacm_service_has_restart
rdma_conf_path
Data type: Stdlib::Absolutepath
The RDMA service configuration path.
Default value: $infiniband::params::rdma_conf_path
ipoib_load
Data type: Enum['yes', 'no']
Sets the IPOIB_LOAD
setting for the RDMA service.
Default value: 'yes'
srp_load
Data type: Enum['yes', 'no']
Sets the SRP_LOAD
setting for the RDMA service.
Default value: 'no'
iser_load
Data type: Enum['yes', 'no']
Sets the ISER_LOAD
setting for the RDMA service.
Default value: 'no'
rds_load
Data type: Enum['yes', 'no']
Sets the RDS_LOAD
setting for the RDMA service.
Default value: 'no'
fixup_mtrr_regs
Data type: Enum['yes', 'no']
Sets the FIXUP_MTRR_REGS
setting for the RDMA service.
Default value: 'no'
nfsordma_load
Data type: Enum['yes', 'no']
Sets the NFSoRDMA_LOAD
setting for the RDMA service.
Default value: 'yes'
nfsordma_port
Data type: Integer[0, 65535]
Sets the NFSoRDMA_PORT
setting for the RDMA service.
Default value: 2050
manage_mlx4_core_options
Data type: Boolean
Boolean that determines if '/etc/modprobe.d/mlx4_core.conf' should be managed.
Default value: true
log_num_mtt
Data type: Optional[Integer]
Sets the mlx4_core module's 'log_num_mtt' value.
When the value is undef the value is determined using the calc_log_num_mtt
parser function.
Default value: undef
log_mtts_per_seg
Data type: Integer
Sets the mlx4_core module's 'log_mtts_per_seq' value.
Default value: 3
interfaces
Data type: Hash
This Hash can be used to define infiniband::interface
resources.
Default value: {}
Defined types
infiniband::interface
Manage IPoIB interface
Examples
Creates the ifcfg file for an IBoIP interface
infiniband::interface { 'ib0':
ipaddr => '192.168.1.1',
netmask => '255.255.255.0',
}
Parameters
The following parameters are available in the infiniband::interface
defined type:
name
ipaddr
netmask
gateway
ensure
enable
nm_controlled
connected_mode
mtu
bonding
bonding_slaves
bonding_opts
name
The resource title. Sets the interfaces name, for example 'ib0'.
ipaddr
Data type: Stdlib::Compat::Ip_address
The IPADDR for the infiniband interface.
netmask
Data type: Stdlib::Compat::Ip_address
The NETMASK for the infiniband interface.
gateway
Data type: Optional[Stdlib::Compat::Ip_address]
The GATEWAY for the infiniband interface.
Default value: undef
ensure
Data type: Enum['present', 'absent']
Sets if the infiniband::interface should be present or absent.
Default value: 'present'
enable
Data type: Boolean
Sets if the infiniband::interface should be enabled at boot.
Default value: true
nm_controlled
Data type: Optional[Variant[Boolean, Enum['yes','no']]]
Value for nm_controlled on interface
Default value: undef
connected_mode
Data type: Enum['yes', 'no']
The CONNECTED_MODE value for the infiniband interface.
Default value: 'yes'
mtu
Data type: Optional[Integer]
The MTU for the infiniband interface.
Default value: undef
bonding
Data type: Boolean
If this interface is a bonding interface (true/false); defaults to false
Default value: false
bonding_slaves
Data type: Array[String]
Array of interfaces that should be enslaved in the bonding interface
Default value: []
bonding_opts
Data type: String
The bonding options to use for this bonding interface
Default value: 'mode=active-backup miimon=100'
Functions
infiniband::calc_log_num_mtt
Type: Ruby 4.x API
This function calculates the appropriate value for mlx4_core module's log_num_mtt
parameter.
The formula is max_reg_mem = (2^log_num_mtt) * (2^log_mtts_per_seg) * (page_size_bytes)
. This function finds the
log_num_mtt necessary to make 'max_reg_mem' twice the size of system's RAM. Ref: http://community.mellanox.com/docs/DOC-1120.
Examples
Using system memory size to calculate value
infiniband::calc_log_num_mtt($facts['memory']['system']['total_bytes'])
infiniband::calc_log_num_mtt(Optional[Variant[Undef,Integer,Float]] $mem, Optional[Integer] $log_mtts_per_seg, Optional[Integer] $page_size_bytes)
This function calculates the appropriate value for mlx4_core module's log_num_mtt
parameter.
The formula is max_reg_mem = (2^log_num_mtt) * (2^log_mtts_per_seg) * (page_size_bytes)
. This function finds the
log_num_mtt necessary to make 'max_reg_mem' twice the size of system's RAM. Ref: http://community.mellanox.com/docs/DOC-1120.
Returns: Integer
The calculated log_num_mtt value
Examples
Using system memory size to calculate value
infiniband::calc_log_num_mtt($facts['memory']['system']['total_bytes'])
mem
Data type: Optional[Variant[Undef,Integer,Float]]
The system memory in bytes
log_mtts_per_seg
Data type: Optional[Integer]
The value for log_mtts_per_seg. Defaults to 3
if undefined.
page_size_bytes
Data type: Optional[Integer]
The system's page size in bytes. Defaults to 4096
if undefined.
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v4.1.0 (2022-08-22)
Added
- Replace CentOS 8 support with Rocky/AlmaLinux 8 #34 (treydock)
- Mirror puppet-module-mofed nm_controlled behavior #33 (pedmon)
v4.0.0 (2021-09-14)
Changed
Added
- Bump supported yum and stdlib module dependencies #31 (treydock)
- Support EL8 #30 (treydock)
- Bump dep augeasproviders shellvar #28 (mrolli)
v3.1.0 (2019-05-23)
Added
- Bump supported version of yum module #27 (treydock)
- Add convenient support for bonding IB interfaces #26 (mrolli)
- Add tests for new facts and rubocop fixes #24 (treydock)
- Convert to PDK #23 (treydock)
- Use Ruby function for calc_log_num_mtt #22 (treydock)
- Add initial support for multiple infiniband ports and a new fact for mapping network device names and related IB device information #21 (clevelas)
- Use puppet strings #20 (treydock)
3.0.0 (2019-04-26)
Changed
- BREAKING: Use example42/network module for infiniband interfaces #19 (treydock)
- BREAKING: Install packages via yum package group #17 (treydock)
Added
- Support only Puppet 5 and 6 and update module dependency ranges #18 (treydock)
- Add HCA facts #15 (treydock)
2.0.0 (2017-11-11)
Changed
1.3.0 (2017-11-09)
Added
Fixed
1.2.0 (2017-10-10)
Added
1.1.1 (2017-09-04)
Added
- infiniband.rb: Workaround for missing Facter::Util::FileRead. #7 (olifre)
- Addiitonal parameter MTU for ifcfg scripts. #4 (mrolli)
1.1.0 (2014-11-05)
1.0.0 (2014-10-16)
0.1.1 (2014-06-19)
0.1.0 (2014-05-22)
0.0.4 (2014-05-10)
0.0.3 (2014-05-09)
0.0.1 (2014-03-28)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.13.1 <8.0.0)
- herculesteam/augeasproviders_shellvar (>=2.0.0 <5.0.0)
- puppet/yum (>= 1.0.0 <6.0.0)
- example42/network (>= 3.0.0 <4.0.0)
Copyright (C) 2014 Trey Dockendorf <treydock@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.