Bug 1450141
Summary: | libvirt-guests.sh fails to shutdown guests in parallel | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | christoph.wolff | ||||||
Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | unspecified | CC: | crobinso, dariusz.gadomski, fabio.bardella, jorge.niedbalski, libvirt-maint, pkrempa, rbalakri | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2018-02-23 13:30:55 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
christoph.wolff
2017-05-11 15:55:14 UTC
Hmm, you are right. The message was supposed to be an error message and should not go into the list of VMs for shutdown. I'll try to fix it since I wrote that feature some time ago. Hi! We're also experiencing this issue (see: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508/). There's a proposed patch there, I'm attaching it to this bug report. Is this something that will being fixed anytime soon ? Thanks Created attachment 1339646 [details] Proposed patch for libvirt-guests.sh From: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508/ Created attachment 1364464 [details]
check guest shutdown function extended to don't consider guests already on the on_shutdown list.
Hello,
I am attaching a new version of the patch proposed by Christian,
which extends the check_guest_shutdown function to execute the
async shutdown call just in case the following condition is met (guest isn't already on the shutdown list).
+ if [ -z "$(echo $on_shutdown | grep $guest)" -a -n "$(guest_name "$uri" "$guest")" ];
I hope you can consider this new addition.
Thanks for the patch, please send it to libvir-list though to give it more visibility, in git format-patch format with a nice commit message describing the problem The patch has been shared in the list [1]. [1] https://www.redhat.com/archives/libvir-list/2018-January/msg00526.html The patch was pushed now so this should be fixed: commit ff02d1af4041ea4cf6bea68aac66d93a970e92f1 Author: Christian Ehrhardt <christian.ehrhardt> Date: Tue Jan 16 16:05:26 2018 +0100 tools: avoid text spilling into variables While libvirt-guests.sh is running cases can let guest_is_on fail which causes check_guests_shutdown to print output. That output shall not spill into the users of function check_guests_shutdown which is therefore now returning values in a variable like guest_is_on already did. Original-Author: Christian Ehrhardt <christian.ehrhardt> Modified-By: Jorge Niedbalski <niedbalski> Signed-off-by: Michal Privoznik <mprivozn> |