Skip to content

Commit

Permalink
(node/auxtel-daq-mgt.cp) add el9 network config and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed Nov 12, 2024
1 parent 99077ca commit 96d0193
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 46 deletions.
125 changes: 96 additions & 29 deletions hieradata/node/auxtel-daq-mgt.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,100 @@
---
network::interfaces_hash:
em1: # fqdn
bootproto: "dhcp"
defroute: "yes"
onboot: "yes"
type: "Ethernet"
em2: # 192.168.101.0/24
bootproto: "none"
ipaddress: "192.168.101.1"
netmask: "255.255.255.0"
onboot: "yes"
type: "Ethernet"
# 2020-12-01 -- this interface is currently down and @gregg and @josh don't
# know its purpose. This is possibly left over from a test and can be removed.2
em3: # 192.168.102.0/24
bootproto: "none"
ipaddress: "192.168.102.1"
netmask: "255.255.255.0"
onboot: "yes"
type: "Ethernet"
em4: # not connected
bootproto: "none"
onboot: "no"
type: "Ethernet"
# p3p1 -> lsst-daq -- 192.168.100.0/24
p3p2: # not connected
bootproto: "none"
onboot: "no"
type: "Ethernet"
nm::connections:
eno1: #fqdn
content:
connection:
id: "eno1"
uuid: "dc8a3070-077e-39f1-a6d3-59168a33cc0a"
type: "ethernet"
interface-name: "eno1"
ethernet: {}
ipv4:
method: "auto"
ipv6:
method: "disabled"
proxy: {}
eno2: # 192.168.101.0/24 Shelf-Manager Interface
content:
connection:
id: "eno2"
uuid: "1a3fe7f5-ec03-3ea0-899c-d2fa430cdae3"
type: "ethernet"
interface-name: "eno2"
ethernet: {}
ipv4:
address1: "192.168.101.1/24"
method: "manual"
ipv6:
method: "disabled"
eno3:
content:
connection:
id: "eno3"
uuid: "927d93a1-605c-3126-b6c5-ae9c921bd13e"
type: "ethernet"
autoconnect: "false"
interface-name: "eno3"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"
eno4:
content:
connection:
id: "eno4"
uuid: "e68e1752-ac7e-3569-ac8d-aaeb37f0beb9"
type: "ethernet"
autoconnect: "false"
interface-name: "eno4"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"
enp4s0f0: # lsst-daq interface
content:
connection:
id: "enp4s0f0"
uuid: "d103921c-aea8-3d39-ba5a-91378f7ca47d"
type: "ethernet"
interface-name: "enp4s0f0"
master: "lsst-daq"
slave-type: "bridge"
ethernet: {}
ethtool:
ring-rx: "4096"
ring-tx: "4096"
bridge-port: {}
lsst-daq:
content:
connection:
id: "lsst-daq"
uuid: "d5642f16-7bf7-7d4d-de5a-25e7d7c355a4"
type: "bridge"
interface-name: "lsst-daq"
ethernet: {}
bridge:
stp: "false"
ipv4:
address1: "192.168.100.1/24"
method: "manual"
ipv6:
method: "disabled"
proxy: {}
enp4s0f1:
content:
connection:
id: "enp4s0f1"
uuid: "543d45bb-26a4-327c-89e7-92c2450905e0"
type: "ethernet"
autoconnect: "false"
interface-name: "enp4s0f1"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"

hosts::entries:
auxtel-sm:
Expand Down
71 changes: 54 additions & 17 deletions spec/hosts/nodes/auxtel-daq-mgt-cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe 'auxtel-daq-mgt.cp.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next unless os =~ %r{centos-7-x86_64}
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:facts) do
Expand All @@ -27,24 +27,61 @@
it { is_expected.to compile.with_all_deps }

include_examples 'baremetal'
include_examples 'daq nfs exports'

it { is_expected.to contain_class('daq::daqsdk') }
it { is_expected.to contain_class('daq::rptsdk').with_version('V3.5.3') }
include_context 'with nm interface'
it { is_expected.to contain_host('auxtel-sm').with_ip('192.168.101.2') }
it { is_expected.to contain_network__interface('p3p1').with_ensure('absent') }

it do
is_expected.to contain_network__interface('em2').with(
bootproto: 'none',
# defroute: 'no',
ipaddress: '192.168.101.1',
# ipv6init: 'no',
netmask: '255.255.255.0',
onboot: 'yes',
type: 'Ethernet'
)
it { is_expected.to have_nm__connection_resource_count(7) }

%w[
eno3
eno4
enp4s0f1
].each do |i|
context "with #{i}" do
let(:interface) { i }

it_behaves_like 'nm disabled interface'
end
end

context 'with eno1' do
let(:interface) { 'eno1' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm dhcp interface'
it_behaves_like 'nm ethernet interface'
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 { expect(nm_keyfile['ipv4']['address1']).to eq('192.168.101.1/24') }
end

context 'with enp4s0f0' do
let(:interface) { 'enp4s0f0' }

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.1/24') }
end

it { is_expected.to contain_class('nfs::server').with_nfs_v4(false) }
it { is_expected.to contain_nfs__server__export('/srv/nfs/dsl') }
it { is_expected.to contain_nfs__server__export('/srv/nfs/lsst-daq') }
end # on os
end # on_supported_os
end

0 comments on commit 96d0193

Please sign in to comment.