From 2e90d62727c093efbf60a7d86b1ee5262b041bbb Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Thu, 28 Aug 2014 16:58:02 +0800 Subject: [PATCH] Fix wrong disk type limitation for disk IO throttling The disk I/O limits feature in QEMU block layer allows I/O throttling to be used across all underlying storage types. Change-Id: If99107955fc976b00ee101d4c6a685c29e655f82 Closes-Bug: #1362129 --- nova/virt/libvirt/imagebackend.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py index ba226f9284ac..54c586bc3b3b 100644 --- a/nova/virt/libvirt/imagebackend.py +++ b/nova/virt/libvirt/imagebackend.py @@ -142,14 +142,11 @@ class Image(object): 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'] - # Note(yaguang): Currently, the only tuning available is Block I/O - # throttling for qemu. - if self.source_type in ['file', 'block']: - 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) + 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 def check_image_exists(self):