-
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
tests/storage/ext/conftest.py
Outdated
def ext_sr(host: Host, unused_512B_disks: dict[Host, list[Host.BlockDeviceInfo]]) -> Generator[SR]: | ||
def ext_sr(host: Host, | ||
unused_512B_disks: dict[Host, list[Host.BlockDeviceInfo]], | ||
image_format) -> Generator[SR]: |
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.
Could you add the type on 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.
Sure, added here and other possible places.
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.
tests/storage/conftest.py
Outdated
def check_qcow2_installed(host): | ||
if host.file_exists(QCOW2_REPO_FILE): | ||
raise Exception( | ||
f'{QCOW2_REPO_FILE} is already installed on host {host}. This should not be the case.' |
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 see where this comes from, but that doesn't work here. We want to keep the ability to install any packages on the test hosts, and the test must not tell us what to do here. It's different from the xostor case which is already a production feature and is tested using what's in the dedicated test repositories.
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.
It was in an effort to keep the test standalone and work on unmodified host. We can remove it if it does not go inline with the test framework. Removing it would mean, the test would work even in case of manual preinstalled qcow2.
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 discussed it with others and, yes, we prefer that the test just assumes that qcow2 is available if we ask for qcow2 tests.
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.
This is now removed.
tests/storage/conftest.py
Outdated
def remove_qcow2(host): | ||
logging.info(f"Cleaning up qcow2 packages from host {host}...") | ||
host.remove_xcpng_repo(QCOW2_REPO) | ||
host.yum_downgrade(["sm", "sm-fairlock", "blktap"]) |
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.
This is going to leave the hosts in a state that is not necessarily the initial state. You don't know if the contents enabled repositories match what we decided to install on the hosts to run the tests on it.
In addition to this, all this code will soon have to be deleted, once qcow2 packages are moved to the main testing repositories.
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.
So, restoring yum saved state would be better in such case.
Once the qcow2 packages are moved to the main testing repo, we’ll still need to install them during tests or manually pre-tests, right? Or is the plan to merge the packages so that no separate installation of qcow2-related packages is needed?
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.
As mentioned earlier, it is assumed that qcow2 is installed and no specific package management is expected from the test, so removing this as well.
0e5f73a
to
6426939
Compare
I have pushed to https://github.com/xcp-ng/xcp-ng-tests/tree/storage-qcow2, will check on CI. |
… format Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
… format Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
… format Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
… format Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
…cow2 vdi image format Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
6426939
to
fd8fa37
Compare
This is found to be working. Kindly see @Wescoeur @Nambrok if it can be merged. |
Incorporating
image-format
fixture into following SR types for storage tests