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 916493 - pinEmulator and emulatorPinInfo should be simple with required params
Summary: pinEmulator and emulatorPinInfo should be simple with required params
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 916501
TreeView+ depends on / blocked
 
Reported: 2013-02-28 07:40 UTC by Wayne Sun
Modified: 2014-06-18 00:44 UTC (History)
4 users (show)

Fixed In Version: libvirt-1.0.4-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 916501 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:15:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wayne Sun 2013-02-28 07:40:52 UTC
Description of problem:
python binding API pinEmulator and emulatorPinInfo should be simple and clear as pinVcpu and vcpuPinInfo for given params to use.

# python
Python 2.7.3 (default, Aug 10 2012, 02:54:27) 
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> con = libvirt.open(None)
>>> dom = con.lookupByName('libvirt_test_api')
>>> dom.pinEmulator('sdflsjkl', 2, 0)
0

the given cpumap is a random str 'sdflsjkl' and it success
check with virsh command:
# virsh emulatorpin libvirt_test_api
emulator: CPU Affinity
----------------------------------
       *: 0-1,4-6,10,13-14

>>> dom.emulatorPinInfo(' ', 2, 0)
1

the return vaule of emulatorPinInfo will be 1 as success, user can't get detail useful info out of it.

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

How reproducible:
always

Steps to Reproduce:
1. as description
2.
3.
  
Actual results:
as description

Expected results:
should be like pinVcpu and vcpuPinInfo

Additional info:

Comment 2 Peter Krempa 2013-03-21 12:51:10 UTC
The python API for emulator pinning now mirrors the design of vcpu pinning. Added upstream with:

commit d395c81121cd997d1971149361905e4e8c917004
Author: Peter Krempa <pkrempa>
Date:   Wed Mar 20 11:43:41 2013 +0100

    python: Fix emulatorpin API bindings
    
    The addition of emulator pinning APIs didn't think of doing the right
    job with python APIs for them. The default generator produced unusable
    code for this.
    
    This patch switches to proper code as in the case of domain Vcpu pining.
    This change can be classified as a python API-breaker but in the state
    the code was before I doubt anyone was able to use it successfully.

Moving to POST.

Comment 3 Wayne Sun 2013-04-09 11:44:21 UTC
# rpm -q libvirt-python libvirt
libvirt-python-1.0.4-1.el7.x86_64
libvirt-1.0.4-1.el7.x86_64

# python
Python 2.7.3 (default, Mar 28 2013, 19:04:13) 
[GCC 4.8.0 20130307 (Red Hat 4.8.0-0.16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> con = libvirt.open(None)
>>> dom = con.lookupByName('aa')
>>> dom.emulatorPinInfo(0)
(True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True)
>>> nmap = (True, True, False, True, False, False, False, False, False, False, False, False, False, False, False, False)
>>> dom.pinEmulator(nmap, 0)
0
>>> dom.emulatorPinInfo(0)
(True, True, False, True, False, False, False, False, False, False, False, False, False, False, False, False)
>>> 

this is working as vcpu pinning now.

Comment 4 Ludek Smid 2014-06-13 10:15:29 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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