1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278 | $ tox-venv py3 python -m nose % 2>&1 | tee nose.log
............E.....E...
======================================================================
ERROR: test_bond_conversion (tests.unittests.test_datasource.test_configdrive.TestConvertNetworkData)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/smoser-public/src/cloud-init/cloud-init/tests/unittests/test_datasource/test_configdrive.py", line 678, in test_bond_conversion
raise Exception("FOO_BOND")
Exception: FOO_BOND
-------------------- >> begin captured stdout << ---------------------
==== start netconfig ===
{
"config": [
{
"mac_address": "0c:c4:7a:34:6e:3c",
"mtu": 1500,
"name": "oeth0",
"subnets": [],
"type": "physical"
},
{
"mac_address": "0c:c4:7a:34:6e:3d",
"mtu": 1500,
"name": "oeth1",
"subnets": [],
"type": "physical"
},
{
"bond_interfaces": [
"oeth0",
"oeth1"
],
"name": "bond0",
"params": {
"bond_miimon": 100,
"bond_mode": "4",
"bond_xmit_hash_policy": "layer3+4"
},
"subnets": [],
"type": "bond"
},
{
"mac_address": "fa:16:3e:b3:72:30",
"name": "bond0.602",
"subnets": [
{
"address": "2.2.2.13",
"ipv4": true,
"netmask": "255.255.255.248",
"routes": [
{
"gateway": "2.2.2.9",
"netmask": "0.0.0.0",
"network": "0.0.0.0"
}
],
"type": "static"
}
],
"type": "vlan",
"vlan_id": 602,
"vlan_link": "bond0"
},
{
"mac_address": "fa:16:3e:66:ab:a6",
"name": "bond0.612",
"subnets": [
{
"address": "10.0.1.5",
"ipv4": true,
"netmask": "255.255.255.248",
"routes": [
{
"gateway": "10.0.1.1",
"netmask": "255.255.255.255",
"network": "192.168.1.0"
}
],
"type": "static"
}
],
"type": "vlan",
"vlan_id": 612,
"vlan_link": "bond0"
},
{
"address": "1.1.1.191",
"type": "nameserver"
},
{
"address": "1.1.1.4",
"type": "nameserver"
}
],
"version": 1
}
==== end netconfig ===
eni_rendering=auto lo
iface lo inet loopback
dns-nameservers 1.1.1.191 1.1.1.4
auto oeth0
iface oeth0 inet manual
bond-master bond0
bond_miimon 100
bond_mode 4
bond_xmit_hash_policy layer3+4
mtu 1500
auto oeth1
iface oeth1 inet manual
bond-master bond0
bond_miimon 100
bond_mode 4
bond_xmit_hash_policy layer3+4
mtu 1500
auto bond0
iface bond0 inet manual
bond-slaves none
bond_miimon 100
bond_mode 4
bond_xmit_hash_policy layer3+4
auto bond0.602
iface bond0.602 inet static
address 2.2.2.13
netmask 255.255.255.248
hwaddress fa:16:3e:b3:72:30
vlan-raw-device bond0
vlan_id 602
post-up route add default gw 2.2.2.9 || true
pre-down route del default gw 2.2.2.9 || true
auto bond0.612
iface bond0.612 inet static
address 10.0.1.5
netmask 255.255.255.248
hwaddress fa:16:3e:66:ab:a6
vlan-raw-device bond0
vlan_id 612
post-up route add -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
pre-down route del -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
cloudinit.util: DEBUG: Writing to /tmp/tmpwote_wrx/etc/network/interfaces - wb: [420] 1081 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmpwote_wrx/etc/udev/rules.d/70-persistent-net.rules - wb: [420] 194 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmpwote_wrx/etc/systemd/network/50-cloud-init-oeth0.link - wb: [420] 56 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmpwote_wrx/etc/systemd/network/50-cloud-init-oeth1.link - wb: [420] 56 bytes
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: test_vlan (tests.unittests.test_datasource.test_configdrive.TestConvertNetworkData)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/smoser-public/src/cloud-init/cloud-init/tests/unittests/test_datasource/test_configdrive.py", line 700, in test_vlan
raise Exception("FOO_VLAN")
Exception: FOO_VLAN
-------------------- >> begin captured stdout << ---------------------
==== vlan network_data.json ====
{
"links": [
{
"ethernet_mac_address": "fa:16:3e:69:b0:58",
"id": "eth0",
"mtu": 1500,
"type": "phy"
},
{
"ethernet_mac_address": "fa:16:3e:b3:72:30",
"id": "vlan1",
"type": "vlan",
"vlan_id": 602,
"vlan_link": "eth0",
"vlan_mac_address": "fa:16:3e:b3:72:30"
}
],
"networks": [
{
"id": "network1-ipv4",
"ip_address": "10.0.1.5",
"link": "vlan1",
"netmask": "255.255.255.248",
"network_id": "a9e2f47c-3c43-4782-94d0-e1eeef1c8c9d",
"routes": [
{
"gateway": "10.0.1.1",
"netmask": "255.255.255.255",
"network": "192.168.1.0"
}
],
"type": "ipv4"
}
],
"services": [
{
"address": "1.1.1.191",
"type": "nameserver"
}
]
}
==== start netconfig ===
{
"config": [
{
"mac_address": "fa:16:3e:69:b0:58",
"mtu": 1500,
"name": "enp0s1",
"subnets": [],
"type": "physical"
},
{
"mac_address": "fa:16:3e:b3:72:30",
"name": "enp0s1.602",
"subnets": [
{
"address": "10.0.1.5",
"ipv4": true,
"netmask": "255.255.255.248",
"routes": [
{
"gateway": "10.0.1.1",
"netmask": "255.255.255.255",
"network": "192.168.1.0"
}
],
"type": "static"
}
],
"type": "vlan",
"vlan_id": 602,
"vlan_link": "enp0s1"
},
{
"address": "1.1.1.191",
"type": "nameserver"
}
],
"version": 1
}
==== end netconfig ===
=== eni rendered ===
auto lo
iface lo inet loopback
dns-nameservers 1.1.1.191
iface enp0s1 inet manual
mtu 1500
auto enp0s1.602
iface enp0s1.602 inet static
address 10.0.1.5
netmask 255.255.255.248
hwaddress fa:16:3e:b3:72:30
vlan-raw-device enp0s1
vlan_id 602
post-up route add -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
pre-down route del -net 192.168.1.0 netmask 255.255.255.255 gw 10.0.1.1 || true
--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
cloudinit.util: DEBUG: Writing to /tmp/tmp47rrpb8f/etc/network/interfaces - wb: [420] 437 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmp47rrpb8f/etc/udev/rules.d/70-persistent-net.rules - wb: [420] 98 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmp47rrpb8f/etc/systemd/network/50-cloud-init-enp0s1.link - wb: [420] 57 bytes
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 22 tests in 0.107s
FAILED (errors=2)
|