Skip to content

Commit 66c5d96

Browse files
authored
Merge pull request #1483 from lsst-it/IT-5692_comcam_archiver_el9
(node/comcam-archiver.cp) add EL9 network configuration & tests
2 parents af04854 + 1a9552d commit 66c5d96

File tree

2 files changed

+110
-167
lines changed

2 files changed

+110
-167
lines changed

hieradata/node/comcam-archiver.cp.lsst.org.yaml

Lines changed: 82 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,89 @@
11
---
2-
profile::core::nm_dispatch::interfaces:
3-
em1:
4-
- "/sbin/ethtool --set-ring ${DEV} rx 4096 tx 4096"
5-
- "tc filter del dev ${DEV} chain 0 || true"
6-
- "tc qdisc del dev ${DEV} root || true"
7-
- "tc qdisc add dev ${DEV} root handle 1: htb default 1"
8-
- "tc class add dev ${DEV} parent 1: classid 1:1 htb rate 10gbit burst 40mbit"
9-
- "tc class add dev ${DEV} parent 1:1 classid 1:10 htb rate 2.5gbit burst 40mbit"
10-
- "tc filter add dev ${DEV} parent 1: protocol ip matchall flowid 1:1"
11-
- "tc filter add dev ${DEV} parent 1:1 protocol ip prio 1 u32 match ip dst 141.142.0.0/16 flowid 1:10"
12-
network::interfaces_hash:
13-
em1: # fqdn
14-
bootproto: "dhcp"
15-
defroute: "yes"
16-
onboot: "yes"
17-
type: "Ethernet"
18-
em2: # dds
19-
bootproto: "none"
20-
defroute: "no"
21-
ipaddress: "139.229.166.1"
22-
netmask: "255.255.255.0"
23-
nozeroconf: "yes"
24-
onboot: "yes"
25-
type: "Ethernet"
26-
em3: # not connected
27-
bootproto: "none"
28-
onboot: "no"
29-
type: "Ethernet"
30-
em4: # not connected
31-
bootproto: "none"
32-
onboot: "no"
33-
type: "Ethernet"
34-
p2p1: # not connected
35-
bootproto: "none"
36-
onboot: "no"
37-
type: "Ethernet"
38-
p2p2: # not connected
39-
bootproto: "none"
40-
onboot: "no"
41-
type: "Ethernet"
42-
43-
network::hostname: "%{facts.networking.fqdn}"
44-
network::mroutes_hash:
45-
em2:
46-
routes:
47-
"139.229.147.0/24": "139.229.166.254"
48-
#"139.229.166.0/24": "139.229.166.254"
49-
"139.229.167.0/24": "139.229.166.254"
50-
"139.229.170.0/24": "139.229.166.254"
51-
"139.229.178.0/24": "139.229.166.254"
52-
p2p1:
53-
ensure: "absent"
54-
routes: {}
55-
56-
# 139.229.146.0/24 antu
57-
# 139.229.160.0/24 cp general & yagan
58-
# 139.229.165.0/24 cp archive
59-
# 139.229.175.0/26 comcam-ccs
60-
nfs::server_enabled: true
61-
nfs::nfs_v4_export_root_clients: >-
62-
%{facts.networking.ip}/32(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
63-
139.229.146.0/24(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
64-
139.229.160.0/24(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
65-
139.229.165.0/24(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
66-
139.229.170.0/24(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
67-
139.229.175.0/26(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
68-
nfs::nfs_exports_global:
69-
/data/lsstdata:
70-
clients: >-
71-
%{facts.networking.ip}/32(rw,nohide,insecure,no_subtree_check,async,root_squash)
72-
139.229.146.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
73-
139.229.160.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
74-
139.229.165.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
75-
139.229.170.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
76-
139.229.175.0/26(rw,nohide,insecure,no_subtree_check,async,root_squash)
77-
/data/repo:
78-
clients: >-
79-
%{facts.networking.ip}/32(rw,nohide,insecure,no_subtree_check,async,root_squash)
80-
139.229.146.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
81-
139.229.160.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
82-
139.229.165.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
83-
139.229.170.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
84-
139.229.175.0/26(rw,nohide,insecure,no_subtree_check,async,root_squash)
85-
/data:
86-
clients: >-
87-
%{facts.networking.ip}/32(rw,nohide,insecure,no_subtree_check,async,root_squash)
88-
139.229.146.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
89-
139.229.160.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
90-
139.229.165.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
91-
139.229.170.0/24(rw,nohide,insecure,no_subtree_check,async,root_squash)
92-
139.229.175.0/26(rw,nohide,insecure,no_subtree_check,async,root_squash)
2+
nm::connections:
3+
eno1:
4+
content:
5+
connection:
6+
id: "eno1"
7+
uuid: "b28d29b1-83cc-4df2-9c65-22cd9d97d0af"
8+
type: "ethernet"
9+
interface-name: "eno1"
10+
ethernet: {}
11+
ipv4:
12+
method: "auto"
13+
ipv6:
14+
method: "disabled"
15+
proxy: {}
16+
eno2:
17+
content:
18+
connection:
19+
id: "eno2"
20+
uuid: "f4164d1b-28a7-4fba-a1a9-a73a62f912c2"
21+
type: "ethernet"
22+
autoconnect: "false"
23+
interface-name: "eno2"
24+
ethernet: {}
25+
ipv4:
26+
method: "disabled"
27+
ipv6:
28+
method: "disabled"
29+
eno3:
30+
content:
31+
connection:
32+
id: "eno3"
33+
uuid: "11adbb0c-62c3-4fde-bfff-afb451666c1c"
34+
type: "ethernet"
35+
autoconnect: "false"
36+
interface-name: "eno3"
37+
ethernet: {}
38+
ipv4:
39+
method: "disabled"
40+
ipv6:
41+
method: "disabled"
42+
eno4:
43+
content:
44+
connection:
45+
id: "eno4"
46+
uuid: "1a3d7970-1499-4de2-8c33-0ad5c8a9ece6"
47+
type: "ethernet"
48+
autoconnect: "false"
49+
interface-name: "eno4"
50+
ethernet: {}
51+
ipv4:
52+
method: "disabled"
53+
ipv6:
54+
method: "disabled"
55+
ens1f0:
56+
content:
57+
connection:
58+
id: "ens1f0"
59+
uuid: "d399d016-fd8c-4269-a86b-3e60ce7ff479"
60+
type: "ethernet"
61+
autoconnect: "false"
62+
interface-name: "ens1f0"
63+
ethernet: {}
64+
ipv4:
65+
method: "disabled"
66+
ipv6:
67+
method: "disabled"
68+
ens1f1:
69+
content:
70+
connection:
71+
id: "ens1f1"
72+
uuid: "6725fed9-6087-4611-8282-543ddec0d1b1"
73+
type: "ethernet"
74+
autoconnect: "false"
75+
interface-name: "ens1f1"
76+
ethernet: {}
77+
ipv4:
78+
method: "disabled"
79+
ipv6:
80+
method: "disabled"
9381

9482
nfs::client_enabled: true
9583
nfs::client_mounts:
96-
/net/self/data/lsstdata:
97-
share: "lsstdata"
98-
server: "%{facts.networking.fqdn}"
99-
atboot: true
100-
/repo:
101-
share: "repo"
102-
server: "%{facts.networking.fqdn}"
84+
/data:
85+
share: "comcam"
86+
server: "nfs3.cp.lsst.org"
10387
atboot: true
10488

10589
profile::core::k5login::k5login:

spec/hosts/nodes/comcam-archiver.cp.lsst.org_spec.rb

Lines changed: 28 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
describe 'comcam-archiver.cp.lsst.org', :sitepp do
66
on_supported_os.each do |os, os_facts|
7-
# XXX networking needs to be updated to support EL8+
8-
next unless os =~ %r{centos-7-x86_64}
7+
next unless os =~ %r{almalinux-9-x86_64}
98

109
context "on #{os}" do
1110
let(:facts) do
@@ -18,92 +17,52 @@
1817
},
1918
})
2019
end
21-
2220
let(:node_params) do
2321
{
24-
role: 'comcam-archiver',
22+
role: 'nfsclient',
23+
cluster: 'comcam-archive',
2524
site: 'cp',
26-
cluster: 'comcam-archiver',
2725
}
2826
end
2927

3028
it { is_expected.to compile.with_all_deps }
3129

3230
include_examples 'baremetal'
31+
include_context 'with nm interface'
3332

34-
it do
35-
is_expected.to contain_network__interface('em1').with(
36-
bootproto: 'dhcp',
37-
defroute: 'yes',
38-
onboot: 'yes',
39-
type: 'Ethernet'
40-
)
41-
end
33+
it { is_expected.to have_nm__connection_resource_count(6) }
4234

43-
it do
44-
is_expected.to contain_network__interface('em2').with(
45-
bootproto: 'none',
46-
defroute: 'no',
47-
ipaddress: '139.229.166.1',
48-
netmask: '255.255.255.0',
49-
nozeroconf: 'yes',
50-
onboot: 'yes',
51-
type: 'Ethernet'
52-
)
53-
end
35+
%w[
36+
eno2
37+
eno3
38+
eno4
39+
ens1f0
40+
ens1f1
41+
].each do |i|
42+
context "with #{i}" do
43+
let(:interface) { i }
5444

55-
it do
56-
is_expected.to contain_network__interface('em3').with(
57-
bootproto: 'none',
58-
onboot: 'no',
59-
type: 'Ethernet'
60-
)
45+
it_behaves_like 'nm disabled interface'
46+
end
6147
end
6248

63-
it do
64-
is_expected.to contain_network__interface('em4').with(
65-
bootproto: 'none',
66-
onboot: 'no',
67-
type: 'Ethernet'
68-
)
69-
end
49+
context 'with eno1' do
50+
let(:interface) { 'eno1' }
7051

71-
it do
72-
is_expected.to contain_network__interface('p2p1').with(
73-
bootproto: 'none',
74-
onboot: 'no',
75-
type: 'Ethernet'
76-
)
77-
end
78-
79-
it do
80-
is_expected.to contain_network__interface('p2p2').with(
81-
bootproto: 'none',
82-
onboot: 'no',
83-
type: 'Ethernet'
84-
)
52+
it_behaves_like 'nm enabled interface'
53+
it_behaves_like 'nm dhcp interface'
54+
it_behaves_like 'nm ethernet interface'
8555
end
8656

87-
it { is_expected.to contain_class('nfs::server').with_nfs_v4(true) }
88-
it { is_expected.to contain_nfs__server__export('/data/lsstdata') }
89-
it { is_expected.to contain_nfs__server__export('/data/repo') }
90-
it { is_expected.to contain_nfs__server__export('/data') }
91-
92-
it do
93-
is_expected.to contain_nfs__client__mount('/net/self/data/lsstdata').with(
94-
share: 'lsstdata',
95-
server: 'comcam-archiver.cp.lsst.org',
96-
atboot: true
97-
)
98-
end
57+
it { is_expected.to contain_class('nfs').with_client_enabled(true) }
9958

10059
it do
101-
is_expected.to contain_nfs__client__mount('/repo').with(
102-
share: 'repo',
103-
server: 'comcam-archiver.cp.lsst.org',
60+
is_expected.to contain_nfs__client__mount('/data').with(
61+
share: 'comcam',
62+
server: 'nfs3.cp.lsst.org',
10463
atboot: true
10564
)
10665
end
107-
end # on os
108-
end # on_supported_os
109-
end # role
66+
end
67+
end # on os
68+
end # on_supported_os

0 commit comments

Comments
 (0)