Skip to content

Commit d6b648a

Browse files
committed
install: add installation of xcp-ng 8.0 and 8.1, upgrades to 8.3b2
1 parent 97bd56b commit d6b648a

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
@@ -17,12 +17,15 @@
1717
@pytest.mark.dependency()
1818
class TestNested:
1919
@pytest.mark.parametrize("iso_version", (
20+
"80", "81",
2021
"ch821.1", "xs8",
2122
"821.1", "83b2",
2223
))
2324
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
2425
@pytest.mark.installer_iso(
2526
lambda version: {
27+
"80": "xcpng-8.0",
28+
"81": "xcpng-8.1",
2629
"821.1": "xcpng-8.2.1-2023",
2730
"83b2": "xcpng-8.3-beta2",
2831
"ch821.1": "ch-8.2.1-23",
@@ -144,14 +147,17 @@ def test_install(self, request, firmware, iso_version, iso_remaster, create_vms)
144147
@pytest.mark.usefixtures("xcpng_chained")
145148
# FIXME take "uefi" outa here and allow "bios"
146149
@pytest.mark.parametrize("mode", [
150+
"80", "81",
147151
"ch821.1", "xs8",
148152
"821.1",
149153
"821.1-821.1",
150154
"83b2",
151155
"821.1-83b2",
156+
"81-83b2", "80-83b2",
152157
"ch821.1-83b2",
153158
#"83b2-83b2", # 8.3b2 disabled the upgrade from 8.3
154159
"821.1-83b2-83b2",
160+
"81-83b2-83b2", "80-83b2-83b2",
155161
"ch821.1-83b2-83b2",
156162
])
157163
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
@@ -188,6 +194,8 @@ def test_firstboot(self, firmware, request, create_vms, mode):
188194
expected_rel = {
189195
"ch821.1": "8.2.1",
190196
"xs8": "8.4.0",
197+
"80": "8.0.0",
198+
"81": "8.1.0",
191199
"821.1": "8.2.1",
192200
"83b2": "8.3.0",
193201
}[expected_rel_id]
@@ -241,21 +249,45 @@ def test_firstboot(self, firmware, request, create_vms, mode):
241249
# wait for XAPI
242250
wait_for(pool.master.is_enabled, "Wait for XAPI to be ready", timeout_secs=30 * 60)
243251

244-
# check for firstboot issues
245-
# FIXME: flaky, must check logs extraction on failure
246-
for service in ["control-domain-params-init",
252+
if lsb_rel in ["8.2.1", "8.3.0", "8.4.0"]:
253+
SERVICES =["control-domain-params-init",
247254
"network-init",
248255
"storage-init",
249256
"generate-iscsi-iqn",
250257
"create-guest-templates",
251-
]:
252-
try:
253-
wait_for(lambda: pool.master.ssh(["test", "-e", f"/var/lib/misc/ran-{service}"],
258+
]
259+
STAMPS_DIR = "/var/lib/misc"
260+
STAMPS = [f"ran-{service}" for service in SERVICES]
261+
elif lsb_rel in ["8.0.0", "8.1.0"]:
262+
SERVICES = ["xs-firstboot"]
263+
STAMPS_DIR = "/etc/firstboot.d/state"
264+
STAMPS = [
265+
"05-prepare-networking",
266+
"10-prepare-storage",
267+
"15-set-default-storage",
268+
"20-udev-storage",
269+
"25-multipath",
270+
"40-generate-iscsi-iqn",
271+
"50-prepare-control-domain-params",
272+
"60-import-keys",
273+
"60-upgrade-likewise-to-pbis",
274+
"62-create-guest-templates",
275+
"80-common-criteria",
276+
"90-flush-pool-db",
277+
"95-legacy-logrotate",
278+
"99-remove-firstboot-flag",
279+
]
280+
# check for firstboot issues
281+
# FIXME: flaky, must check logs extraction on failure
282+
try:
283+
for stamp in STAMPS:
284+
wait_for(lambda: pool.master.ssh(["test", "-e", f"{STAMPS_DIR}/{stamp}"],
254285
check=False, simple_output=False,
255286
).returncode == 0,
256-
f"Wait for ran-{service} stamp")
257-
except TimeoutError:
258-
logging.warning("investigating lack of ran-{service} stamp")
287+
f"Wait for {stamp} stamp")
288+
except TimeoutError:
289+
logging.warning("investigating lack of {stamp} service stamp")
290+
for service in SERVICES:
259291
out = pool.master.ssh(["systemctl", "status", service], check=False)
260292
logging.warning("service status: %s", out)
261293
out = pool.master.ssh(["grep", "-r", service, "/var/log"], check=False)
@@ -298,6 +330,8 @@ def test_firstboot(self, firmware, request, create_vms, mode):
298330
@pytest.mark.usefixtures("xcpng_chained")
299331
@pytest.mark.parametrize(("orig_version", "iso_version"), [
300332
("821.1", "821.1"),
333+
("80", "83b2"),
334+
("81", "83b2"),
301335
("ch821.1", "83b2"),
302336
("821.1", "83b2"),
303337
#("83b2", "83b2"), # 8.3b2 disabled the upgrade from 8.3
@@ -406,6 +440,8 @@ def test_upgrade(self, request, firmware, orig_version, iso_version, iso_remaste
406440
@pytest.mark.usefixtures("xcpng_chained")
407441
@pytest.mark.parametrize(("orig_version", "iso_version"), [
408442
("821.1-83b2", "83b2"),
443+
("80-83b2", "83b2"),
444+
("81-83b2", "83b2"),
409445
("ch821.1-83b2", "83b2"),
410446
])
411447
@pytest.mark.parametrize("firmware", ("uefi", "bios"))

0 commit comments

Comments
 (0)