rate-limiting doesn't work

Bug #1259957 reported by Sébastien Han
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Huang Zhiteng
Havana
Fix Released
Undecided
Unassigned

Bug Description

Hi everyone,

I tried to play with the new rate-limiting feature however it doesn't work.
See below my setup.

root@openstack:~# uname -a
Linux openstack 3.8.0-33-generic #48~precise1-Ubuntu SMP Thu Oct 24 16:28:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

root@openstack:~# dpkg -l |grep -E 'nova|glance|cinder|libvirt'
ii cinder-api 1:2013.2-0ubuntu1~cloud0 Cinder storage service - API server
ii cinder-common 1:2013.2-0ubuntu1~cloud0 Cinder storage service - common files
ii cinder-scheduler 1:2013.2-0ubuntu1~cloud0 Cinder storage service - Scheduler server
ii cinder-volume 1:2013.2-0ubuntu1~cloud0 Cinder storage service - Volume server
ii glance 1:2013.2-0ubuntu1~cloud0 OpenStack Image Registry and Delivery Service - Daemons
ii glance-api 1:2013.2-0ubuntu1~cloud0 OpenStack Image Registry and Delivery Service - API
ii glance-common 1:2013.2-0ubuntu1~cloud0 OpenStack Image Registry and Delivery Service - Common
ii glance-registry 1:2013.2-0ubuntu1~cloud0 OpenStack Image Registry and Delivery Service - Registry
ii libvirt-bin 1.1.1-0ubuntu8~cloud2 programs for the libvirt library
ii libvirt0 1.1.1-0ubuntu8~cloud2 library for interfacing with different virtualization systems
ii nova-api 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - API frontend
ii nova-cert 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - certificate management
ii nova-common 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - common files
ii nova-compute 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - compute node
ii nova-compute-kvm 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - compute node (KVM)
ii nova-conductor 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - conductor service
ii nova-consoleauth 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - Console Authenticator
ii nova-network 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - Network manager
ii nova-novncproxy 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - NoVNC proxy
ii nova-scheduler 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - virtual machine scheduler
ii python-cinder 1:2013.2-0ubuntu1~cloud0 Cinder Python libraries
ii python-cinderclient 1:1.0.6-0ubuntu1~cloud0 python bindings to the OpenStack Volume API
ii python-glance 1:2013.2-0ubuntu1~cloud0 OpenStack Image Registry and Delivery Service - Python library
ii python-glanceclient 1:0.11.0-0ubuntu1~cloud0 Client library for Openstack glance server.
ii python-libvirt 1.1.1-0ubuntu8~cloud2 libvirt Python bindings
ii python-nova 1:2013.2-0ubuntu1~cloud0 OpenStack Compute Python libraries
ii python-novaclient 1:2.15.0-0ubuntu1~cloud0 client library for OpenStack Compute API

root@openstack:~# cinder qos-create high-read-low-write consumer="front-end" read_iops_sec=20 write_iops_sec=5
+----------+----------------------------------------------------+
| Property | Value |
+----------+----------------------------------------------------+
| consumer | front-end |
| id | c5f2119e-3709-43c3-8eb3-4f90d9b3ea4a |
| name | high-read-low-write |
| specs | {u'write_iops_sec': u'5', u'read_iops_sec': u'20'} |
+----------+----------------------------------------------------+
root@openstack:~# cinder type-create slow
+--------------------------------------+------+
| ID | Name |
+--------------------------------------+------+
| d3080d3c-34d4-43af-8f05-b5921963537a | slow |
+--------------------------------------+------+
root@openstack:~# cinder qos-associate c5f2119e-3709-43c3-8eb3-4f90d9b3ea4a d3080d3c-34d4-43af-8f05-b5921963537a
root@openstack:~# cinder create --display-name slow --volume-type slow 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-12-11T10:18:55.463877 |
| display_description | None |
| display_name | slow |
| id | 58b47e19-0368-4c06-addc-a967760f4d60 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | slow |
+---------------------+--------------------------------------+

root@openstack:~# cinder create --display-name slow --volume-type slow 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-12-11T10:21:14.377581 |
| display_description | None |
| display_name | slow |
| id | 2e589abc-a008-4433-89ae-1bb142b139e3 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | slow |
+---------------------+--------------------------------------+

root@openstack:~# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 2e589abc-a008-4433-89ae-1bb142b139e3 | available | slow | 1 | slow | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

root@openstack:~# nova list
+--------------------------------------+------+--------+------------+-------------+----------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+----------------+
| 4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322 | vm | ACTIVE | None | Running | vmnet=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+----------------+
root@openstack:~# nova volume-attach vm 2e589abc-a008-4433-89ae-1bb142b139e3 /dev/vdb
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdb |
| serverId | 4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322 |
| id | 2e589abc-a008-4433-89ae-1bb142b139e3 |
| volumeId | 2e589abc-a008-4433-89ae-1bb142b139e3 |
+----------+--------------------------------------+

root@openstack:~# virsh list
 Id Name State
----------------------------------------------------
 2 instance-00000002 running

root@openstack:~# virsh dumpxml instance-00000002
<domain type='qemu' id='2'>
  <name>instance-00000002</name>
  <uuid>4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322</uuid>
  <memory unit='KiB'>131072</memory>
  <currentMemory unit='KiB'>131072</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>OpenStack Foundation</entry>
      <entry name='product'>OpenStack Nova</entry>
      <entry name='version'>2013.2</entry>
      <entry name='serial'>a81b78b3-4044-4157-acd2-3b8c2939f915</entry>
      <entry name='uuid'>4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/nova/instances/4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322/disk'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <auth username='volumes'>
        <secret type='ceph' uuid='95c98032-ad65-5db8-f5d3-5bd09cd563ef'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-2e589abc-a008-4433-89ae-1bb142b139e3'>
        <host name='192.168.251.100' port='6790'/>
      </source>
      <target dev='vdb' bus='virtio'/>
      <serial>2e589abc-a008-4433-89ae-1bb142b139e3</serial>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/nova/instances/4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322/disk.config'/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='fa:16:3e:d3:2e:90'/>
      <source bridge='br100'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver name='qemu'/>
      <filterref filter='nova-instance-instance-00000002-fa163ed32e90'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='file'>
      <source path='/var/lib/nova/instances/4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322/console.log'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='1'/>
      <alias name='serial1'/>
    </serial>
    <console type='file'>
      <source path='/var/lib/nova/instances/4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322/console.log'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1' keymap='en-us'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='apparmor' relabel='yes'>
    <label>libvirt-4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322</label>
    <imagelabel>libvirt-4601cdd3-9cf9-4bd3-bf0c-0c95cb4a2322</imagelabel>
  </seclabel>
</domain>

This is a bit redundant but this is the nova's log:

2013-12-11 10:22:27.712 DEBUG nova.virt.libvirt.config [req-4f87e00d-8a8b-4e23-8652-055c28e399bb admin admin] Generated XML <disk type="network" device="disk">
  <driver name="qemu" type="raw" cache="none"/>
  <source protocol="rbd" name="volumes/volume-2e589abc-a008-4433-89ae-1bb142b139e3">
    <host name="192.168.251.100" port="6790"/>
  </source>
  <auth username="volumes">
    <secret type="ceph" uuid="95c98032-ad65-5db8-f5d3-5bd09cd563ef"/>
  </auth>
  <target bus="virtio" dev="vdb"/>
  <serial>2e589abc-a008-4433-89ae-1bb142b139e3</serial>
</disk>

I was expecting an "iotune" flag in the xml but nothing.
After discussing and debugging this with winston-d, he found the bug.

description: updated
description: updated
Changed in cinder:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Huang Zhiteng (zhiteng-huang)
milestone: none → icehouse-2
Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/61531
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e40dafd54411f0e4648fc051ef4d9c806f337f9d
Submitter: Jenkins
Branch: master

commit e40dafd54411f0e4648fc051ef4d9c806f337f9d
Author: Zhiteng Huang <email address hidden>
Date: Wed Dec 11 23:56:14 2013 +0800

    Fix QoS information in initialize_connection() result

    Currently the entire QoS information (if any) is included in the result of
    initialize_connection() even if the consumer of the QoS is 'back-end'. Also
    the format for QoS specs also is changed so that front-end (Nova) can
    parse correctly. Add unit test to cover initialize_connection().

    Closes-bug: 1259957

    DocImpact

    Change-Id: Ibc5e92cc1ddf6404e5b234ef524698feae282eec

Changed in cinder:
status: In Progress → Fix Committed
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/63632

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/havana)

Reviewed: https://review.openstack.org/63632
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1b437d937d712d374b7ade6dbf41215cee6e0d24
Submitter: Jenkins
Branch: stable/havana

commit 1b437d937d712d374b7ade6dbf41215cee6e0d24
Author: Zhiteng Huang <email address hidden>
Date: Wed Dec 11 23:56:14 2013 +0800

    Fix QoS information in initialize_connection() result

    Currently the entire QoS information (if any) is included in the result of
    initialize_connection() even if the consumer of the QoS is 'back-end'. Also
    the format for QoS specs also is changed so that front-end (Nova) can
    parse correctly. Add unit test to cover initialize_connection().

    Closes-bug: 1259957

    DocImpact

    (cherry-pick: e40dafd54411f0e4648fc051ef4d9c806f337f9d)

    Change-Id: Ibc5e92cc1ddf6404e5b234ef524698feae282eec

tags: added: in-stable-havana
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-2 → 2014.1
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.