<html><head></head><body bgcolor="#FFFFFF"><div>Hi,</div><div><br></div><div>Couple of days ago, I updated my guide about this issue. <br></div><div><br></div><div>Cheers!</div><div><br>On 14 juil. 2012, at 04:03, Travis Rhoden <<a href="mailto:trhoden@gmail.com">trhoden@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Josh,<br><br>Thanks so much for the pointers.  I did not figure out that libvirt was trying to read /etc/ceph/ceph.conf.  It was in fact being denied by apparmor.  I fixed my problem by editing /etc/apparmor.d/libvirt/TEMPLATE and adding "/etc/ceph/** r," to the template.  Now it works for newly spawned VMs.<br>

<br>Again, thanks a lot.<br><br> - Travis<br><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 7:40 PM, Josh Durgin <span dir="ltr"><<a href="mailto:josh.durgin@inktank.com" target="_blank">josh.durgin@inktank.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 07/13/2012 03:09 PM, Travis Rhoden wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Was this problem ever resolved?  I'm having the identical issue right now<br>
(perhaps because I am following Sebastien's guide [0]).  I found this<br>
question raised on LP [1], but no helpful responses, and no linked bug.  I<br>
can confirm that I can attach an RBD instance manually through virsh, no<br>
problem. So it is not a libvirt thing.  It sure appears to be a faulty disk<br>
attachment definition from OpenStack.<br>
</blockquote>
<br></div>
I didn't notice this launchpad question before, but I'll copy my answer<br>
below for the mailing list archives:<br>
<br>
Right now the RBD driver in OpenStack requires you to have your monitor addresses in /etc/ceph/ceph.conf. When you have them there, putting them in the libvirt xml is unnecessary. You do have to make sure that the unix user who ends up running qemu/kvm has read access to /etc/ceph/ceph.conf, and e.g. apparmor isn't preventing qemu/kvm from reading it.<br>


<br>
This dependency on /etc/ceph/ceph.conf should be removed in the future.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm running the latest packages on Ubuntu 12.04 for OpensStack (essex) and<br>
Ceph (argonaut).<br>
<br>
I can confirm when using nova volume-attach it does not matter what device<br>
you pick, dev/vdb, dev/vdf, whatever.  Always fails.  /dev/vdb manually<br>
works great.<br>
</blockquote>
<br></div>
If the answer above doesn't help, what error message do you get?<br>
Is there any info in the libvirt logs for the instance?<br>
<br>
Josh<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
[0]<br>
<a href="http://www.sebastien-han.fr/blog/2012/06/10/introducing-ceph-to-openstack/" target="_blank">http://www.sebastien-han.fr/<u></u>blog/2012/06/10/introducing-<u></u>ceph-to-openstack/</a><br>
[1] <a href="https://answers.launchpad.net/nova/+question/201366" target="_blank">https://answers.launchpad.net/<u></u>nova/+question/201366</a><br>
<br>
  - Travis<br>
<br>
On Fri, May 25, 2012 at 8:32 PM, Josh Durgin <<a href="mailto:josh.durgin@inktank.com" target="_blank">josh.durgin@inktank.com</a>><u></u>wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 05/25/2012 01:31 AM, Sébastien Han wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi everyone,<br>
<br>
I setup a ceph cluster and I use the RBD driver for nova-volume.<br>
I can create volumes and snapshots but currently I can't attach them to<br>
an instance.<br>
Apparently the volume is detected as busy but it's not, no matter which<br>
name I choose.<br>
I tried from horizon and the command line, same issue.<br>
<br></div>
$ nova --debug volume-attach de3743be-69be-4ec3-8de3-**<u></u>fc7df6903a97 12<div class="im"><br>
/dev/vdc<br>
connect: (localhost, 5000)<br>
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:<br></div>
localhost:5000\r\nContent-**<u></u>Length: 100\r\ncontent-type:<br>
application/json\r\naccept-**<u></u>encoding: gzip, deflate\r\naccept:<br>
application/json\r\nuser-**<u></u>agent: python-novaclient\r\n\r\n{"**<u></u>auth":<div class="im"><br>
{"tenantName": "admin", "passwordCredentials": {"username": "admin",<br>
"password": "admin"}}}'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br>
header: Content-Type: application/json<br>
header: Vary: X-Auth-Token<br>
header: Date: Fri, 25 May 2012 08:29:46 GMT<br>
header: Transfer-Encoding: chunked<br>
connect: (172.17.1.6, 8774)<br>
send: u'GET<br></div>
/v2/**<u></u>d1f5d27ccf594cdbb034c8a4123494<u></u>**e9/servers/de3743be-69be-<u></u>4ec3-**<div class="im"><br>
8de3-fc7df6903a97<br>
HTTP/1.1\r\nHost: <a href="http://172.17.1.6:8774" target="_blank">172.17.1.6:8774</a><br></div>
<<a href="http://172.17.1.6:8774" target="_blank">http://172.17.1.6:8774</a>>\r\nx-<u></u>**auth-project-id: admin\r\nx-auth-token:<br>
<br>
37ff6354b9114178889128175494c6<u></u>**66\r\naccept-encoding: gzip,<br>
deflate\r\naccept: application/json\r\nuser-**<u></u>agent:<div class="im"><br>
python-novaclient\r\n\r\n'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br></div>
header: X-Compute-Request-Id: req-fc7686dd-7dff-4ea2-b2dd-**<u></u>be584dadb7c1<div class="im"><br>
header: Content-Type: application/json<br>
header: Content-Length: 1371<br>
header: Date: Fri, 25 May 2012 08:29:46 GMT<br>
send: u'POST<br></div>
/v2/**<u></u>d1f5d27ccf594cdbb034c8a4123494<u></u>**e9/servers/de3743be-69be-<u></u>4ec3-**<br>
8de3-fc7df6903a97/os-volume_**<u></u>attachments<div class="im"><br>
HTTP/1.1\r\nHost: <a href="http://172.17.1.6:8774" target="_blank">172.17.1.6:8774</a><br></div>
<<a href="http://172.17.1.6:8774" target="_blank">http://172.17.1.6:8774</a>>\r\**<u></u>nContent-Length: 60\r\nx-auth-project-id:<div class="im"><br>
<br>
admin\r\naccept-encoding: gzip, deflate\r\naccept:<br></div>
application/json\r\nx-auth-**<u></u>token:<br>
37ff6354b9114178889128175494c6<u></u>**66\r\nuser-agent:<br>
python-novaclient\r\ncontent-*<u></u>*type:<br>
application/json\r\n\r\n{"**<u></u>volumeAttachment": {"device": "/dev/vdc",<div class="im"><br>
"volumeId": 12}}'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br></div>
header: X-Compute-Request-Id: req-4a22f603-4aad-4ae9-99a2-**<u></u>6a7bcacf974f<div class="im"><br>
header: Content-Type: application/json<br>
header: Content-Length: 48<br>
header: Date: Fri, 25 May 2012 08:29:46 GMT<br>
$ echo $?<br>
0<br>
<br>
See the logs here:<br>
</div><a href="http://paste.openstack.org/**show/18163/" target="_blank">http://paste.openstack.org/**<u></u>show/18163/</a><<a href="http://paste.openstack.org/show/18163/" target="_blank">http://paste.<u></u>openstack.org/show/18163/</a>><br>


<br>
</blockquote><div class="im">
<br>
Hi Seb,<br>
<br>
It looks like the DeviceIsBusy exception is raised when libvirt<br>
returns failure for any reason when attaching a volume. Try turning on<br>
debug logging for libvirt and attaching again, and posting the logs<br>
from libvirt.<br>
<br>
You might need to upgrade libvirt - the version in Ubuntu 12.04 should<br>
work, or upstream libvirt 0.9.12.<br>
<br>
Josh<br>
<br>
<br>
  If you need more information let me know :)<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you in advance.<br>
<br>
Cheers.<br>
<br>
~Seb<br>
<br>
</blockquote>
<br></div>
______________________________<u></u>**_________________<br>
Mailing list: <a href="https://launchpad.net/%7E**openstack" target="_blank">https://launchpad.net/~**<u></u>openstack</a><<a href="https://launchpad.net/%7Eopenstack" target="_blank">https://launchpad.<u></u>net/%7Eopenstack</a>><br>


Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/%7E**openstack" target="_blank">https://launchpad.net/~**<u></u>openstack</a><<a href="https://launchpad.net/%7Eopenstack" target="_blank">https://launchpad.<u></u>net/%7Eopenstack</a>><br>


More help   : <a href="https://help.launchpad.net/**ListHelp" target="_blank">https://help.launchpad.net/**<u></u>ListHelp</a><<a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.<u></u>launchpad.net/ListHelp</a>><br>


<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
</blockquote></div><br>
</div></blockquote></body></html>