Bug 1252204
| Summary: | libvirt-guests.service doesn't work at shutdown, but manually stopping it or running libvirt-guests.sh stop works | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | jamespharvey20 |
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
| Status: | CLOSED DEFERRED | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | crobinso, dyuan, fjin, jamespharvey20, kolecki.mateusz, mzhan, rbalakri |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-02 14:37:10 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: | |||
|
Description
jamespharvey20
2015-08-11 01:05:56 UTC
By "libvirt-guests.service doesn't work", I mean to properly run during a shutdown, since that's what it's intended to do... Not do anything while the machine is up and running. systemctl stop libvirt-guests does the same thing as manually running libvirt-guests.sh. My gut tells me this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1252201 That perhaps part of libvirt (not necessarily meaning its systemd service, but something else needed for libvirtd) starts shutting down before libvirt-guests, it can never gracefully shut down. libvirt-guests has a timeout, it could be hitting that. But if you can't physically sit in front of the machine, you'll need to get more logging out of systemd somehow to see how long everything is taking and what order it's calling services in Since there's no response, closing as DEFERRED. But if anyone is still affected with newer libvirt versions, please re-open and we can triage from there Hi, I have similar problem. When I'm running more than 1 VM only the first one is stoped on host shutdown. If I'm not wrong problem occurs until: https://github.com/libvirt/libvirt/commit/fff4682965e41f36b8c486c6f4e55eab5f45fa86#diff-c201dad6e9ea420304b36ef82497dff9R264 File /var/lib/libvirt/libvirt-guests has wrong format. It contains newline after first VM uuid for given URI and next line don't have URI but only uuid. In my case /var/lib/libvirt/libvirt-guests is like this: ===== default 93ca0a98-a77f-4d0e-aafd-29f3eadce3fe e6f48a2d-afda-458d-8510-9085f03c7593 3549b202-dd05-4f17-a124-7c5a95ccf0b6 756ec146-7491-4f28-a22a-cb855976dcd3 fda953f3-cd37-4fe3-8da6-3d4ca3b19f7b ===== But I think it should look like that: ===== default 93ca0a98-a77f-4d0e-aafd-29f3eadce3fe e6f48a2d-afda-458d-8510-9085f03c7593 3549b202-dd05-4f17-a124-7c5a95ccf0b6 756ec146-7491-4f28-a22a-cb855976dcd3 fda953f3-cd37-4fe3-8da6-3d4ca3b19f7b ===== when I remove quotation when echoing list then script work properly. Here is my patch: diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index 7f74b85..7380b4b 100644 --- a/tools/libvirt-guests.sh.in +++ b/tools/libvirt-guests.sh.in @@ -499,7 +499,7 @@ stop() { fi if [ -n "$list" ]; then - echo "$uri" "$list" >>"$LISTFILE" + echo "$uri" $list >>"$LISTFILE" fi done set +f I found that my problem is for ubuntu: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1591695 |