QoS on Juno with RBD backend dont work for VM

Bug #1399706 reported by Ivan Arsenault
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Wishlist
Steve Singer

Bug Description

Hi,
QoS for volume work with RBD but not for VM. So to solve this problem, you need to pass quota:disk_write_bytes_sec etc... extra parameters to VM.

At ligne 645/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py add this at the end on the «libvirt_info» method add this extra code :

Ex:
  def libvirt_info(self, disk_bus, disk_dev, device_type, cache_mode,
             extra_specs, hypervisor_version):
...
         if auth_enabled:
             info.auth_secret_type = 'ceph'
             info.auth_secret_uuid = CONF.libvirt.rbd_secret_uuid
+ tune_items = ['disk_read_bytes_sec', 'disk_read_iops_sec',
+ 'disk_write_bytes_sec', 'disk_write_iops_sec',
+ 'disk_total_bytes_sec', 'disk_total_iops_sec']
+ for key, value in extra_specs.iteritems():
+ scope = key.split(':')
+ if len(scope) > 1 and scope[0] == 'quota':
+ if scope[1] in tune_items:
+ setattr(info, scope[1], value)
        return info

after this patch, if you «dumpxml VM ID» with virsh you got the missing <iotune>...</iotune>

Ex:

virsh # dumpxml 2

...
   <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <auth username='cinder'>
        <secret type='ceph' uuid='9b576159-d403-4b1a-8aa2-f18cdcaf4f4b'/>
      </auth>
      <source protocol='rbd' name='vms/20c50d63-5af1-41a6-bc68-f0a6b9ffd715_disk'>
        <host name='192.168.76.120' port='6789'/>
        <host name='192.168.76.121' port='6789'/>
        <host name='192.168.76.122' port='6789'/>
      </source>
      <target dev='vda' bus='virtio'/>
      <iotune>
        <total_bytes_sec>83886080</total_bytes_sec>
        <total_iops_sec>15000</total_iops_sec>
      </iotune>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
...

Voilà...

Ivan

Revision history for this message
Joe Gordon (jogo) wrote :

If you would like to submit a patch for this, please follow the instructions in: https://github.com/openstack/nova/blob/master/CONTRIBUTING.rst

Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Ivan Arsenault (ivan-arsenault) wrote : Re: [Bug 1399706] Re: QoS on Juno with RBD backend dont work for VM

Hi Joe,
           I am not developper. So if someone can do the patch for me that
will be fine. :-)
Thanks

Ivan

2014-12-08 10:14 GMT-05:00 Joe Gordon <email address hidden>:

> If you would like to submit a patch for this, please follow the
> instructions in:
> https://github.com/openstack/nova/blob/master/CONTRIBUTING.rst
>
>
> ** Changed in: nova
> Importance: Undecided => Wishlist
>
> ** Changed in: nova
> Status: New => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1399706
>
> Title:
> QoS on Juno with RBD backend dont work for VM
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1399706/+subscriptions
>

Joe Gordon (jogo)
tags: added: quotas
tags: added: low-hanging-fruit
tags: removed: quotas
Steve Singer (z80asmftw)
Changed in nova:
assignee: nobody → Steve Singer (z80asmftw)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.