Skip to content

Commit 3708ee6

Browse files
committed
(cluster/antu) add bond0 interface
1 parent 710d122 commit 3708ee6

File tree

2 files changed

+130
-22
lines changed

2 files changed

+130
-22
lines changed

hieradata/cluster/antu.yaml

Lines changed: 86 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,86 @@ nm::conf:
99
keep-configuration: "no"
1010
allowed-connections: "except:origin:nm-initrd-generator"
1111
nm::connections:
12-
enp65s0f0.2130:
12+
enp12s0f4u1u2c2: # bmc
1313
content:
1414
connection:
15-
id: "enp65s0f0.2130"
16-
uuid: "e74daaad-4d73-4015-bb26-83c460ddf572"
15+
id: "enp12s0f4u1u2c2"
16+
uuid: "f330f829-20cc-b829-67b0-18086a5fe6fa"
17+
type: "ethernet"
18+
autoconnect: "false"
19+
interface-name: "enp12s0f4u1u2c2"
20+
ethernet: {}
21+
ipv4:
22+
method: "disabled"
23+
ipv6:
24+
method: "disabled"
25+
enp65s0f0: # bdc-b04-lf02
26+
content:
27+
connection:
28+
id: "enp65s0f0"
29+
uuid: "de9904c8-9577-1a17-36b1-34b94132f06a"
30+
type: "ethernet"
31+
interface-name: "enp65s0f0"
32+
master: "bond0"
33+
slave-type: "bond"
34+
ethernet: {}
35+
enp65s0f1: # bdc-b04-lf01
36+
content:
37+
connection:
38+
id: "enp65s0f1"
39+
uuid: "688bf5bf-d649-34b4-15eb-b07c50ac43f8"
40+
type: "ethernet"
41+
interface-name: "enp65s0f1"
42+
master: "bond0"
43+
slave-type: "bond"
44+
ethernet: {}
45+
bond0:
46+
content:
47+
connection:
48+
id: "bond0"
49+
uuid: "3c5900d8-49af-4364-8f4d-9fb8f8c9d089"
50+
type: "bond"
51+
interface-name: "bond0"
52+
ethernet:
53+
cloned-mac-address: "%{facts.networking.interfaces.enp1s0f0np0.mac}"
54+
bond:
55+
miimon: "100"
56+
mode: "802.3ad"
57+
xmit_hash_policy: "layer3+4"
58+
ipv4:
59+
method: "disabled"
60+
ipv6:
61+
method: "disabled"
62+
proxy: {}
63+
bond0.2130:
64+
content:
65+
connection:
66+
id: "bond0.2130"
67+
uuid: "f1512a73-a30e-492f-8e43-d2d90d11dd2f"
1768
type: "vlan"
18-
interface-name: "enp65s0f0.2130"
69+
interface-name: "bond0.2130"
1970
master: "br2130"
2071
slave-type: "bridge"
2172
ethernet: {}
2273
vlan:
2374
flags: "1"
2475
id: "2130"
25-
parent: "enp65s0f0"
76+
parent: "bond0"
77+
bridge-port: {}
78+
bond0.2131:
79+
content:
80+
connection:
81+
id: "bond0.2131"
82+
uuid: "5861c0e1-5a35-4f32-927f-eb2aa7b84e2e"
83+
type: "vlan"
84+
interface-name: "bond0.2131"
85+
master: "br2131"
86+
slave-type: "bridge"
87+
ethernet: {}
88+
vlan:
89+
flags: "1"
90+
id: "2131"
91+
parent: "bond0"
2692
bridge-port: {}
2793
br2130:
2894
content:
@@ -39,3 +105,18 @@ nm::connections:
39105
ipv6:
40106
method: "disabled"
41107
proxy: {}
108+
br2131:
109+
content:
110+
connection:
111+
id: "br2131"
112+
uuid: "7dd05d98-a9c3-4569-a7c3-00316b13c0eb"
113+
type: "bridge"
114+
interface-name: "br2131"
115+
ethernet: {}
116+
bridge:
117+
stp: "false"
118+
ipv4:
119+
method: "auto"
120+
ipv6:
121+
method: "disabled"
122+
proxy: {}

spec/hosts/nodes/antu01.ls.lsst.org_spec.rb

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
role: 'rke',
2323
site: 'ls',
2424
cluster: 'antu',
25-
variant: '1115s',
2625
}
2726
end
2827

@@ -63,11 +62,10 @@
6362
)
6463
end
6564

66-
it { is_expected.to have_nm__connection_resource_count(5) }
65+
it { is_expected.to have_nm__connection_resource_count(8) }
6766

6867
%w[
6968
enp12s0f4u1u2c2
70-
enp65s0f0
7169
].each do |i|
7270
context "with #{i}" do
7371
let(:interface) { i }
@@ -76,28 +74,57 @@
7674
end
7775
end
7876

79-
context 'with enp65s0f1' do
80-
let(:interface) { 'enp65s0f1' }
77+
%w[
78+
enp65s0f0
79+
enp65s0f1
80+
].each do |i|
81+
context "with #{i}" do
82+
let(:interface) { i }
8183

82-
it_behaves_like 'nm enabled interface'
83-
it_behaves_like 'nm dhcp interface'
84-
it_behaves_like 'nm ethernet interface'
84+
it_behaves_like 'nm enabled interface'
85+
it_behaves_like 'nm ethernet interface'
86+
it_behaves_like 'nm bond slave interface', master: 'bond0'
87+
end
8588
end
8689

87-
context 'with enp65s0f0.2130' do
88-
let(:interface) { 'enp65s0f0.2130' }
90+
context 'with bond0' do
91+
let(:interface) { 'bond0' }
8992

9093
it_behaves_like 'nm enabled interface'
91-
it_behaves_like 'nm vlan interface', id: 2130, parent: 'enp65s0f0'
92-
it_behaves_like 'nm bridge slave interface', master: 'br2130'
94+
it_behaves_like 'nm bond interface'
95+
it_behaves_like 'nm no-ip interface'
9396
end
9497

95-
context 'with br2130' do
96-
let(:interface) { 'br2130' }
98+
%w[
99+
2130
100+
2131
101+
].each do |vlan|
102+
iface = "bond0.#{vlan}"
103+
context "with #{iface}" do
104+
let(:interface) { iface }
105+
106+
it_behaves_like 'nm enabled interface'
107+
it_behaves_like 'nm vlan interface', id: vlan.to_i, parent: 'bond0'
108+
it_behaves_like 'nm bridge slave interface', master: "br#{vlan}"
109+
end
110+
end
97111

98-
it_behaves_like 'nm enabled interface'
99-
it_behaves_like 'nm no-ip interface'
100-
it_behaves_like 'nm bridge interface'
112+
%w[
113+
br2130
114+
br2131
115+
].each do |i|
116+
context "with #{i}" do
117+
let(:interface) { i }
118+
119+
it_behaves_like 'nm enabled interface'
120+
it_behaves_like 'nm bridge interface'
121+
122+
if i == 'br2131'
123+
it_behaves_like 'nm dhcp interface'
124+
else
125+
it_behaves_like 'nm no-ip interface'
126+
end
127+
end
101128
end
102129
end # on os
103130
end # on_supported_os

0 commit comments

Comments
 (0)