-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(node/auxtel-fp01.cp) add el9 network config & tests
- Loading branch information
Showing
2 changed files
with
176 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'auxtel-fp01.cp.lsst.org', :sitepp do | ||
on_supported_os.each do |os, os_facts| | ||
next unless os =~ %r{almalinux-9-x86_64} | ||
|
||
context "on #{os}" do | ||
let(:facts) do | ||
override_facts(os_facts, | ||
fqdn: 'auxtel-fp01.cp.lsst.org', | ||
is_virtual: false, | ||
virtual: 'physical', | ||
dmi: { | ||
'product' => { | ||
'name' => 'PowerEdge R630', | ||
}, | ||
}) | ||
end | ||
let(:node_params) do | ||
{ | ||
role: 'atsdaq', | ||
cluster: 'auxtel-ccs', | ||
site: 'cp', | ||
} | ||
end | ||
|
||
it { is_expected.to compile.with_all_deps } | ||
|
||
include_examples 'baremetal' | ||
include_context 'with nm interface' | ||
|
||
it { is_expected.to have_nm__connection_resource_count(5) } | ||
|
||
context 'with eno1' do | ||
let(:interface) { 'eno1' } | ||
|
||
it_behaves_like 'nm enabled interface' | ||
it_behaves_like 'nm ethernet interface' | ||
it_behaves_like 'nm bridge slave interface', master: 'lsst-daq' | ||
it { expect(nm_keyfile['ethtool']['ring-rx']).to eq(4096) } | ||
it { expect(nm_keyfile['ethtool']['ring-tx']).to eq(4096) } | ||
end | ||
|
||
context 'with lsst-daq' do | ||
let(:interface) { 'lsst-daq' } | ||
|
||
it_behaves_like 'nm enabled interface' | ||
it_behaves_like 'nm bridge interface' | ||
it_behaves_like 'nm manual interface' | ||
it { expect(nm_keyfile['ipv4']['address1']).to eq('192.168.100.251/24') } | ||
end | ||
|
||
context 'with eno2' do | ||
let(:interface) { 'eno2' } | ||
|
||
it_behaves_like 'nm enabled interface' | ||
it_behaves_like 'nm ethernet interface' | ||
it_behaves_like 'nm manual interface' | ||
it_behaves_like 'nm no default route' | ||
it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.170.32/24,139.229.170.254') } | ||
it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.160.53;139.229.160.54;139.229.160.55;') } | ||
it { expect(nm_keyfile['ipv4']['dns-search']).to eq('cp.lsst.org;') } | ||
it { expect(nm_keyfile['ipv4']['route1']).to eq('139.229.147.0/24,139.229.170.254') } | ||
it { expect(nm_keyfile['ipv4']['route2']).to eq('139.229.166.0/24,139.229.170.254') } | ||
it { expect(nm_keyfile['ipv4']['route3']).to eq('139.229.167.0/24,139.229.170.254') } | ||
it { expect(nm_keyfile['ipv4']['route4']).to eq('139.229.178.0/24,139.229.170.254') } | ||
end | ||
|
||
context 'with eno3' do | ||
let(:interface) { 'eno3' } | ||
|
||
it_behaves_like 'nm disabled interface' | ||
end | ||
|
||
context 'with eno4' do | ||
let(:interface) { 'eno4' } | ||
|
||
it_behaves_like 'nm enabled interface' | ||
it_behaves_like 'nm dhcp interface' | ||
it_behaves_like 'nm ethernet interface' | ||
end | ||
|
||
it { is_expected.to contain_class('nfs::server').with_nfs_v4(true) } | ||
it { is_expected.to contain_nfs__server__export('/data') } | ||
|
||
it do | ||
is_expected.to contain_nfs__client__mount('/net/self/data').with( | ||
share: 'data', | ||
server: 'auxtel-fp01.cp.lsst.org', | ||
atboot: true, | ||
) | ||
end | ||
end | ||
end # on os | ||
end # on_supported_os |