7 Commits

Author SHA1 Message Date
Albert Esteve
fc6e58d9e6 reuse: addheader test/*.py
Add SPDX header to python files with
the 'py' extension in the test directory.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Nir Soffer
0f5f5da78a client: Optimize upload to new image
When we upload to a new disk using qcow2 format or new file we know that
the disk is empty and the entire disk contents is read as zeros by the
guest. In this case we can skip zero extents on the source image instead
of zeroing them on the destination image.

Zeroing on the destination image is usually fast, but when uploading big
images it can slow down the upload a lot. When uploading to qcow2 image,
zeroing creates suboptimal image that will be slower to read and copy
later.

Example upload of empty 8 TiB image:

Before:

    ./ovirt-img upload-disk -c engine --storage-domain fc-01 empty-8t.qcow2
    [ 100% ] 8.00 TiB, 222.82 s, 36.77 GiB/s | upload completed

After:

    ./ovirt-img upload-disk -c engine --storage-domain fc-01 empty-8t.qcow2
    [ 100% ] 8.00 TiB, 11.51 s, 711.88 GiB/s | upload completed

Example upload of 8 TiB Fedora 35 image:

Before:

    $ ./ovirt-img upload-disk -c engine --storage-domain fc-01 fedora-35-8t.qcow2
    [ 100% ] 8.00 TiB, 317.88 s, 25.77 GiB/s | upload completed

After:

    $ ./ovirt-img upload-disk -c engine --storage-domain fc-01 fedora-35-8t.qcow2
    [ 100% ] 8.00 TiB, 109.13 s, 75.07 GiB/s | upload completed

Fixes: #76
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-08-01 16:46:37 +02:00
Nir Soffer
8cdb4cd540 tests: Update comment about comparing images
We know why we cannot compare allocation for raw and qcow2 images.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-08-01 16:46:37 +02:00
Nir Soffer
85058996c2 test: Add test for concurrent downloads
Test 10 concurrent downloads, each creating 4 connections, reproducing
the bug with the default backlog size.

Bug-Url: https://bugzilla.redhat.com/2066113
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-03-21 14:03:22 +01:00
Nir Soffer
eebcfabce6 test: Add client stress test
Add stress test uploading and downloading empty image in a loop. This
reproduce the issue when the io executor close the destination backend
before one of the workers clone it, causing a successful transfer to
fail.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-01-19 16:45:08 +01:00
Nir Soffer
ddabf50a7e extent: Move backends.image to extent
Extents belongs to the core package, they are not a backend thing.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-01-19 13:51:28 +01:00
Nir Soffer
3fc44d98fc pypi: Eliminate the daemon directory
This make it easier to work with the project and to improve packaging.
For example, README.md is now at the expected location, so it is
packaged automatically for pypi.

Change-Id: Ib1a456054de34146bf2a4f39a69ccf1756b99e41
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-10-21 19:39:45 +03:00