https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2011-08-22T12:08:00ZCeph Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=55882011-08-22T12:08:00ZSage Weilsage@newdream.net
<ul><li><strong>translation missing: en.field_position</strong> set to <i>16</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=55892011-08-22T12:08:03ZSage Weilsage@newdream.net
<ul><li><strong>translation missing: en.field_position</strong> deleted (<del><i>16</i></del>)</li><li><strong>translation missing: en.field_position</strong> set to <i>14</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=55942011-08-22T13:52:27ZSage Weilsage@newdream.net
<ul></ul><p>The virtual disk was added to libvirt in 036ad5052b43fe9f0d197e89fd16715950408e1d.</p>
<p>It only lets you specify server hosts, nothing else. Librados wants</p>
<p>- client name/id<br />- conf path (optional)<br />- list of conf key/value pairs</p>
<p>These can be smooshed into one config string if need be (this is what qemu takes, actually). For example, "id=foo:conf=/path/to/conf:otheroption=that:foo=bar".</p>
<p>In the end, the <host> items translate into an option like "mon_host=host1,host2,host3".</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=55952011-08-22T14:01:23ZWido den Hollanderwido@42on.com
<ul></ul><p>Idea from gregaf was to "abuse" the name attribute to do so, have to look into this.</p>
<p>We should check this with the libvirt guys and see what we can do.</p>
<p>Their idea was to have a general format which can be used for Sheepdog, Ceph and NBD and other future network storage which would come up. Instead for writing a implementation for every project.</p>
Some docs/discussing about the current format:
<ul>
<li><a class="external" href="http://libvirt.org/formatdomain.html">http://libvirt.org/formatdomain.html</a></li>
<li><a class="external" href="http://permalink.gmane.org/gmane.comp.file-systems.ceph.devel/1323">http://permalink.gmane.org/gmane.comp.file-systems.ceph.devel/1323</a></li>
</ul>
<p>Main thing is that we want to push some key=values down to Qemu so that can do down to librbd without manipulating or interpreting it too much.</p>
<p>Some old hack in libvirt allowed virtual disks like:</p>
<pre>
<disk type='virtual' device='disk'>
<driver name='qemu' type='rbd' cache='writeback'/>
<source path='rbd:rbd/beta:conf=/etc/ceph/ceph.conf'/>
<target dev='vda' bus='virtio'/>
</disk>
</pre>
<p>Works like a charm, but not what libvirt wants :)</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=56592011-08-27T04:41:08ZWido den Hollanderwido@42on.com
<ul></ul><p>You can abuse the current libvirt implementation though.</p>
<pre>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback'/>
<source protocol='rbd' name='rbd/beta:conf=/etc/ceph/ceph.conf:id=admin'>
<host name='monitor.ceph.widodh.nl' port='6789'/>
<host name='monitor-sec.ceph.widodh.nl' port='6789'/>
<host name='monitor-third.ceph.widodh.nl' port='6789'/>
</source>
<target dev='vda' bus='virtio'/>
</disk>
</pre>
<p>That works for me and results in a string to Qemu:</p>
<pre>CEPH_ARGS=-m monitor.ceph.widodh.nl:6789,monitor-sec.ceph.widodh.nl:6789,monitor-third.ceph.widodh.nl:6789 ..... -drive file=rbd:rbd/beta:conf=/etc/ceph/ceph.conf:id=admin,if=none,id=drive-virtio-disk0,boot=on,format=raw,cache=writeback</pre>
<p>The benefit of passing down a custom string through libvirt is that we never have to wait for them to implement a new scheme.</p>
<p>When RBD starts to become mainstream people will stick to the libvirt version supplied by their distro. If that means they'll have to wait for 2 years to get a new libvirt on their machines, that's a long time.</p>
<p>Right now you can simply put everything you need in the "name" attribute, but we'll have to check with the libvirt guys how they think about that.</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=56602011-08-27T12:15:44ZSage Weilsage@newdream.net
<ul></ul><p>Hmm yeah, it's at least doable. I just sent an email to libvir-list asking about a more generic syntax for options... that'll let us eventually support using kernel rbd driver as well (in a reasonably non-hacky way). Seem ok? (Can probably move discussion to the list..)</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=56612011-08-27T14:27:15ZWido den Hollanderwido@42on.com
<ul></ul><p>Saw the e-mail, let's keep the discussion there to make sure everyone involved is up to date.</p>
<p>We could use this issue for some internal work delegation.</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=58272011-08-31T21:43:13ZSage Weilsage@newdream.net
<ul></ul><p>I wonder if we can harass someone on IRC to get some partial 'sure, whatever' before we go write patches..</p>
<p>Or Wido, maybe you can follow up on the list and see if someone takes notice?</p> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=61112011-09-06T21:49:17ZSage Weilsage@newdream.net
<ul><li><strong>Target version</strong> changed from <i>v0.35</i> to <i>v0.36</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=62192011-09-07T10:58:38ZSage Weilsage@newdream.net
<ul><li><strong>translation missing: en.field_story_points</strong> set to <i>5</i></li><li><strong>translation missing: en.field_position</strong> deleted (<del><i>37</i></del>)</li><li><strong>translation missing: en.field_position</strong> set to <i>36</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=62432011-09-07T11:49:40ZSage Weilsage@newdream.net
<ul><li><strong>translation missing: en.field_position</strong> deleted (<del><i>39</i></del>)</li><li><strong>translation missing: en.field_position</strong> set to <i>19</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=63042011-09-07T17:11:20ZSage Weilsage@newdream.net
<ul><li><strong>Assignee</strong> set to <i>Sage Weil</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=64252011-09-25T14:14:58ZSage Weilsage@newdream.net
<ul><li><strong>Target version</strong> changed from <i>v0.36</i> to <i>v0.37</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=65872011-10-09T20:39:54ZSage Weilsage@newdream.net
<ul><li><strong>Target version</strong> changed from <i>v0.37</i> to <i>v0.38</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=66892011-10-13T10:12:24ZSage Weilsage@newdream.net
<ul><li><strong>Assignee</strong> changed from <i>Sage Weil</i> to <i>Josh Durgin</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=67402011-10-21T10:51:38ZSage Weilsage@newdream.net
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=69172011-10-31T10:40:36ZSage Weilsage@newdream.net
<ul><li><strong>Target version</strong> changed from <i>v0.38</i> to <i>v0.39</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=69542011-10-31T11:03:11ZSage Weilsage@newdream.net
<ul><li><strong>translation missing: en.field_position</strong> deleted (<del><i>69</i></del>)</li><li><strong>translation missing: en.field_position</strong> set to <i>1</i></li></ul> Ceph - Bug #1432: libvirt: fix definition for rbd params/sources/etchttps://tracker.ceph.com/issues/1432?journal_id=72082011-11-15T16:55:03ZJosh Durgin
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul><p>Merged upstream.</p>