RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 865310 - set_node_memory_parameters failed with error
Summary: set_node_memory_parameters failed with error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: perl-Sys-Virt
Version: 6.4
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 881827
TreeView+ depends on / blocked
 
Reported: 2012-10-11 08:05 UTC by weizhang
Modified: 2013-02-21 09:52 UTC (History)
6 users (show)

Fixed In Version: perl-Sys-Virt-0.10.2-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: When setting memory parameters the set_node_memory_parameters method was trying to also update some readonly values Consequence: The set_node_memory_parameters API would always return an error Fix: The set_node_memory_parameters method was changed to only set parameters which had changed Result: The set_node_memory_parameters method can be used
Clone Of:
Environment:
Last Closed: 2013-02-21 09:52:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0377 0 normal SHIPPED_LIVE perl-Sys-Virt bug fix and enhancement update 2013-02-20 20:52:18 UTC

Description weizhang 2012-10-11 08:05:47 UTC
Description of problem:
set_node_memory_parameters can not work and failed with error
libvirt error code: 8, message: invalid argument: parameter 'shm_pages_shared' not supported
when I want to set shm-sleep-millisecs and shm-pages-to-scan

Version-Release number of selected component (if applicable):
perl-Sys-Virt-0.10.2-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. # cat perl-test.pl
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;

my $uri = "qemu:///system";
my $con = Sys::Virt->new(address => $uri);

my %param = (Sys::Virt::NODE_MEMORY_SHARED_PAGES_TO_SCAN => 200, Sys::Virt::NODE_MEMORY_SHARED_SLEEP_MILLISECS => 100);
$con->set_node_memory_parameters(\%param);

2. perl perl-test.pl
  
Actual results:
libvirt error code: 8, message: invalid argument: parameter 'shm_pages_shared' not supported

Expected results:
set can succeed

Additional info:
virsh command succeed
# virsh node-memory-tune --shm-pages-to-scan 200 --shm-sleep-millisecs 100
# virsh node-memory-tune
Shared memory:
	shm_pages_to_scan 200
	shm_sleep_millisecs 100
	shm_pages_shared 0
	shm_pages_sharing 0
	shm_pages_unshared 0
	shm_pages_volatile 0
	shm_full_scans  0

Comment 2 Daniel Berrangé 2012-11-02 16:45:09 UTC
This is an issue with the way libvirt-perl does updates. It fetches all memory parameters, updates the changed ones, and sends the whole lot back. It should only send the changed ones.

Comment 3 Daniel Berrangé 2012-11-16 14:37:17 UTC
commit b067d9beac1d65892e41aa81e1b52af70ac1012d
Author: Daniel P. Berrange <berrange>
Date:   Fri Nov 16 14:10:48 2012 +0000

    Don't set all typed parameters at once
    
    It must not be assumed that all typed parameters which are read,
    can also be written. Thus when setting typed parameters, the
    list must be filtered down to only include the parameters that
    the application has requested to change.

Comment 6 weizhang 2012-11-20 02:52:45 UTC
Verify pass on
perl-Sys-Virt-0.10.2-4.el6.x86_64
libvirt-0.10.2-3.el6.x86_64


There is no error after execute perl script showed in description. And check the value of shm_pages_to_scan and shm_sleep_millisecs change according to the setting. So verify pass

Comment 8 errata-xmlrpc 2013-02-21 09:52:25 UTC
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


Note You need to log in before you can comment on or make changes to this bug.