Enable RBD tuning options in Qemu

Registered by Sébastien Han

The RBD QEMU driver supports some nice options (such as caching). I would be nice to take advantage of these options since nova doesn't support this yet.

Currently the XML file while booting from volume looks like this:

    <disk type="network" device="disk">
      <driver name="qemu" type="raw" cache="none"/>
      <source protocol="rbd" name="cinder-sata/volume-176651a3-6480-4ad3-a5e3-8917ce07f0ce"/>
      <auth username="admin">
        <secret type="ceph" uuid="4ea5bfc1-6cfb-2eb7-627c-4c67032a2453"/>
      </auth>
      <target bus="virtio" dev="vda"/>
      <serial>176651a3-6480-4ad3-a5e3-8917ce07f0ce</serial>
    </disk>

But the most interesting line is:

<source protocol="rbd" name="cinder-sata/volume-176651a3-6480-4ad3-a5e3-8917ce07f0ce"/>

Typically QEMU with RBD supports options like:

<source protocol="rbd" name="cinder-sata/volume-176651a3-6480-4ad3-a5e3-8917ce07f0ce":rbd_cache=true:rbd_cache_size=67108864:rbd_cache_max_dirty=50331648:rbd_cache_target_dirty=33554432'/>

To see the list of all available options, get a look at http://ceph.com/docs/master/rbd/rbd-config-ref/

Thus it would be nice to add a flag in nova.conf let's say rbd_options and pass it as many options as we want. This might look like:

rbd_options=rbd_cache=true,rbd_cache_size=67108864,rbd_cache_max_dirty=50331648,rbd_cache_target_dirty=33554432

Cheers.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Sébastien Han

Related branches

Sprints

Whiteboard

[Xiaoxi]
   Such tuning option shoud reside in cinder as attach option, and tell nova when the volume is attaching. Please take a look at the bp https://blueprints.launchpad.net/cinder/+spec/pass-ratelimit-info-to-nova

[leseb]
That makes sense, thanks for the pointer.

[jdurgin]
Unfortunately libvirt 1.0.6 removed the ability to specify these outside of the default ceph config file - http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2a2bc1517a7322af7eff07e2854a75bb5f41a10f

(?)

Work Items