storage: test large volumes#437
Merged
Merged
Conversation
01c5e43 to
859fc5c
Compare
12bb98b to
a57c109
Compare
859fc5c to
4cd93f5
Compare
last-genius
reviewed
Mar 27, 2026
4cd93f5 to
346eff1
Compare
5d3fa9b to
d96b2a9
Compare
080ee74 to
c130ebc
Compare
d96b2a9 to
a11ecb2
Compare
This was referenced Mar 31, 2026
9b0818e to
5800d41
Compare
a6a78f3 to
0f07c9b
Compare
f4248cf to
eb0eac0
Compare
stormi
approved these changes
Apr 15, 2026
9ade0b0 to
a63e581
Compare
cd1c5d4 to
27d715c
Compare
a63e581 to
d7826f6
Compare
27d715c to
aeaca44
Compare
d7826f6 to
a29798c
Compare
This was referenced Apr 24, 2026
aeaca44 to
b2250b7
Compare
a29798c to
9d399c6
Compare
Add pytest command-line option to configure default test VDI sizes, enabling testing of large volumes supported by the new qcow2 feature. The default remains 1GiB to avoid hardware requirements; larger sizes will be added as new jobs in jobs.py. Changes: - Add parse_size() to handle size string parsing (e.g., '2.5TiB', '1GiB') - Remove hardcoded integrity checksums to adapt to any volume size - Introduce randstream() helper to keep code compact and extract checksums - Update all storage fixtures to use configurable volume_size Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
At module or package scope, we may have a vdi still hanging around, using the space we may need for another test Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
With larger volume sizes, the exported images may not fit in /tmp. The large_temp_dir fixture still defaults to /tmp when no nfs configuration is available, to keep the tests runnable, with small volume sizes, without a nfs server. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Resize test VM's VDI to match the --volume-size parameter to support testing with different volume sizes. Dynamically calculate expected XVA sizes and handle filesystem resizing on Alpine systems. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Remove hardcoded 'xvdb' device name and use the device name returned by vm.connect_vdi() to support flexible device naming. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
b2250b7 to
3470670
Compare
9d399c6 to
2d28eea
Compare
Base automatically changed from
gln/storage-debugger-xva-retention-uxrt
to
master
May 12, 2026 12:32
stormi
reviewed
May 12, 2026
| # to ensure we can export and import large xva images | ||
| randstream(vm, 'generate --size 500MiB /root/data') | ||
| randstream(vm, 'validate --expected-checksum 24e905d6 /root/data') | ||
| is_alpine = vm.ssh_with_result('apk --version').returncode == 0 |
Member
There was a problem hiding this comment.
You could use the method exposed by VM to get the package manager.
stormi
reviewed
May 12, 2026
Comment on lines
+239
to
+251
| if is_alpine: | ||
| # growpart is not available in alpine 3.12 | ||
| # vm.ssh('apk add cloud-utils-growpart e2fsprogs-extra') | ||
| vm.ssh('apk add gawk util-linux e2fsprogs-extra') | ||
| vm.ssh('wget https://raw.githubusercontent.com/canonical/cloud-utils/main/bin/growpart -O /usr/bin/growpart') | ||
| vm.ssh('chmod +x /usr/bin/growpart') | ||
| # TODO: maybe use `findmnt -no SOURCE /` from util-linux to get the blockdevice mounted on / | ||
| growpart_returncode = vm.ssh_with_result('growpart /dev/xvda 3').returncode | ||
| assert growpart_returncode in [0, 1] # growpart returns 1 if the size is already the expected one | ||
| vm.ssh('resize2fs /dev/xvda3') | ||
| stream_size = volume_size // 2 | ||
| else: | ||
| stream_size = 500 * MiB |
Member
There was a problem hiding this comment.
Let's improve the VM object so that it can grow partitions on a wider variety of OSes (RHEL-like, debian...)
Millefeuille42
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a tree containing 19 PRs:
mastermaster