-
Notifications
You must be signed in to change notification settings - Fork 168
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
in_place_upgrade_guest: automates the case that verifies in place upgrade on a guest #6195
base: master
Are you sure you want to change the base?
Conversation
13edb78
to
f81bd26
Compare
6060ddd
to
65b6498
Compare
@dzhengfy @Yingshun Could you help review this PR? A few notes:
|
1d124cb
to
5acd880
Compare
list_kernel_cmd = "grubby --info=ALL | grep ^kernel" | ||
default_kernel_cmd = "grub2-set-default" | ||
variants: | ||
- to_rhelX.0: |
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.
Hi, Julia
I am Okay with it. Just to mention that, we may need to do some settings in CI. We need to ask CI to provision a guest with latest RHEL(X-1) OS. We need to make sure CI knows the minor release of RHEL(X-1).
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.
We have various guest in different versions in US/PEK2 storage server. So I think we just fetch it as we want.
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.
@dzhengfy This does make more sense to me (we have a rhelX.z machine and we are testing upgrading from rhelX-1.y --> X.z). However, how do we make sure the CI knows the minor release of rhelX-1.y - how do we know which guest is the latest to fetch? And what is the best way to fetch it?
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.
Update: understood - the test will assume that it already has a guest at version X-1.y on a host with version X.z.
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.
Others LGTM
release_check_cmd = "cat /etc/redhat-release" | ||
kernel_check_cmd = "uname -r" | ||
pagesize_check_cmd = "getconf PAGESIZE" | ||
compose_url = "http://download.eng.bos.redhat.com" |
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.
Remember to replace this internal URL with a pattern and we will pass the real value in Libvirt-CI
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.
@dzhengfy Done - created a PR in ci-shared-datas. One question: is it an issue that the test has baseurl={compose_url}/rhel-{target_major_release}/nightly...
? I'm not sure if the full path like this belongs in the code but I had struggled defining it completely in the cfg (especially getting vm_arch_name).
list_kernel_cmd = "grubby --info=ALL | grep ^kernel" | ||
default_kernel_cmd = "grub2-set-default" | ||
variants: | ||
- to_rhelX.0: |
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.
We have various guest in different versions in US/PEK2 storage server. So I think we just fetch it as we want.
8f8f59c
to
d6d4962
Compare
leapp_preupgrade_cmd = "leapp preupgrade --debug --no-rhsm" | ||
leapp_upgrade_cmd = "leapp upgrade --debug --no-rhsm" | ||
list_kernel_cmd = "grubby --info=ALL | grep ^kernel" | ||
default_kernel_cmd = "grub2-set-default" |
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.
On s390x there's no grub. grubby --set-default
is more agnostic (though it still requires running zipl
on s390x after using it).
Generally, I think setting the default kernel to boot is useful to live in its own helper function, it would make sense to add it here: https://github.com/avocado-framework/avocado-vt/blob/master/virttest/utils_test/__init__.py
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 call - I created a PR for that!
enabled=0 | ||
gpgcheck=0 | ||
""") | ||
session.cmd("cat <<EOF > %s %s\nEOF" % (upgrade_repos_path, upgrade_repos_content)) |
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 above, it's usually better to use the python library instead of bash in this case:
with(upgrade_repos_path...) as f:
f.write(f"""
[APPSTREAM]
...
gpgcheck=0
""")
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.
@smitterl How would I do so on the vm since with open() as f
tries to open the file on the host - I haven't been able to find an alternative for the guest.
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.
Thanks for this. I think this can be improved to be more generally useful, esp. on more architectures.
…rade on a guest Signed-off-by: Julia Graham <[email protected]>
@smitterl Thank you for the detailed feedback! I believe I have addressed all comments or added a question if confused. |
Case ID: VIRT-293757
Automates the case that verifies that an in place upgrade can be successfully completed on a guest. This case has already been automated by /tp-qemu/qemu/tests/in_place_upgrade.py - this specific test in tp-libvirt exists such that an in place guest upgrade test can be accomplished without depending on 'kar'.
This test specifically supports upgrading from rhel X-1 -> rhel X on a rhel X host.
Tests passing: