Skip to content

Commit 3186faa

Browse files
committed
install: add installation of xcp-ng 8.0 and 8.1, upgrades to 8.3b2
1 parent b987130 commit 3186faa

File tree

2 files changed

+47
-9
lines changed

2 files changed

+47
-9
lines changed

data.py-dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ VM_IMAGES = {
4747

4848
# FIXME: use URLs and an optional cache?
4949
ISO_IMAGES = {
50+
# 'xcpng-8.0': "/home/user/iso/xcp-ng-8.0.0.iso",
51+
# 'xcpng-8.1': "/home/user/iso/xcp-ng-8.1.0-2.iso",
5052
# 'xcpng-8.2.0': "/home/user/iso/xcp-ng-8.2.0.iso",
5153
# 'xcpng-8.2.1': "/home/user/iso/xcp-ng-8.2.1.iso",
5254
# 'xcpng-8.2.1-2023': "/home/user/iso/xcp-ng-8.2.1-20231130.iso",

tests/install/test.py

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@pytest.mark.dependency()
1212
class TestNested:
1313
@pytest.mark.parametrize("iso_version", (
14+
"80", "81",
1415
"ch821.1", "xs8",
1516
"821.1", "83b2",
1617
))
@@ -38,6 +39,8 @@ class TestNested:
3839
param_mapping={"firmware": "firmware"})
3940
@pytest.mark.installer_iso(
4041
lambda version: {
42+
"80": "xcpng-8.0",
43+
"81": "xcpng-8.1",
4144
"821.1": "xcpng-8.2.1-2023",
4245
"83b2": "xcpng-8.3-beta2",
4346
"ch821.1": "ch-8.2.1-23",
@@ -134,10 +137,13 @@ def test_install(self, request, firmware, iso_remaster, create_vms, iso_version)
134137
#"83b2-83b2", # 8.3b2 disabled the upgrade from 8.3
135138
"821.1-83b2",
136139
"821.1-83b2-83b2",
140+
"81-83b2", "81-83b2-83b2",
141+
"80-83b2", "80-83b2-83b2",
137142
"ch821.1-83b2",
138143
"ch821.1-83b2-83b2",
139144
"821.1",
140145
"821.1-821.1",
146+
"81", "80",
141147
"ch821.1", "xs8",
142148
))
143149
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
@@ -174,6 +180,8 @@ def test_firstboot(self, firmware, request, create_vms, mode):
174180
expected_rel = {
175181
"ch821.1": "8.2.1",
176182
"xs8": "8.4.0",
183+
"80": "8.0.0",
184+
"81": "8.1.0",
177185
"821.1": "8.2.1",
178186
"83b2": "8.3.0",
179187
}[expected_rel_id]
@@ -227,21 +235,45 @@ def test_firstboot(self, firmware, request, create_vms, mode):
227235
# wait for XAPI
228236
wait_for(pool.master.is_enabled, "Wait for XAPI to be ready", timeout_secs=30 * 60)
229237

230-
# check for firstboot issues
231-
# FIXME: flaky, must check logs extraction on failure
232-
for service in ["control-domain-params-init",
238+
if lsb_rel in ["8.2.1", "8.3.0", "8.4.0"]:
239+
SERVICES =["control-domain-params-init",
233240
"network-init",
234241
"storage-init",
235242
"generate-iscsi-iqn",
236243
"create-guest-templates",
237-
]:
238-
try:
239-
wait_for(lambda: pool.master.ssh(["test", "-e", f"/var/lib/misc/ran-{service}"],
244+
]
245+
STAMPS_DIR = "/var/lib/misc"
246+
STAMPS = [f"ran-{service}" for service in SERVICES]
247+
elif lsb_rel in ["8.0.0", "8.1.0"]:
248+
SERVICES = ["xs-firstboot"]
249+
STAMPS_DIR = "/etc/firstboot.d/state"
250+
STAMPS = [
251+
"05-prepare-networking",
252+
"10-prepare-storage",
253+
"15-set-default-storage",
254+
"20-udev-storage",
255+
"25-multipath",
256+
"40-generate-iscsi-iqn",
257+
"50-prepare-control-domain-params",
258+
"60-import-keys",
259+
"60-upgrade-likewise-to-pbis",
260+
"62-create-guest-templates",
261+
"80-common-criteria",
262+
"90-flush-pool-db",
263+
"95-legacy-logrotate",
264+
"99-remove-firstboot-flag",
265+
]
266+
# check for firstboot issues
267+
# FIXME: flaky, must check logs extraction on failure
268+
try:
269+
for stamp in STAMPS:
270+
wait_for(lambda: pool.master.ssh(["test", "-e", f"{STAMPS_DIR}/{stamp}"],
240271
check=False, simple_output=False,
241272
).returncode == 0,
242-
f"Wait for ran-{service} stamp")
243-
except TimeoutError:
244-
logging.warning("investigating lack of ran-{service} stamp")
273+
f"Wait for {stamp} stamp")
274+
except TimeoutError:
275+
logging.warning("investigating lack of {stamp} service stamp")
276+
for service in SERVICES:
245277
out = pool.master.ssh(["systemctl", "status", service], check=False)
246278
logging.warning("service status: %s", out)
247279
out = pool.master.ssh(["grep", "-r", service, "/var/log"], check=False)
@@ -277,6 +309,8 @@ def test_firstboot(self, firmware, request, create_vms, mode):
277309
@pytest.mark.usefixtures("xcpng_chained")
278310
@pytest.mark.parametrize(("orig_version", "iso_version"), [
279311
("821.1", "821.1"),
312+
("80", "83b2"),
313+
("81", "83b2"),
280314
("ch821.1", "83b2"),
281315
("821.1", "83b2"),
282316
#("83b2", "83b2"), # 8.3b2 disabled the upgrade from 8.3
@@ -380,6 +414,8 @@ def test_upgrade(self, firmware, iso_remaster, create_vms, orig_version, iso_ver
380414
@pytest.mark.usefixtures("xcpng_chained")
381415
@pytest.mark.parametrize(("orig_version", "iso_version"), [
382416
("821.1-83b2", "83b2"),
417+
("80-83b2", "83b2"),
418+
("81-83b2", "83b2"),
383419
("ch821.1-83b2", "83b2"),
384420
])
385421
@pytest.mark.parametrize("firmware", ("uefi", "bios"))

0 commit comments

Comments
 (0)