Skip to content

Commit 0717a33

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 7854115 commit 0717a33

13 files changed

Lines changed: 111 additions & 2 deletions

jobs.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,62 @@ class JobData(TypedDict):
101101
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks",
102102
"name_filter": "not migration and not linstor",
103103
},
104+
"storage-main-large-thin": {
105+
"description":
106+
"same as storage-main with 3TiB VDIs, no large gzip XVAs creation and no test requiring 3TiB allocation",
107+
"requirements": [
108+
"A pool with at least 3 hosts.",
109+
"An additional free disk on every host.",
110+
"Configuration in data.py for each remote SR that will be tested.",
111+
"A small VM that can be imported on the SRs.",
112+
],
113+
"nb_pools": 1,
114+
"params": {
115+
"--vm": "single/small_vm",
116+
"--volume-size": "3TiB",
117+
},
118+
"paths": ["tests/storage"],
119+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
120+
" and not thick_provisioned and not disk_throughput_intensive",
121+
"name_filter": "not migration and not linstor and not gzip",
122+
},
123+
"storage-main-large-thick": {
124+
"description":
125+
"same as storage-main with 3TiB VDIs, no large gzip XVAs creation and tests requiring 3TiB allocation",
126+
"requirements": [
127+
"A pool with at least 3 hosts.",
128+
"An additional free disk on every host.",
129+
"Configuration in data.py for each remote SR that will be tested.",
130+
"A small VM that can be imported on the SRs.",
131+
],
132+
"nb_pools": 1,
133+
"params": {
134+
"--vm": "single/small_vm",
135+
"--volume-size": "3TiB",
136+
},
137+
"paths": ["tests/storage"],
138+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
139+
" and not disk_throughput_intensive and thick_provisioned",
140+
"name_filter": "not migration and not linstor and not gzip",
141+
},
142+
"storage-main-large-full-write": {
143+
"description": "storage tests actually writing the full 3TiB volumes",
144+
"requirements": [
145+
"A pool with at least 3 hosts.",
146+
"An additional free disk on every host.",
147+
"Configuration in data.py for each remote SR that will be tested.",
148+
"A small VM that can be imported on the SRs.",
149+
],
150+
"nb_pools": 1,
151+
"params": {
152+
"--vm": "single/small_vm",
153+
"--volume-size": "3TiB",
154+
},
155+
"paths": ["tests/storage"],
156+
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks"
157+
" and disk_throughput_intensive",
158+
"name_filter": "not migration and not linstor and not gzip",
159+
},
104160
"storage-migrations": {
105161
"description": "tests migrations with all storage drivers",
106162
"requirements": [
@@ -118,6 +174,42 @@ class JobData(TypedDict):
118174
"markers": "not unused_4k_disks",
119175
"name_filter": "migration and not linstor",
120176
},
177+
"storage-migrations-large-thin": {
178+
"description": "same as storage-migrations with 3TiB VDIs, and no test requiring 3TiB allocation",
179+
"requirements": [
180+
"A pool with at least 3 hosts.",
181+
"An additional free disk on every host.",
182+
"A second pool with at least 1 host and a SR to receive VMs.",
183+
"Configuration in data.py for each remote SR that will be tested.",
184+
"A small VM that can be imported on the SRs.",
185+
],
186+
"nb_pools": 2,
187+
"params": {
188+
"--vm": "single/small_vm",
189+
"--volume-size": "3TiB",
190+
},
191+
"paths": ["tests/storage"],
192+
"markers": "not unused_4k_disks and not thick_provisioned",
193+
"name_filter": "migration and not linstor",
194+
},
195+
"storage-migrations-large-thick": {
196+
"description": "same as storage-migrations with 3TiB VDIs, and tests requiring 3TiB allocation",
197+
"requirements": [
198+
"A pool with at least 3 hosts.",
199+
"An additional free disk on every host.",
200+
"A second pool with at least 1 host and a SR to receive VMs.",
201+
"Configuration in data.py for each remote SR that will be tested.",
202+
"A small VM that can be imported on the SRs.",
203+
],
204+
"nb_pools": 2,
205+
"params": {
206+
"--vm": "single/small_vm",
207+
"--volume-size": "3TiB",
208+
},
209+
"paths": ["tests/storage"],
210+
"markers": "not unused_4k_disks and thick_provisioned",
211+
"name_filter": "migration and not linstor",
212+
},
121213
"storage-reboots": {
122214
"description": "storage driver tests that involve rebooting hosts (except flaky tests)",
123215
"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+
thick_provisioned: tests that use thick provisioned SRs.
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
@@ -104,6 +104,7 @@ def test_vdi_export_import(self, storage_test_vm: VM, ext_sr: SR, image_format:
104104
vdi_export_import(storage_test_vm, ext_sr, image_format, temp_large_dir, defer)
105105

106106
@pytest.mark.small_vm
107+
@pytest.mark.disk_throughput_intensive
107108
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_ext_sr: VDI, defer: Defer):
108109
full_vdi_write(storage_test_vm, vdi_on_ext_sr, defer)
109110

tests/storage/lvm/test_lvm_sr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ def test_create_and_destroy_sr(self, host: Host,
5454
sr.destroy(verify=True)
5555

5656
@pytest.mark.usefixtures("lvm_sr")
57+
@pytest.mark.thick_provisioned
5758
class TestLVMSR:
5859
@pytest.mark.quicktest
5960
def test_quicktest(self, lvm_sr: SR) -> None:
6061
lvm_sr.run_quicktest()
6162

62-
def test_vdi_is_not_open(self, vdi_on_lvm_sr: VDI) -> None:
63+
def test_vdi_is_not_open(self, vdi_on_lvm_sr) -> None:
6364
assert not vdi_is_open(vdi_on_lvm_sr)
6465

6566
def test_vdi_image_format(self, vdi_on_lvm_sr: VDI, image_format: ImageFormat) -> None:
@@ -150,6 +151,7 @@ def test_coalesce(self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, vdi_op: Coalesc
150151
coalesce_integrity(storage_test_vm, vdi_on_lvm_sr, vdi_op, defer)
151152

152153
@pytest.mark.small_vm
154+
@pytest.mark.disk_throughput_intensive
153155
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvm_sr: VDI, defer: Defer):
154156
full_vdi_write(storage_test_vm, vdi_on_lvm_sr, defer)
155157

tests/storage/lvm/test_lvm_sr_crosspool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@pytest.mark.small_vm # run with a small VM to test the features
1616
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1717
@pytest.mark.usefixtures("hostB1", "local_sr_on_hostB1")
18+
@pytest.mark.thick_provisioned
1819
class Test:
1920
def test_cold_crosspool_migration(self, host: Host, hostB1: Host, vm_on_lvm_sr: VM, local_sr_on_hostB1: SR) -> None:
2021
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
@@ -15,6 +15,7 @@
1515
@pytest.mark.small_vm # run with a small VM to test the features
1616
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1717
@pytest.mark.usefixtures("hostA2", "local_sr_on_hostA2")
18+
@pytest.mark.thick_provisioned
1819
class Test:
1920
def test_cold_intrapool_migration(self, host: Host, hostA2: Host, vm_on_lvm_sr: VM, local_sr_on_hostA2: SR) -> None:
2021
cold_migration_then_come_back(vm_on_lvm_sr, host, hostA2, local_sr_on_hostA2)

tests/storage/lvmoiscsi/test_lvmoiscsi_sr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ def test_create_and_destroy_sr(self, host: Host, lvmoiscsi_device_config: dict[s
4343

4444
@pytest.mark.usefixtures('image_format')
4545
@pytest.mark.usefixtures("lvmoiscsi_sr")
46+
@pytest.mark.thick_provisioned
4647
class TestLVMOISCSISR:
4748
@pytest.mark.quicktest
4849
def test_quicktest(self, lvmoiscsi_sr: SR) -> None:
4950
lvmoiscsi_sr.run_quicktest()
5051

51-
def test_vdi_is_not_open(self, vdi_on_lvmoiscsi_sr: VDI) -> None:
52+
def test_vdi_is_not_open(self, vdi_on_lvmoiscsi_sr) -> None:
5253
assert not vdi_is_open(vdi_on_lvmoiscsi_sr)
5354

5455
@pytest.mark.small_vm # run with a small VM to test the features
@@ -77,6 +78,7 @@ def test_coalesce(self, storage_test_vm: 'VM', vdi_on_lvmoiscsi_sr: 'VDI', vdi_o
7778
coalesce_integrity(storage_test_vm, vdi_on_lvmoiscsi_sr, vdi_op, defer)
7879

7980
@pytest.mark.small_vm
81+
@pytest.mark.disk_throughput_intensive
8082
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_lvmoiscsi_sr: VDI, defer: Defer):
8183
full_vdi_write(storage_test_vm, vdi_on_lvmoiscsi_sr, defer)
8284

tests/storage/lvmoiscsi/test_lvmoiscsi_sr_crosspool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@pytest.mark.small_vm # run with a small VM to test the features
1616
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1717
@pytest.mark.usefixtures("hostB1", "local_sr_on_hostB1")
18+
@pytest.mark.thick_provisioned
1819
class Test:
1920
def test_cold_crosspool_migration(
2021
self, host: Host, hostB1: Host, vm_on_lvmoiscsi_sr: VM, local_sr_on_hostB1: SR

tests/storage/lvmoiscsi/test_lvmoiscsi_sr_intrapool_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@pytest.mark.small_vm # run with a small VM to test the features
1616
@pytest.mark.big_vm # and ideally with a big VM to test it scales
1717
@pytest.mark.usefixtures("hostA2", "local_sr_on_hostA2")
18+
@pytest.mark.thick_provisioned
1819
class Test:
1920
def test_live_intrapool_shared_migration(self, host: Host, hostA2: Host, vm_on_lvmoiscsi_sr: VM) -> None:
2021
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
@@ -122,6 +122,7 @@ def test_coalesce(self, storage_test_vm: VM, dispatch_nfs: VDI, vdi_op: Coalesce
122122
coalesce_integrity(storage_test_vm, dispatch_nfs, vdi_op, defer)
123123

124124
@pytest.mark.small_vm
125+
@pytest.mark.disk_throughput_intensive
125126
def test_full_vdi_write(self, storage_test_vm: VM, vdi_on_nfs_sr: VDI, defer: Defer):
126127
full_vdi_write(storage_test_vm, vdi_on_nfs_sr, defer)
127128

0 commit comments

Comments
 (0)