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 1146540 - Will get error while setting the hard_limit as "0" and swap_hard_limit as "-1" first time
Summary: Will get error while setting the hard_limit as "0" and swap_hard_limit as "-1...
Keywords:
Status: CLOSED DUPLICATE of bug 1146539
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-25 13:01 UTC by Xuesong Zhang
Modified: 2015-03-04 10:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-04 10:56:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xuesong Zhang 2014-09-25 13:01:03 UTC
Description
Will get error, while setting the hard_limit as "0" and swap_hard_limit as "-1" first time

Version:
libvirt-1.2.8-3.el7.x86_64
qemu-kvm-rhev-2.1.0-4.el7.x86_64
kernel-3.10.0-168.el7.x86_64


How reproducible:
100%

Steps to Reproduce:

1. restart the libvirtd service, and prepare one shutoff guest, which the 3 memtune setting value is unlimited.
# systemctl restart libvirtd

# virsh memtune rhel7
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited

2. setting the hard_limit as "0" and swap_hard_limit as "-1", get error
# virsh memtune rhel7 --hard-limit 0 --swap-hard-limit -1
error: Unable to change memory parameters
error: invalid argument: memory hard_limit tunable value must be lower than or equal to swap_hard_limit

3. setting hard_limit and swap_hard_limit as "-1", no error
# virsh memtune rhel7 --hard-limit -1 --swap-hard-limit -1

4. setting the hard_limit as "0" and swap_hard_limit as "-1" again, no error
# virsh memtune rhel7 --hard-limit 0 --swap-hard-limit -1


Actual results:
As step 2, while setting the hard_limit as "0" and swap_hard_limit as "-1" first time, will get error.

Expected results:
Since 0 and -1 should be all denotes unlimited, so the step 2 should not meet any error.

Additional info:

Comment 1 Pavel Hrdina 2015-03-04 10:56:25 UTC
It could not be that obvious but it's a duplicate of BZ 1146539.  The main issue with memtune is that we handle 0 value differently in virsh and our APIs and also we have two possible ways how to internally store unlimited.  The patch is on it's way to upstream.

*** This bug has been marked as a duplicate of bug 1146539 ***


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