Skip to content

Commit

Permalink
(profile::core::hardware) restrict nvme aspm related flags to EL7
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Nov 7, 2022
1 parent 826d1dd commit d5db790
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
18 changes: 11 additions & 7 deletions site/profile/manifests/core/hardware.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
}
/1114S-WN10RT/: {
include ipmi
# aspm is suspected of causing problems with internal NVMes
include profile::core::kernel::pcie_aspm
# apst is suspected of causing problems with NVMes
include profile::core::kernel::nvme_apst
# attempt to improve NVMe hotplug support on el7
profile::util::kernel_param { 'pci=pcie_bus_perf':
reboot => false,

# EL7 only
if fact('os.family') == 'RedHat' and fact('os.release.major') == '7' {
# aspm is suspected of causing problems with internal NVMes
include profile::core::kernel::pcie_aspm
# apst is suspected of causing problems with NVMes
include profile::core::kernel::nvme_apst
# attempt to improve NVMe hotplug support on el7
profile::util::kernel_param { 'pci=pcie_bus_perf':
reboot => false,
}
}
}
}
Expand Down
18 changes: 12 additions & 6 deletions spec/classes/core/hardware_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,19 @@

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('ipmi') }
it { is_expected.not_to contain_class('profile::core::perccli') }
it { is_expected.to contain_class('profile::core::kernel::pcie_aspm') }
it { is_expected.to contain_class('profile::core::kernel::nvme_apst') }

it do
is_expected.to contain_profile__util__kernel_param('pci=pcie_bus_perf')
.with_reboot(false)
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
it { is_expected.to contain_class('profile::core::kernel::pcie_aspm') }
it { is_expected.to contain_class('profile::core::kernel::nvme_apst') }

it do
is_expected.to contain_profile__util__kernel_param('pci=pcie_bus_perf')
.with_reboot(false)
end
else
it { is_expected.not_to contain_class('profile::core::kernel::pcie_aspm') }
it { is_expected.not_to contain_class('profile::core::kernel::nvme_apst') }
it { is_expected.not_to contain_profile__util__kernel_param('pci=pcie_bus_perf') }
end
end # 1114S-WN10RT

Expand Down

0 comments on commit d5db790

Please sign in to comment.