[Bug 1048783] New: libvirt-guests does not suspend all guests
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783 Bug ID: 1048783 Summary: libvirt-guests does not suspend all guests Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Virtualization:Tools Assignee: virt-bugs@suse.de Reporter: richard@nod.at QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The helper script /usr/lib64/libvirt/libvirt-guests.sh suspends all guests upon stop and resumes them later. I found that it does not suspend all guests in my case when PARALLEL_SHUTDOWN=0 in /etc/sysconfig/libvirt-guests. The script constructs a file of the format "URI GUEST_O-UUID GUEST_1-UUID ... GUEST_N-UUID". In the bad case my file contained a new line right after the first guest causing the script to think that the next UUID is an URI. e.g. default 5db0ac02-75d1-4854-84a7-54cbd373e594 2f64bbab-e15c-4811-9485-6099806a92c7 Output from the script: Running guests on default URI: win7-support, sap-ts Suspending guests on default URI... Suspending win7-support: ... Suspending win7-support: ... Suspending win7-support: done Suspending guests on 2f64bbab-e15c-4811-9485-6099806a92c7 URI... The problem seems to be that the list_guests() function returns a newline separated list. The following changes makes the script work correctly for me: --- /usr/lib64/libvirt/libvirt-guests.sh 2017-07-14 18:56:36.378235880 +0200 +++ /usr/lib64/libvirt/libvirt-guests.sh.rw 2017-07-14 18:56:31.430426761 +0200 @@ -142,7 +142,7 @@ return 1 fi - echo "$list" | grep -v 00000000-0000-0000-0000-000000000000 + echo "$list" | grep -v 00000000-0000-0000-0000-000000000000 | tr "\n" " " } # guest_name URI UUID Again, the output: Running guests on default URI: win7-support, sap-ts Suspending guests on default URI... Suspending win7-support: ... Suspending win7-support: ... Suspending win7-support: ... Suspending win7-support: done Suspending sap-ts: ... Suspending sap-ts: ... Suspending sap-ts: done -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c1
James Fehlig
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c2
--- Comment #2 from Richard Weinberger
Thanks for the detailed comments. Since you analyzed the problem and provided a fix, do you mind sending it to the libvirt dev list? Info on patch submission can be found here
http://libvirt.org/hacking.html
If not, I can take care of it.
Sure, let me first figure whether this problem got already fixed. :-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
Richard Weinberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c3
--- Comment #3 from Richard Weinberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c4
James Fehlig
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c5
--- Comment #5 from Richard Weinberger
Opps, I had looked before responding but missed the fix - sorry. I'll take care of it.
Thanks. :-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783
http://bugzilla.opensuse.org/show_bug.cgi?id=1048783#c6
James Fehlig
participants (1)
-
bugzilla_noreply@novell.com