@@ -18,6 +18,7 @@ class TestNested:
18
18
"83nightly" ,
19
19
"83rc1" , "83b2" , "83b1" ,
20
20
"821.1" ,
21
+ "81" , "80" ,
21
22
"xs8" , "ch821.1" ,
22
23
))
23
24
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
@@ -71,6 +72,8 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
71
72
expected_rel = {
72
73
"ch821.1" : "8.2.1" ,
73
74
"xs8" : "8.4.0" ,
75
+ "80" : "8.0.0" ,
76
+ "81" : "8.1.0" ,
74
77
"821.1" : "8.2.1" ,
75
78
"83b1" : "8.3.0" ,
76
79
"83b2" : "8.3.0" ,
@@ -117,26 +120,52 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
117
120
# wait for XAPI
118
121
wait_for (pool .master .is_enabled , "Wait for XAPI to be ready" , timeout_secs = 30 * 60 )
119
122
120
- # check for firstboot issues
121
- # FIXME: flaky, must check logs extraction on failure
122
- for service in ["control-domain-params-init" ,
123
+ if lsb_rel in ["8.2.1" , "8.3.0" , "8.4.0" ]:
124
+ SERVICES = ["control-domain-params-init" ,
123
125
"network-init" ,
124
126
"storage-init" ,
125
127
"generate-iscsi-iqn" ,
126
128
"create-guest-templates" ,
127
- ]:
128
- try :
129
- wait_for (lambda : pool .master .ssh (["test" , "-e" , f"/var/lib/misc/ran-{ service } " ],
129
+ ]
130
+ STAMPS_DIR = "/var/lib/misc"
131
+ STAMPS = [f"ran-{ service } " for service in SERVICES ]
132
+ elif lsb_rel in ["8.0.0" , "8.1.0" ]:
133
+ SERVICES = ["xs-firstboot" ]
134
+ STAMPS_DIR = "/etc/firstboot.d/state"
135
+ STAMPS = [
136
+ "05-prepare-networking" ,
137
+ "10-prepare-storage" ,
138
+ "15-set-default-storage" ,
139
+ "20-udev-storage" ,
140
+ "25-multipath" ,
141
+ "40-generate-iscsi-iqn" ,
142
+ "50-prepare-control-domain-params" ,
143
+ "60-import-keys" ,
144
+ "60-upgrade-likewise-to-pbis" ,
145
+ "62-create-guest-templates" ,
146
+ "80-common-criteria" ,
147
+ "90-flush-pool-db" ,
148
+ "95-legacy-logrotate" ,
149
+ "99-remove-firstboot-flag" ,
150
+ ]
151
+ else :
152
+ raise AssertionError (f"Unhandled LSB release { lsb_rel !r} " )
153
+ # check for firstboot issues
154
+ # FIXME: flaky, must check logs extraction on failure
155
+ try :
156
+ for stamp in sorted (STAMPS ):
157
+ wait_for (lambda : pool .master .ssh (["test" , "-e" , f"{ STAMPS_DIR } /{ stamp } " ],
130
158
check = False , simple_output = False ,
131
159
).returncode == 0 ,
132
- f"Wait for ran-{ service } stamp" )
133
- except TimeoutError :
134
- logging .warning ("investigating lack of %s service stamp" , service )
160
+ f"Wait for { stamp } stamp" )
161
+ except TimeoutError :
162
+ logging .warning ("investigating lack of %s service stamp" , stamp )
163
+ for service in SERVICES :
135
164
out = pool .master .ssh (["systemctl" , "status" , service ], check = False )
136
165
logging .warning ("service status: %s" , out )
137
166
out = pool .master .ssh (["grep" , "-r" , service , "/var/log" ], check = False )
138
167
logging .warning ("in logs: %s" , out )
139
- raise
168
+ raise
140
169
141
170
logging .info ("Powering off pool master" )
142
171
try :
@@ -170,6 +199,7 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
170
199
"83nightly" ,
171
200
"83rc1" , "83b2" , "83b1" ,
172
201
"821.1" ,
202
+ "81" , "80" ,
173
203
"xs8" , "ch821.1" ,
174
204
))
175
205
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
@@ -187,6 +217,8 @@ def test_boot_inst(self, create_vms,
187
217
"83b2-83nightly" ,
188
218
"83b1-83nightly" ,
189
219
"821.1-83nightly" ,
220
+ "81-83nightly" ,
221
+ "80-83nightly" ,
190
222
"xs8-83nightly" ,
191
223
"ch821.1-83nightly" ,
192
224
"821.1-821.1" ,
@@ -207,6 +239,8 @@ def test_boot_upg(self, create_vms,
207
239
"83b2-83nightly-83nightly" ,
208
240
"83b1-83nightly-83nightly" ,
209
241
"821.1-83nightly-83nightly" ,
242
+ "81-83nightly-83nightly" ,
243
+ "80-83nightly-83nightly" ,
210
244
"xs8-83nightly-83nightly" ,
211
245
"ch821.1-83nightly-83nightly" ,
212
246
"821.1-821.1-821.1" ,
@@ -227,6 +261,8 @@ def test_boot_rst(self, create_vms,
227
261
("83b2" , "83nightly" ),
228
262
("83b1" , "83nightly" ),
229
263
("821.1" , "83nightly" ),
264
+ ("81" , "83nightly" ),
265
+ ("80" , "83nightly" ),
230
266
("xs8" , "83nightly" ),
231
267
("ch821.1" , "83nightly" ),
232
268
("821.1" , "821.1" ),
@@ -254,6 +290,8 @@ def test_upgrade(self, vm_booted_with_installer, install_disk,
254
290
("83b2-83nightly" , "83nightly" ),
255
291
("83b1-83nightly" , "83nightly" ),
256
292
("821.1-83nightly" , "83nightly" ),
293
+ ("81-83nightly" , "83nightly" ),
294
+ ("80-83nightly" , "83nightly" ),
257
295
("xs8-83nightly" , "83nightly" ),
258
296
("ch821.1-83nightly" , "83nightly" ),
259
297
("821.1-821.1" , "821.1" ),
0 commit comments