<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ugh. Spoke a little too soon. While I got past my problem creating a storage domain, I ran into a new sanlock issue.<div><br></div><div>When trying to run a VM (the first one so I can create a template), I get an error in the admin UI:</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>VM DCC4.0 is down. Exit message: Failed to acquire lock: Permission denied.</div></blockquote><div><br></div><div>The sanlock.log file shows the following:</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>2012-10-23 22:32:02-0500 22023 [981]: s3:r3 resource 8798edc0-dbd2-466d-8be9-1997f63e196f:71252c8f-68a9-495f-b5a6-4e8e035b56ea:/rhev/data-center/a8ea368c-bc08-4e10-81e7-c8439bf7bd35/8798edc0-dbd2-466d-8be9-1997f63e196f/images/b029b5a6-9eb3-4a34-ad03-1ac4386e8c7c/71252c8f-68a9-495f-b5a6-4e8e035b56ea.lease:0 for 2,11,14629</div></div><div><div>2012-10-23 22:32:02-0500 22023 [981]: open error -13 /rhev/data-center/a8ea368c-bc08-4e10-81e7-c8439bf7bd35/8798edc0-dbd2-466d-8be9-1997f63e196f/images/b029b5a6-9eb3-4a34-ad03-1ac4386e8c7c/71252c8f-68a9-495f-b5a6-4e8e035b56ea.lease</div></div><div><div>2012-10-23 22:32:02-0500 22023 [981]: r3 acquire_token open error -13</div></div><div><div>2012-10-23 22:32:02-0500 22023 [981]: r3 cmd_acquire 2,11,14629 acquire_token -13</div></div></blockquote><div><br></div><div>I looked at the lease file referenced above, and it is there.</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>[root@mech ~]# ls -l /rhev/data-center/a8ea368c-bc08-4e10-81e7-c8439bf7bd35/8798edc0-dbd2-466d-8be9-1997f63e196f/images/b029b5a6-9eb3-4a34-ad03-1ac4386e8c7c/71252c8f-68a9-495f-b5a6-4e8e035b56ea.lease</div></div><div><div>-rw-rw----. 1 vdsm kvm 1048576 Oct 23 22:30 /rhev/data-center/a8ea368c-bc08-4e10-81e7-c8439bf7bd35/8798edc0-dbd2-466d-8be9-1997f63e196f/images/b029b5a6-9eb3-4a34-ad03-1ac4386e8c7c/71252c8f-68a9-495f-b5a6-4e8e035b56ea.lease</div></div></blockquote><div><div><br></div><div>On a lark, I turned off selinux enforcement and tried it again. It worked just fine.</div><div><br></div><div>So what selinux option do I need to enable to get it to work? The only other sanlock specific settings I saw are:</div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><div>sanlock_use_fusefs --> off</div></div></div><div><div><div>sanlock_use_nfs --> on</div></div></div><div><div><div>sanlock_use_samba --> off</div></div></div></blockquote><div><div><br></div><div>Do I turn these all on or is there some other setting I need to enable?</div><div><br></div><div>Brian</div><div><br></div><div><div>On Oct 23, 2012, at 9:54 PM, Brian Vetter wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>That was the problem. I checked the sanlock_use_nfs boolean and it was off. I set it and then created and attached the storage and it all works.<br><br>Thanks for the help/pointer.<br><br>Brian<br><br>On Oct 23, 2012, at 8:55 PM, Federico Simoncelli wrote:<br><br><blockquote type="cite">Hi Brian,<br></blockquote><blockquote type="cite">I hate progressing by guesses but could you try to disable selinux:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># setenforce 0<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If that works you could go on, re-enable it and try something more<br></blockquote><blockquote type="cite">specific:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># setenforce 1<br></blockquote><blockquote type="cite"># setsebool sanlock_use_nfs on<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have the feeling that the vdsm patch setting the sanlock_use_nfs<br></blockquote><blockquote type="cite">sebool flag didn't made it to fedora 17 yet.<br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Federico<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">----- Original Message -----<br></blockquote><blockquote type="cite"><blockquote type="cite">From: "Brian Vetter" <<a href="mailto:bjvetter@gmail.com">bjvetter@gmail.com</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To: "Federico Simoncelli" <<a href="mailto:fsimonce@redhat.com">fsimonce@redhat.com</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Cc: "Vered Volansky" <<a href="mailto:vered@redhat.com">vered@redhat.com</a>>, <a href="mailto:users@ovirt.org">users@ovirt.org</a>, "David Teigland" <<a href="mailto:teigland@redhat.com">teigland@redhat.com</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sent: Tuesday, October 23, 2012 6:10:36 PM<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Subject: Re: [Users] Error creating the first storage domain (NFS)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ok. Here's four log files:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">engine.log from my ovirt engine server.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">vdsm.log from my host<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sanlock.log from my host<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">messages from my host<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The errors occur around the 20:17:57 time frame. You might see other<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">errors from either previous attempts or for the time after when I<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tried to attach the storage domain. It looks like everything starts<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">with an error -13 in sanlock. If the -13 maps to 13/EPERM in<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">errno.h, then it is likely be some kind of permission or other<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">access error. I saw things that were related to the nfs directories<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">not being owned by vdsm:kvm, but that is not the case here.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I did see a note online about some issues with sanlock and F17 (which<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I am running), but those bugs were related to sanlock crashing.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Brian<br></blockquote></blockquote><br></div></blockquote></div><br></div></body></html>