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]

 



On 02/28/2013 03: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
>>

>> +++ /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.

Pushed now, as follows:

From ba67de22ba7e4021885e55cbc2d0bb456bbc48bc Mon Sep 17 00:00:00 2001
From: Fritz Elfert <fritz@xxxxxxxxxxxxxxx>
Date: Thu, 28 Feb 2013 21:46:19 +0100
Subject: [PATCH] libvirt does not logout of iscsi targets, causing
system hang
 on shutdown

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.
---
 daemon/libvirtd.service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
index 98dd5a0..aa5913b 100644
--- a/daemon/libvirtd.service.in
+++ b/daemon/libvirtd.service.in
@@ -8,6 +8,7 @@ Description=Virtualization daemon
 Before=libvirt-guests.service
 After=network.target
 After=dbus.service
+After=iscsid.service

 [Service]
 EnvironmentFile=-/etc/sysconfig/libvirtd
-- 
1.8.1.4
-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital 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]