Re: [systemd-devel] machines get killed when scopes are destroyed
On Mon, Nov 18, 2013 at 03:03:18AM +0100, Zbigniew Jędrzejewski-Szmek wrote: > v0lZy reported on IRC that his qemu machines get killed when shutting > down the host. libvirt-guests.service is designed to suspend them > during shutdown, but when it was run, the guests were all already dead. > > And indeed, each qemu is running inside a scope, which is not > connected by any dependencies to either systemd-machine.service, or > libvirt-guests.service. libvirt-guests.service does not depend on > systemd-machine.service either. This means that when shutdown is > ordered, the scopes will stopped in parallel to other > libvirt-guests.service, and depending on timing, qemus will be just > killed with SIGTERM. > > For this whole thing to work correctly, we need to ensure that > scopes are not terminated prematurely. If we introduced a target > like libvirt-ready.target, and made libvirt-guests.service be > After=libvirt-ready.target, and made all the scopes be > Before=libvirt-ready.target, I think the vms would have a chance > to shutdown properly. But that's pretty complicated. > And I'm not even sure how to do that properly. Any better > ideas? As mentioned downthread, Zbyszek filed: https://bugzilla.redhat.com/show_bug.cgi?id=1031696 Basically I tried to pass After=libvirt-guests.service to CreateMachine scope_properties, but I just got an error back. Libvirt diffs are in the bug report. Maybe that isn't supposed to work, or makes no sense, or I messed up the syntax. Or maybe there's a much better solution. Lennart, any thoughts? Thanks, Cole ___ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] machines get killed when scopes are destroyed
On Mon, Nov 18, 2013 at 10:12:42AM +, Daniel P. Berrange wrote: > I don't have an answer for you, but just want to ask that you file a > bug against libvirt for this problem. This is an unintended regression > in libvirt functionality with the switch to systemd scopes. https://bugzilla.redhat.com/show_bug.cgi?id=1031696 Zbyszek ___ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] machines get killed when scopes are destroyed
On Mon, Nov 18, 2013 at 03:03:18AM +0100, Zbigniew Jędrzejewski-Szmek wrote: > v0lZy reported on IRC that his qemu machines get killed when shutting > down the host. libvirt-guests.service is designed to suspend them > during shutdown, but when it was run, the guests were all already dead. > > And indeed, each qemu is running inside a scope, which is not > connected by any dependencies to either systemd-machine.service, or > libvirt-guests.service. libvirt-guests.service does not depend on > systemd-machine.service either. This means that when shutdown is > ordered, the scopes will stopped in parallel to other > libvirt-guests.service, and depending on timing, qemus will be just > killed with SIGTERM. > > For this whole thing to work correctly, we need to ensure that > scopes are not terminated prematurely. If we introduced a target > like libvirt-ready.target, and made libvirt-guests.service be > After=libvirt-ready.target, and made all the scopes be > Before=libvirt-ready.target, I think the vms would have a chance > to shutdown properly. But that's pretty complicated. > And I'm not even sure how to do that properly. Any better > ideas? I don't have an answer for you, but just want to ask that you file a bug against libvirt for this problem. This is an unintended regression in libvirt functionality with the switch to systemd scopes. http://libvirt.org/bugs.html Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| ___ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] machines get killed when scopes are destroyed
v0lZy reported on IRC that his qemu machines get killed when shutting down the host. libvirt-guests.service is designed to suspend them during shutdown, but when it was run, the guests were all already dead. And indeed, each qemu is running inside a scope, which is not connected by any dependencies to either systemd-machine.service, or libvirt-guests.service. libvirt-guests.service does not depend on systemd-machine.service either. This means that when shutdown is ordered, the scopes will stopped in parallel to other libvirt-guests.service, and depending on timing, qemus will be just killed with SIGTERM. For this whole thing to work correctly, we need to ensure that scopes are not terminated prematurely. If we introduced a target like libvirt-ready.target, and made libvirt-guests.service be After=libvirt-ready.target, and made all the scopes be Before=libvirt-ready.target, I think the vms would have a chance to shutdown properly. But that's pretty complicated. And I'm not even sure how to do that properly. Any better ideas? Zbyszek ___ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
