-
Notifications
You must be signed in to change notification settings - Fork 6
Storage Tests for qcow2 vdi image format #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
0610307
to
c421cc4
Compare
1d35ab2
to
da6c5d5
Compare
da6c5d5
to
5ecdfa2
Compare
sr = host.sr_create('zfs-vol', "ZFS-local-SR-test", { | ||
'device': '/dev/' + sr_disk_wiped, | ||
'preferred-image-formats': image_format | ||
}, verify=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test it @rushikeshjadhav ? We don't support QCOW2 with ZFS vol driver (SMAPIv3 plugin).
So we must not add image_format
for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, although the test passes, its volume is not of qcow2 format. Will remove it and add additional checks for qcow2 VDI validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added additional check for qcow2 VDI validation as well with test_vdi_image_format
.
38db6d5
to
79264c0
Compare
79264c0
to
6360b2e
Compare
6360b2e
to
0e5f73a
Compare
The CI workflow is not run on the PR. We should run it before merging. |
There are a few problems to fix:
|
@rushikeshjadhav the CI should run when using a branch directly in this repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically installing packages that support qcow2 could have been a good idea, but here it might cause more friction than it avoids.
0e5f73a
to
6426939
Compare
I have pushed to https://github.com/xcp-ng/xcp-ng-tests/tree/storage-qcow2, will check on CI. |
6426939
to
fd8fa37
Compare
This is found to be working. Kindly see @Wescoeur @Nambrok if it can be merged. |
tests/storage/zfs/test_zfs_sr.py
Outdated
assert not vdi_is_open(vdi_on_zfs_sr) | ||
|
||
def test_vdi_image_format(self, vdi_on_zfs_sr: VDI, image_format: str): | ||
assert vdi_on_zfs_sr.get_image_format() == image_format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against it but it will not work on a "normal" sm version. The image-format
sm-config key is only available with a QCOW2 sm version.
In case of a normal sm, it will give you None
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We would like the tests to pass with current sm if the configuration asks to just test for VHD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nambrok, do we plan to add the sm-config
key to the next SM version? If not, is there a reason to remove it?
If we don’t want to continue using the sm-config
key, would reading the header of a VHD or QCOW2 file from the actual file or volume be a suitable alternative?
This seems an important test, as in current sm, the driver creates a VHD even when requested for a QCOW2 file, and all tests pass, which they shouldn’t.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just skip the test if sm
doesn't support QCOW2? We need to think in two timelines at once. The current one, with sm
not supporting QCOW2 nor image-format, and the future one, where they're supported. If we want to merge this PR to master, we need both to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, have made changes to support both SM and skip test if it's not applicable.
tests/storage/xfs/conftest.py
Outdated
@pytest.fixture(scope='package') | ||
def xfs_sr(unused_512B_disks: dict[Host, list[Host.BlockDeviceInfo]], host_with_xfsprogs: Host | ||
def xfs_sr(unused_512B_disks: dict[Host, | ||
list[Host.BlockDeviceInfo]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer the type to be on the same line as the variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
… format Signed-off-by: Rushikesh Jadhav <[email protected]>
… format Signed-off-by: Rushikesh Jadhav <[email protected]>
… format Signed-off-by: Rushikesh Jadhav <[email protected]>
… format Signed-off-by: Rushikesh Jadhav <[email protected]>
…cow2 vdi image format Signed-off-by: Rushikesh Jadhav <[email protected]>
fd8fa37
to
9f1a899
Compare
Incorporating
image-format
fixture into following SR types for storage tests