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 1356769 - The integers in output of some virt-admin commands should not be signed
Summary: The integers in output of some virt-admin commands should not be signed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-15 02:35 UTC by Fangge Jin
Modified: 2017-08-01 23:53 UTC (History)
8 users (show)

Fixed In Version: libvirt-2.5.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:11:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Fangge Jin 2016-07-15 02:35:57 UTC
Description of problem:
Some virt-admin commands outputs negative values when the variable is more than 2147483647(2^31-1). See the steps.

Version-Release number of selected component (if applicable):
libvirt-2.0.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
# virt-admin srv-threadpool-set libvirtd --max-workers  2147483648

# virt-admin srv-threadpool-info libvirtd
minWorkers     : 5
maxWorkers     : -2147483648  ===> should be 2147483648
nWorkers       : 5
freeWorkers    : 5
prioWorkers    : 50
jobQueueDepth  : 0

2.
# virt-admin srv-clients-set libvirtd --max-clients 2147483649

# virt-admin srv-clients-info libvirtd
nclients_max        : -2147483647  ===> should be 2147483649
nclients            : 0
nclients_unauth_max : 30
nclients_unauth     : 0


Actual results:
As steps

Expected results:
As steps

Comment 2 Erik Skultety 2016-07-26 07:44:17 UTC
Fixed upstream by:

commit a8962f705d5b7973e322b81c38e46eb542cb1ad4
Author:     Erik Skultety <eskultet>
AuthorDate: Mon Jul 18 10:45:17 2016 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Tue Jul 19 13:27:45 2016 +0200

    virt-admin: Output srv-threadpool-info data as unsigned int rather than signed
    
    Internally, all the data are represented as unsigned int, it is also documented
    in the header file that users should use our exported constants that also
    indicate that the data should be unsigned int. However, when polling for the
    current server threadpool's configuration, virt-admin uses an incorrect
    formatting parameter '%d' for printf. Instead, virt-admin should use formatting
    parameter '%u'.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356769
    
    Signed-off-by: Erik Skultety <eskultet>

v2.0.0-195-ga8962f7

Comment 5 Lili Zhu 2016-09-04 11:16:08 UTC
srv-clients-set still does not work well for libvirt-2.0.0-6.el7.x86_64

# virt-admin srv-clients-set libvirtd --max-clients 2147483649

# virt-admin srv-clients-info libvirtd
nclients_max        : -2147483647  ===> should be 2147483649
nclients            : 1
nclients_unauth_max : 20
nclients_unauth     : 0

Comment 7 Erik Skultety 2016-09-07 12:25:33 UTC
Fixed upstream (this time for good) by:

commit e2c63714a87696e820313d50e005a6b9e53bad19
Author:     Erik Skultety <eskultet>
AuthorDate: Mon Sep 5 13:51:21 2016 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Wed Sep 7 14:07:18 2016 +0200

    virt-admin: Output srv-clients-set data as unsigned int rather than signed
    
    Unfortunately, commit a8962f70 only fixed first half of the reported issue of
    virt-admin outputting negative values where unsigned int is expected by
    BZ below, so this commit represents the other missing half of the fix.
    
    resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356769
    
    Signed-off-by: Erik Skultety <eskultet>

v2.2.0-38-ge2c6371

Comment 10 Lili Zhu 2017-06-12 04:56:19 UTC
Reproduce the bug with libvirt-2.0.0-2.el7.x86_64

Steps to reproduce
#  virt-admin srv-threadpool-set libvirtd --max-workers  2147483648

# virt-admin srv-threadpool-info libvirtd
minWorkers     : 5
maxWorkers     : -2147483648
nWorkers       : 5
freeWorkers    : 5
prioWorkers    : 5
jobQueueDepth  : 0


# virt-admin srv-clients-set libvirtd --max-clients 2147483649

#  virt-admin srv-clients-info libvirtd
nclients_max        : -2147483647
nclients            : 0
nclients_unauth_max : 20
nclients_unauth     : 0


Verify the bug with libvirt-3.2.0-9.el7.x86_64
# virt-admin server-threadpool-set libvirtd --max-workers  2147483648

# virt-admin server-threadpool-info libvirtd
minWorkers     : 5
maxWorkers     : 2147483648
nWorkers       : 5
freeWorkers    : 5
prioWorkers    : 5
jobQueueDepth  : 0

# virt-admin server-clients-set libvirtd --max-clients  2147483648

# virt-admin server-clients-info libvirtd
nclients_max        : 2147483648
nclients            : 0
nclients_unauth_max : 20
nclients_unauth     : 0

As the result matches the expectation, mark it as verified

Comment 11 errata-xmlrpc 2017-08-01 17:11:42 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.

https://access.redhat.com/errata/RHEA-2017:1846

Comment 12 errata-xmlrpc 2017-08-01 23:53:19 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.

https://access.redhat.com/errata/RHEA-2017:1846


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