<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 03/13/2012 10:42 PM, Frido Roose wrote:
<blockquote
cite="mid:CAAZ+1KpvwoUtOvvRrDLZ-UKeSVNqTrEPSxgaaGzNmrKqCpMj4A@mail.gmail.com"
type="cite">Hello,
<div><br>
</div>
<div>I configured libvirtd with the sanlock lock manager plugin:</div>
<div><br>
</div>
<div>
<div># rpm -qa | egrep "libvirt-0|sanlock-[01]"</div>
<div>libvirt-lock-sanlock-0.9.4-23.el6_2.4.x86_64</div>
<div>sanlock-1.8-2.el6.x86_64</div>
<div>libvirt-0.9.4-23.el6_2.4.x86_64</div>
</div>
<div><br>
</div>
<div>
<div># egrep -v "^#|^$" /etc/libvirt/qemu-sanlock.conf </div>
<div>auto_disk_leases = 1</div>
<div>disk_lease_dir = "/var/lib/libvirt/sanlock"</div>
<div>host_id = 4</div>
</div>
<div><br>
</div>
<div>
<div># mount | grep sanlock</div>
<div>/dev/mapper/kvm--shared-sanlock on /var/lib/libvirt/sanlock
type gfs2 (rw,noatime,hostdata=jid=0)</div>
</div>
<div><br>
</div>
<div>
<div># cat /etc/sysconfig/sanlock </div>
<div>SANLOCKOPTS="-R 1 -o 30"</div>
</div>
<div><br>
</div>
<div>I increased the sanlock io_timeout to 30 seconds (default =
10), because the sanlock dir is on a GFS2 volume and can be
blocked for some time while fencing and journal recovery takes
place.</div>
<div>With the default sanlock io timeout, I get lease timeouts
because IO is blocked:</div>
<div>
<div>
<div> Mar 5 15:37:14 raiti sanlock[5858]: 3318 s1
check_our_lease warning 79 last_success 3239</div>
<div> Mar 5 15:37:15 raiti sanlock[5858]: 3319 s1
check_our_lease failed 80</div>
</div>
</div>
<div><br>
</div>
<div>So far, all fine, but when I restart sanlock and libvirtd, it
takes about 2 * 30 seconds = 1 minute before libvirtd is usable.
"virsh list" hangs during this time. I can still live with
that...</div>
<div>But it gets worse after a reboot, when running a "virsh list"
even takes a couple of minutes (like about 5 minutes) before it
responds. After this initial time, virsh is responding
normally, so it looks like an initialization issue to me.</div>
<div><br>
</div>
<div>Is this a configuration issue, a bug, or expected behavior?</div>
</blockquote>
Hi Frido,<br>
I'm not sure whether you met a sanlock AVC error in your
/var/log/audit/audit.log, could you check it and provide your
selinux-policy version? in addition, you should turn on selinux bool
value for sanlock, for example, <br>
<br>
# getsebool -a|grep sanlock<br>
virt_use_sanlock --> off<br>
# setsebool -P virt_use_sanlock on<br>
# getsebool -a|grep sanlock<br>
virt_use_sanlock --> on<br>
<br>
In addition, could you provide libvirt log as a attachment? please
refer the following configuration:<br>
<br>
1. /etc/libvirt/libvirtd.conf<br>
<br>
log_filters="1:libvirt 1:conf 1:locking"<br>
log_outputs="1:<a class="moz-txt-link-freetext" href="file:/var/log/libvirt/libvirtd.log">file:/var/log/libvirt/libvirtd.log</a>"<br>
<br>
2. service libvirtd restart<br>
<br>
3. repeat your test steps<br>
<br>
Good Luck!<br>
Alex<br>
<br>
<br>
<br>
<br>
<blockquote
cite="mid:CAAZ+1KpvwoUtOvvRrDLZ-UKeSVNqTrEPSxgaaGzNmrKqCpMj4A@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Thanks for any advice...</div>
<div>Frido</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libvirt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a></pre>
</blockquote>
<br>
</body>
</html>