[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] libvirt does not logout of iscsi targets, causing system hang on shutdown

On 02/28/2013 01:46 PM, Fritz Elfert wrote:
> Hi guys,
> There's a quite old bug entry here:
> https://bugzilla.redhat.com/show_bug.cgi?id=700010
> I just stumbled over that very issue on F18. Doing a little bit
> debugging of the shutdown sequence, it turns out that - at least on my
> F18 installation - libvirtd is shutdown *after* iscsid, which makes it
> impossible for libvirt to perform the logout of the iscsi session properly.
> My local fix (diff) is attached. It simply adds another startup
> dependancy on iscsid.service which in turn delays iscsid shutdown until
> after libvirtd has stopped. Having that applied, the system shuts down
> properly again.
> I was asked to post that here for discussion...
> So please consider this trivial change for the next update.

> +++ /etc/systemd/system/libvirtd.service	2013-02-28 06:34:41.341905146 +0100
> @@ -7,6 +7,7 @@
>  Description=Virtualization daemon
>  Before=libvirt-guests.service
>  After=network.target
> +After=iscsid.service

Makes sense to me.  My biggest doubt was whether this would make a
system that previously did not use iscsid now suddenly start to require
a service.  But if I understood 'man systemd.unit' correctly, adding an
'After=' without a 'Wants=' or 'Requires=' is valid, and merely means
that _if_ iscsid is enabled, then systemd will enforce the ordering, but
that libvirtd will manage just fine even when iscsid is disabled.

I'm not much of a systemd expert, so I'll wait until morning before
pushing, to give anyone else a chance to disagree with my analysis or
provide a more kosher fix.  Otherwise, you have my ACK, and I think this
deserves to be in 1.0.3.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]