Bug 848309
Summary: | Can not set device_weight with set_blkio_parameters | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | weizhang <weizhan> |
Component: | perl-Sys-Virt | Assignee: | Daniel Berrangé <berrange> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 6.3 | CC: | ajia, dyuan, mzhan, ydu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | perl-Sys-Virt-0.10.2-2.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
The Perl binding was setting an incompatible flag for the set_blkio_parameters API
Consequence:
It was not possible to use the set_blkio_parameters API to apply block tuning
Fix:
The incorrect flag was removed
Result:
The set_blkio_parameters API can be used
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-21 09:52:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
weizhang
2012-08-15 08:52:59 UTC
I also can not set flag for get_blkio_parameters/set_blkio_parameters which include VIR_DOMAIN_AFFECT_CURRENT = 0 : Affect current domain state. VIR_DOMAIN_AFFECT_LIVE = 1 : Affect running domain state. VIR_DOMAIN_AFFECT_CONFIG = 2 : Affect persistent domain state. Usage get from man page $dom->set_blkio_parameters($params, $flags=0) my $params = $dom->get_blkio_parameters($flags=0) %params = (Sys::Virt::Domain::BLKIO_WEIGHT => 600); When I call $dom->set_blkio_parameters(\%params, 1); it will report usage error Usage: Sys::Virt::Domain::set_blkio_parameters(dom, newparams) When I call $dom->get_blkio_parameters(1); it will report usage error Usage: Sys::Virt::Domain::get_blkio_parameters(dom) Without flag, it works fine. The missing flags parameters are fixed in commit e5b0948d4037c836b76bbfe22d7f91c8ce597362 Author: Osier Yang <jyang> Date: Tue Aug 28 23:52:24 2012 +0800 Fix several APIs These APIs accept one more argument (flags), which was ignored in the XS implementations. Hi DB, What about the Description problem in https://bugzilla.redhat.com/show_bug.cgi?id=848309#c0 ? Is that won't fix, or not a bug? > libvirt error code: 8, message: unsupported flags (0x4) in function qemuDomainSetBlkioParameters
Oh, i missed that. This is another problem. The perl binding should not be setting the VIR_TYPED_PARAM_STRING_OKAY flag here.
Verify pass on perl-Sys-Virt-0.10.2-2.el6.x86_64 with the following scripts #!/usr/bin/perl use warnings; use strict; use Sys::Virt; my $uri = "qemu:///system"; my $domname = "vr-rhel6u3-x86_64-kvm"; my $flags = 0; my $con = Sys::Virt->new(address => $uri, readonly => 0); my $dom = $con->get_domain_by_name($domname); my $weight = 800; my $device_weight = '/dev/sda,800'; my $weight2 = 700; my $device_weight2 = '/dev/sda,700'; my %blkio = (Sys::Virt::Domain::BLKIO_WEIGHT => $weight, Sys::Virt::Domain::BLKIO_DEVICE_WEIGHT => $device_weight); $dom->set_blkio_parameters(\%blkio, 1); my %blkio2 = (Sys::Virt::Domain::BLKIO_WEIGHT => $weight2, Sys::Virt::Domain::BLKIO_DEVICE_WEIGHT => $device_weight2); $dom->set_blkio_parameters(\%blkio2, 2); my $current_weight = $dom->get_blkio_parameters(1); print "current weight, $current_weight->{weight}\n"; print "current device weight, $current_weight->{device_weight}\n"; my $config_weight = $dom->get_blkio_parameters(2); print "config weight, $config_weight->{weight} \n"; print "config device weight, $config_weight->{device_weight} \n"; result is current weight, 800 current device weight, /dev/sda,800 config weight, 700 config device weight, /dev/sda,700 as expected Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0377.html |