Bug 1589970
| Summary: | libvirt-guests.sh keep trying shutting down guests after they were shutdown succesfully | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | davestux | ||||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||||
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 28 | CC: | agedosier, berrange, bugzilla, clalancette, crobinso, itamar, jdenemar, jforbes, laine, libvirt-maint, phil, thomas.jarosch, veillard | ||||||
| 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: | 2019-05-21 15:00:04 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
davestux
2018-06-11 18:35:47 UTC
Created attachment 1496663 [details] Patch to fix the issue After two hours of "print debugging" I found out the check_guests_shutdown() function overwrites the global $guests variable. D'oh! I've developed a fix and wanted to send it upstream... just to notice it has already been fixed :) Attached is the upstream fix from git, it applies to libvirt from Fedora 28 just fine. *** Patch description *** commit 7e476356c28a7fccd40eebbd8dac83e49e782010 Author: Christian Ehrhardt <christian.ehrhardt> Date: Mon Mar 19 12:44:31 2018 +0100 tools: fix variable scope in in check_guests_shutdown libvirt-guests.sh when run with more active guests than requested to shut down in parallel will run until it times out only shutting down the first set of guests. This patch fixes parallel shutdown by fixing a variable scope issue where check_guests_shutdown unintentionally reset $guests which prevented further progress. Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508 Signed-off-by: Christian Ehrhardt <christian.ehrhardt> Created attachment 1496665 [details]
Second part of the fix
Second part of the fix as done by upstream.
My fix was simpler: Just declare the "$guests" variable as "local" in check_guests_shutdown().
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. *** Bug 1590653 has been marked as a duplicate of this bug. *** *** Bug 1597420 has been marked as a duplicate of this bug. *** Sorry this slipped through the cracks and didn't get backported to F28. This is fixed in f29+ |