Skip to content

Commit

Permalink
(node/auxtel-fp01.cp) add el9 network config & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed Nov 5, 2024
1 parent 4e7a389 commit ab9a3a1
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 31 deletions.
110 changes: 79 additions & 31 deletions hieradata/node/auxtel-fp01.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,85 @@
---
network::interfaces_hash:
em2: # dds-auxtel
bootproto: "dhcp"
defroute: "no"
nozeroconf: "yes"
onboot: "yes"
type: "Ethernet"
em3: # not connected
bootproto: "none"
onboot: "no"
type: "Ethernet"
em4: # fqdn
bootproto: "dhcp"
defroute: "yes"
onboot: "yes"
type: "Ethernet"

network::mroutes_hash:
em2:
routes:
"139.229.147.0/24": "139.229.170.254"
"139.229.166.0/24": "139.229.170.254"
"139.229.167.0/24": "139.229.170.254"
#"139.229.170.0/24": "139.229.170.254"
"139.229.178.0/24": "139.229.170.254"
nm::connections:
eno1: # lsst-daq interface
content:
connection:
id: "eno1"
uuid: "49b496dc-2ec0-48b4-9907-f025bf2d6907"
type: "ethernet"
interface-name: "eno1"
master: "lsst-daq"
slave-type: "bridge"
ethernet: {}
ethtool:
ring-rx: "4096"
ring-tx: "4096"
bridge-port: {}
lsst-daq:
content:
connection:
id: "lsst-daq"
uuid: "2ccf9a2a-bed7-6832-5c25-097862b4929f"
type: "bridge"
interface-name: "lsst-daq"
ethernet: {}
bridge:
stp: "false"
ipv4:
address1: "192.168.100.251/24"
method: "manual"
ipv6:
method: "disabled"
proxy: {}
eno2: # dds-auxtel
content:
connection:
id: "eno2"
uuid: "e5ad2870-9b07-4fe0-af1a-30f87f6b62d5"
type: "ethernet"
interface-name: "eno2"
ethernet: {}
ipv4:
address1: "139.229.170.32/24,139.229.170.254"
dns: "139.229.160.53;139.229.160.54;139.229.160.55;"
dns-search: "cp.lsst.org;"
method: "manual"
never-default: "true"
route1: "139.229.147.0/24,139.229.170.254"
route2: "139.229.166.0/24,139.229.170.254"
route3: "139.229.167.0/24,139.229.170.254"
route4: "139.229.178.0/24,139.229.170.254"
ipv6:
method: "disabled"
proxy: {}
eno3:
content:
connection:
id: "eno3"
uuid: "5dcbb5a8-3425-4dff-a339-7a29e0b3a6c1"
type: "ethernet"
autoconnect: "false"
interface-name: "eno3"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"
eno4:
content:
connection:
id: "eno4"
uuid: "ef4c2e90-5bf6-4b98-8663-588354f3335b"
type: "ethernet"
interface-name: "eno4"
ethernet: {}
ipv4:
method: "auto"
ipv6:
method: "disabled"
proxy: {}

# Server configuration
nfs::server_enabled: true
# 139.229.146.0/24 antu
# 139.229.160.0/24 cp general & yagan
# 139.229.165.0/24 cp archive
# 139.229.175.0/26 comcam-ccs
# 139.229.175.128/25 auxtel-ccs
nfs::nfs_v4_export_root_clients: >-
%{facts.networking.ip}/32(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
139.229.146.0/24(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
Expand All @@ -51,7 +99,7 @@ nfs::client_enabled: true
nfs::client_mounts:
/net/self/data:
share: "data"
server: "%{facts.networking.fqdn}"
server: "auxtel-fp01.cp.lsst.org"
atboot: true

ccs_software::services:
Expand Down
97 changes: 97 additions & 0 deletions spec/hosts/nodes/auxtel-fp01.cp.lsst.org.yaml_spec.rb
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

0 comments on commit ab9a3a1

Please sign in to comment.