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

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/28/2013 11:38 PM, Eric Blake wrote:
> 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.
> 
I wasn't shure either, so I just tried it out adding another
After=idontexist.service. System rebooted and started libvirtd without
complaining about the missing entry.

- -Fritz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEv4a4ACgkQboM4mAMyprCECQCdGdP6TN1Gp7iBCr9RroHPOMfo
yagAoKgY0av/W4IIJopF7H9qdOz3bLqS
=WyKi
-----END PGP SIGNATURE-----

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]