Skip to content
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

Update the expectation for libvirt_guests #6065

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def chk_on_boot(status_error, on_boot):

:param status_error: positive test if status_error is "no", otherwise
negative test
:param on_boot: action taking on host booting
:param on_boot: action taking on host booting which set in the conf file
"""
if status_error == "no":
if on_boot == "start" or transient_vm:
for dom in vms:
if on_boot != "ignore":
for dom in active_persistent_vms:
if not dom.is_alive():
test.fail("guest:%s should be running after "
"restarting libvirt-guests." % dom.name)
Expand Down Expand Up @@ -353,6 +353,11 @@ def transfer_to_transient(per_guest_name):
process.run("cat /etc/sysconfig/libvirt-guests", shell=True)

tail_messages = get_log()
# Before restart libvirt-guests, check the status of all VMs
active_persistent_vms = []
for dom in vms:
if dom.is_alive and dom.is_persistent:
active_persistent_vms.append(dom)
# Even though libvirt-guests was designed to operate guests when
# host shutdown. The purpose can also be fulfilled by restart the
# libvirt-guests service.
Expand Down