Skip to content

Commit f721995

Browse files
committed
install: add installation of xcp-ng 8.0 and 8.1, upgrades to 8.3
Signed-off-by: Yann Dirson <[email protected]>
1 parent b7a7c72 commit f721995

File tree

2 files changed

+50
-10
lines changed

2 files changed

+50
-10
lines changed

data.py-dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ ISO_IMAGES: Dict[str, "IsoImageDef"] = {
132132
'821.1': {'path': "8.2/xcp-ng-8.2.1-20231130.iso"},
133133
'821': {'path': "8.2/xcp-ng-8.2.1.iso"},
134134
'820': {'path': "8.2/xcp-ng-8.2.0.iso"},
135+
'81': {'path': "8.1/xcp-ng-8.1.0-2.iso"},
136+
'80': {'path': "8.0/xcp-ng-8.0.0.iso"},
135137
'xs8': {'path': "XenServer8_2024-03-18.iso"},
136138
'ch821.1': {'path': "CitrixHypervisor-8.2.1-2306-install-cd.iso"},
137139
'ch821': {'path': "CitrixHypervisor-8.2.1-install-cd.iso"},

tests/install/test.py

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TestNested:
1818
"83nightly",
1919
"83rc1", "83b2", "83b1",
2020
"821.1",
21+
"81", "80",
2122
"xs8", "ch821.1",
2223
))
2324
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
@@ -71,6 +72,8 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
7172
expected_rel = {
7273
"ch821.1": "8.2.1",
7374
"xs8": "8.4.0",
75+
"80": "8.0.0",
76+
"81": "8.1.0",
7477
"821.1": "8.2.1",
7578
"83b1": "8.3.0",
7679
"83b2": "8.3.0",
@@ -117,26 +120,52 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
117120
# wait for XAPI
118121
wait_for(pool.master.is_enabled, "Wait for XAPI to be ready", timeout_secs=30 * 60)
119122

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",
123125
"network-init",
124126
"storage-init",
125127
"generate-iscsi-iqn",
126128
"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}"],
130158
check=False, simple_output=False,
131159
).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:
135164
out = pool.master.ssh(["systemctl", "status", service], check=False)
136165
logging.warning("service status: %s", out)
137166
out = pool.master.ssh(["grep", "-r", service, "/var/log"], check=False)
138167
logging.warning("in logs: %s", out)
139-
raise
168+
raise
140169

141170
logging.info("Powering off pool master")
142171
try:
@@ -170,6 +199,7 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
170199
"83nightly",
171200
"83rc1", "83b2", "83b1",
172201
"821.1",
202+
"81", "80",
173203
"xs8", "ch821.1",
174204
))
175205
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
@@ -187,6 +217,8 @@ def test_boot_inst(self, create_vms,
187217
"83b2-83nightly",
188218
"83b1-83nightly",
189219
"821.1-83nightly",
220+
"81-83nightly",
221+
"80-83nightly",
190222
"xs8-83nightly",
191223
"ch821.1-83nightly",
192224
"821.1-821.1",
@@ -207,6 +239,8 @@ def test_boot_upg(self, create_vms,
207239
"83b2-83nightly-83nightly",
208240
"83b1-83nightly-83nightly",
209241
"821.1-83nightly-83nightly",
242+
"81-83nightly-83nightly",
243+
"80-83nightly-83nightly",
210244
"xs8-83nightly-83nightly",
211245
"ch821.1-83nightly-83nightly",
212246
"821.1-821.1-821.1",
@@ -227,6 +261,8 @@ def test_boot_rst(self, create_vms,
227261
("83b2", "83nightly"),
228262
("83b1", "83nightly"),
229263
("821.1", "83nightly"),
264+
("81", "83nightly"),
265+
("80", "83nightly"),
230266
("xs8", "83nightly"),
231267
("ch821.1", "83nightly"),
232268
("821.1", "821.1"),
@@ -254,6 +290,8 @@ def test_upgrade(self, vm_booted_with_installer, install_disk,
254290
("83b2-83nightly", "83nightly"),
255291
("83b1-83nightly", "83nightly"),
256292
("821.1-83nightly", "83nightly"),
293+
("81-83nightly", "83nightly"),
294+
("80-83nightly", "83nightly"),
257295
("xs8-83nightly", "83nightly"),
258296
("ch821.1-83nightly", "83nightly"),
259297
("821.1-821.1", "821.1"),

0 commit comments

Comments
 (0)