Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare pillan cluster for EL8 #680

Merged
merged 2 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hieradata/cluster/pillan/osfamily/RedHat/major/8.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
network::interfaces_hash:
bond0:
macaddr: "%{facts.networking.interfaces.eno1np0.mac}"
# EL8+ "stable" interface names
eno1np0: &bond0 # fqdn 1/4
bootproto: "none"
Expand Down
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
31 changes: 28 additions & 3 deletions spec/hosts/nodes/pillan01.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
end

let(:facts) do
facts.merge(
fqdn: 'pillan01.tu.lsst.org',
)
override_facts(facts,
networking: { interfaces: { int1 => { mac: '11:22:33:44:55:66' } } },
fqdn: 'pillan01.tu.lsst.org')
end

let(:node_params) do
Expand All @@ -41,6 +41,31 @@

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface('bond0').with(
bonding_master: 'yes',
bonding_opts: 'mode=4 miimon=100',
bootproto: 'dhcp',
defroute: 'yes',
nozeroconf: 'yes',
onboot: 'yes',
type: 'Bond',
)
end

if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
# explicitly setting the bond mac address on EL7 might have no effect?
# We aren't changing the behavior for EL7 to avoid a network restart
# for legacy nodes.
it { is_expected.to contain_network__interface('bond0').without_macaddr }
else
it do
is_expected.to contain_network__interface('bond0').with(
macaddr: '11:22:33:44:55:66',
)
end
end

it do
is_expected.to contain_network__interface(int1).with(
bootproto: 'none',
Expand Down