Skip to content

Commit 8c3a3f3

Browse files
committed
storage: add jobs for large volume tests
Mark LVM and lvmoiscsi tests that allocate large VDIs with disk_space_allocation, and all test_full_vdi_write tests with disk_throughput_intensive, to allow running large-VDI jobs only on hardware that can handle the respective disk requirements. Add storage-main-16tb-{thin,thick,full-write} and storage-migrations-16tb-{thin,thick} jobs that use these markers to split 16TiB volume testing by disk speed requirement. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
1 parent 53fc802 commit 8c3a3f3

13 files changed

Lines changed: 118 additions & 0 deletions

jobs.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,62 @@
9090
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks",
9191
"name_filter": "not migration and not linstor",
9292
},
93+
"storage-main-16tb-thin": {
94+
"description":
95+
"same as storage-main with 16TiB VDIs, no gzip XVAs and no test requiring 16TiB allocation",
96+
"requirements": [
97+
"A pool with at least 3 hosts.",
98+
"An additional free disk on every host.",
99+
"Configuration in data.py for each remote SR that will be tested.",
100+
"A small VM that can be imported on the SRs.",
101+
],
102+
"nb_pools": 1,
103+
"params": {
104+
"--vm": "single/small_vm",
105+
"--volume-size": "16TiB",
106+
},
107+
"paths": ["tests/storage"],
108+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
109+
" and not disk_space_allocation and not disk_throughput_intensive",
110+
"name_filter": "not migration and not linstor and not gzip",
111+
},
112+
"storage-main-16tb-thick": {
113+
"description":
114+
"same as storage-main with 16TiB VDIs, no gzip XVAs and tests requiring 16TiB allocation",
115+
"requirements": [
116+
"A pool with at least 3 hosts.",
117+
"An additional free disk on every host.",
118+
"Configuration in data.py for each remote SR that will be tested.",
119+
"A small VM that can be imported on the SRs.",
120+
],
121+
"nb_pools": 1,
122+
"params": {
123+
"--vm": "single/small_vm",
124+
"--volume-size": "16TiB",
125+
},
126+
"paths": ["tests/storage"],
127+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
128+
" and not disk_throughput_intensive and disk_space_allocation",
129+
"name_filter": "not migration and not linstor and not gzip",
130+
},
131+
"storage-main-16tb-full-write": {
132+
"description": "storage tests actually writing the full 16TiB volumes",
133+
"requirements": [
134+
"A pool with at least 3 hosts.",
135+
"An additional free disk on every host.",
136+
"Configuration in data.py for each remote SR that will be tested.",
137+
"A small VM that can be imported on the SRs.",
138+
],
139+
"nb_pools": 1,
140+
"params": {
141+
"--vm": "single/small_vm",
142+
"--volume-size": "16TiB",
143+
},
144+
"paths": ["tests/storage"],
145+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
146+
" and disk_throughput_intensive",
147+
"name_filter": "not migration and not linstor and not gzip",
148+
},
93149
"storage-migrations": {
94150
"description": "tests migrations with all storage drivers",
95151
"requirements": [
@@ -107,6 +163,42 @@
107163
"markers": "not unused_4k_disks",
108164
"name_filter": "migration and not linstor",
109165
},
166+
"storage-migrations-16tb-thin": {
167+
"description": "same as storage-migrations with 16TiB VDIs, and no test requiring 16TiB allocation",
168+
"requirements": [
169+
"A pool with at least 3 hosts.",
170+
"An additional free disk on every host.",
171+
"A second pool with at least 1 host and a SR to receive VMs.",
172+
"Configuration in data.py for each remote SR that will be tested.",
173+
"A small VM that can be imported on the SRs.",
174+
],
175+
"nb_pools": 2,
176+
"params": {
177+
"--vm": "single/small_vm",
178+
"--volume-size": "16TiB",
179+
},
180+
"paths": ["tests/storage"],
181+
"markers": "not unused_4k_disks and not disk_space_allocation",
182+
"name_filter": "migration and not linstor",
183+
},
184+
"storage-migrations-16tb-thick": {
185+
"description": "same as storage-migrations with 16TiB VDIs, and tests requiring 16TiB allocation",
186+
"requirements": [
187+
"A pool with at least 3 hosts.",
188+
"An additional free disk on every host.",
189+
"A second pool with at least 1 host and a SR to receive VMs.",
190+
"Configuration in data.py for each remote SR that will be tested.",
191+
"A small VM that can be imported on the SRs.",
192+
],
193+
"nb_pools": 2,
194+
"params": {
195+
"--vm": "single/small_vm",
196+
"--volume-size": "16TiB",
197+
},
198+
"paths": ["tests/storage"],
199+
"markers": "not unused_4k_disks and disk_space_allocation",
200+
"name_filter": "migration and not linstor",
201+
},
110202
"storage-reboots": {
111203
"description": "storage driver tests that involve rebooting hosts (except flaky tests)",
112204
"requirements": [

pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ markers =
3232
multi_vms: tests that it would be good to run on a variety of VMs (includes `small_vm` but excludes `big_vm`).
3333
debian_uefi_vm: tests that require a Debian UEFI VM
3434

35+
# * Disk-related markers
36+
disk_space_allocation: tests that allocate a large VDI (disk won't be fully written, slow disk is OK).
37+
disk_throughput_intensive: tests that fill a large VDI entirely (require a fast disk).
38+
3539
# * Other markers
3640
reboot: tests that reboot one or more hosts.
3741
flaky: flaky tests. Usually pass, but sometimes fail unexpectedly.

tests/storage/ext/test_ext_sr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def test_vdi_export_import(
106106
vdi_export_import(storage_test_vm, ext_sr, image_format, temp_large_dir, defer)
107107

108108
@pytest.mark.small_vm
109+
@pytest.mark.disk_throughput_intensive
109110
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_ext_sr: VDI, defer: Defer):
110111
full_vdi_write(storage_test_vm, vdi_on_ext_sr, defer)
111112

tests/storage/lvm/test_lvm_sr.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ class TestLVMSR:
5959
def test_quicktest(self, lvm_sr):
6060
lvm_sr.run_quicktest()
6161

62+
@pytest.mark.disk_space_allocation
6263
def test_vdi_is_not_open(self, vdi_on_lvm_sr):
6364
assert not vdi_is_open(vdi_on_lvm_sr)
6465

66+
@pytest.mark.disk_space_allocation
6567
def test_vdi_image_format(self, vdi_on_lvm_sr: VDI, image_format: ImageFormat):
6668
fmt = vdi_on_lvm_sr.get_image_format()
6769
# feature-detect: if the SM doesn't report image-format, skip this check
@@ -142,12 +144,15 @@ def test_failing_resize_on_inflate_after_setSizePhys(self, host, lvm_sr, vm_on_l
142144

143145
@pytest.mark.small_vm
144146
@pytest.mark.parametrize("vdi_op", ["snapshot", "clone"])
147+
@pytest.mark.disk_space_allocation
145148
def test_coalesce(
146149
self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, vdi_op: CoalesceOperation, defer: Defer
147150
):
148151
coalesce_integrity(storage_test_vm, vdi_on_lvm_sr, vdi_op, defer)
149152

150153
@pytest.mark.small_vm
154+
@pytest.mark.disk_space_allocation
155+
@pytest.mark.disk_throughput_intensive
151156
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, defer: Defer):
152157
full_vdi_write(storage_test_vm, vdi_on_lvm_sr, defer)
153158

@@ -159,10 +164,12 @@ def test_invalid_vdi_size(self, lvm_sr: SR, image_format: ImageFormat):
159164

160165
@pytest.mark.small_vm
161166
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
167+
@pytest.mark.disk_space_allocation
162168
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression, temp_large_dir: str, defer: Defer):
163169
xva_export_import(vm_on_lvm_sr, compression, temp_large_dir, defer)
164170

165171
@pytest.mark.small_vm
172+
@pytest.mark.disk_space_allocation
166173
def test_vdi_export_import(
167174
self, storage_test_vm: VM, lvm_sr: SR, image_format: ImageFormat, temp_large_dir: str, defer: Defer
168175
):

tests/storage/lvm/test_lvm_sr_crosspool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.small_vm # run with a small VM to test the features
1313
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1414
@pytest.mark.usefixtures("hostB1", "local_sr_on_hostB1")
15+
@pytest.mark.disk_space_allocation
1516
class Test:
1617
def test_cold_crosspool_migration(self, host, hostB1, vm_on_lvm_sr, local_sr_on_hostB1):
1718
cold_migration_then_come_back(vm_on_lvm_sr, host, hostB1, local_sr_on_hostB1)

tests/storage/lvm/test_lvm_sr_intrapool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.small_vm # run with a small VM to test the features
1313
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1414
@pytest.mark.usefixtures("hostA2", "local_sr_on_hostA2")
15+
@pytest.mark.disk_space_allocation
1516
class Test:
1617
def test_cold_intrapool_migration(self, host, hostA2, vm_on_lvm_sr, local_sr_on_hostA2):
1718
cold_migration_then_come_back(vm_on_lvm_sr, host, hostA2, local_sr_on_hostA2)

tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class TestLVMOISCSISR:
4343
def test_quicktest(self, lvmoiscsi_sr):
4444
lvmoiscsi_sr.run_quicktest()
4545

46+
@pytest.mark.disk_space_allocation
4647
def test_vdi_is_not_open(self, vdi_on_lvmoiscsi_sr):
4748
assert not vdi_is_open(vdi_on_lvmoiscsi_sr)
4849

@@ -67,6 +68,7 @@ def test_snapshot(self, vm_on_lvmoiscsi_sr):
6768

6869
@pytest.mark.small_vm
6970
@pytest.mark.parametrize("vdi_op", ["snapshot", "clone"])
71+
@pytest.mark.disk_space_allocation
7072
def test_coalesce(
7173
self,
7274
storage_test_vm: 'VM',
@@ -77,6 +79,8 @@ def test_coalesce(
7779
coalesce_integrity(storage_test_vm, vdi_on_lvmoiscsi_sr, vdi_op, defer)
7880

7981
@pytest.mark.small_vm
82+
@pytest.mark.disk_space_allocation
83+
@pytest.mark.disk_throughput_intensive
8084
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvmoiscsi_sr: VDI, defer: Defer):
8185
full_vdi_write(storage_test_vm, vdi_on_lvmoiscsi_sr, defer)
8286

@@ -88,12 +92,14 @@ def test_invalid_vdi_size(self, lvmoiscsi_sr: SR, image_format: ImageFormat):
8892

8993
@pytest.mark.small_vm
9094
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
95+
@pytest.mark.disk_space_allocation
9196
def test_xva_export_import(
9297
self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression, temp_large_dir: str, defer: Defer
9398
):
9499
xva_export_import(vm_on_lvmoiscsi_sr, compression, temp_large_dir, defer)
95100

96101
@pytest.mark.small_vm
102+
@pytest.mark.disk_space_allocation
97103
def test_vdi_export_import(
98104
self, storage_test_vm: VM, lvmoiscsi_sr: SR, image_format: ImageFormat, temp_large_dir: str, defer: Defer
99105
):

tests/storage/lvmoiscsi/test_lvmoiscsi_sr_crosspool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.small_vm # run with a small VM to test the features
1313
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1414
@pytest.mark.usefixtures("hostB1", "local_sr_on_hostB1")
15+
@pytest.mark.disk_space_allocation
1516
class Test:
1617
def test_cold_crosspool_migration(self, host, hostB1, vm_on_lvmoiscsi_sr, local_sr_on_hostB1):
1718
cold_migration_then_come_back(vm_on_lvmoiscsi_sr, host, hostB1, local_sr_on_hostB1)

tests/storage/lvmoiscsi/test_lvmoiscsi_sr_intrapool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.small_vm # run with a small VM to test the features
1313
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1414
@pytest.mark.usefixtures("hostA2", "local_sr_on_hostA2")
15+
@pytest.mark.disk_space_allocation
1516
class Test:
1617
def test_live_intrapool_shared_migration(self, host, hostA2, vm_on_lvmoiscsi_sr):
1718
sr = vm_on_lvmoiscsi_sr.get_sr()

tests/storage/nfs/test_nfs_sr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def test_coalesce(
123123
coalesce_integrity(storage_test_vm, dispatch_nfs, vdi_op, defer)
124124

125125
@pytest.mark.small_vm
126+
@pytest.mark.disk_throughput_intensive
126127
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_nfs_sr: VDI, defer: Defer):
127128
full_vdi_write(storage_test_vm, vdi_on_nfs_sr, defer)
128129

0 commit comments

Comments
 (0)