Skip to content

Commit 7080332

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 7080332

13 files changed

Lines changed: 115 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,15 @@ def test_failing_resize_on_inflate_after_setSizePhys(self, host, lvm_sr, vm_on_l
142142

143143
@pytest.mark.small_vm
144144
@pytest.mark.parametrize("vdi_op", ["snapshot", "clone"])
145+
@pytest.mark.disk_space_allocation
145146
def test_coalesce(
146147
self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, vdi_op: CoalesceOperation, defer: Defer
147148
):
148149
coalesce_integrity(storage_test_vm, vdi_on_lvm_sr, vdi_op, defer)
149150

150151
@pytest.mark.small_vm
152+
@pytest.mark.disk_space_allocation
153+
@pytest.mark.disk_throughput_intensive
151154
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, defer: Defer):
152155
full_vdi_write(storage_test_vm, vdi_on_lvm_sr, defer)
153156

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

160163
@pytest.mark.small_vm
161164
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
165+
@pytest.mark.disk_space_allocation
162166
def test_xva_export_import(self, vm_on_lvm_sr: VM, compression: XVACompression, temp_large_dir: str, defer: Defer):
163167
xva_export_import(vm_on_lvm_sr, compression, temp_large_dir, defer)
164168

165169
@pytest.mark.small_vm
170+
@pytest.mark.disk_space_allocation
166171
def test_vdi_export_import(
167172
self, storage_test_vm: VM, lvm_sr: SR, image_format: ImageFormat, temp_large_dir: str, defer: Defer
168173
):

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def test_snapshot(self, vm_on_lvmoiscsi_sr):
6767

6868
@pytest.mark.small_vm
6969
@pytest.mark.parametrize("vdi_op", ["snapshot", "clone"])
70+
@pytest.mark.disk_space_allocation
7071
def test_coalesce(
7172
self,
7273
storage_test_vm: 'VM',
@@ -77,6 +78,8 @@ def test_coalesce(
7778
coalesce_integrity(storage_test_vm, vdi_on_lvmoiscsi_sr, vdi_op, defer)
7879

7980
@pytest.mark.small_vm
81+
@pytest.mark.disk_space_allocation
82+
@pytest.mark.disk_throughput_intensive
8083
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvmoiscsi_sr: VDI, defer: Defer):
8184
full_vdi_write(storage_test_vm, vdi_on_lvmoiscsi_sr, defer)
8285

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

8992
@pytest.mark.small_vm
9093
@pytest.mark.parametrize("compression", ["none", "gzip", "zstd"])
94+
@pytest.mark.disk_space_allocation
9195
def test_xva_export_import(
9296
self, vm_on_lvmoiscsi_sr: VM, compression: XVACompression, temp_large_dir: str, defer: Defer
9397
):
9498
xva_export_import(vm_on_lvmoiscsi_sr, compression, temp_large_dir, defer)
9599

96100
@pytest.mark.small_vm
101+
@pytest.mark.disk_space_allocation
97102
def test_vdi_export_import(
98103
self, storage_test_vm: VM, lvmoiscsi_sr: SR, image_format: ImageFormat, temp_large_dir: str, defer: Defer
99104
):

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)