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 1110185 - virDomainGetCPUStats returns binary data in error message when domain doesn't exist
Summary: virDomainGetCPUStats returns binary data in error message when domain doesn'...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 947974
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-17 08:00 UTC by Libor Miksik
Modified: 2018-12-06 16:53 UTC (History)
19 users (show)

Fixed In Version: libvirt-0.10.2-29.el6_5.10
Doc Type: Bug Fix
Doc Text:
The UUID (Universally Unique Identifier) is a string of characters which represents the virtual guest. Displaying the UUID on a screen requires correct APIs to present the strings in a user-readable format. Previously, printing unformatted UUID data caused exceptions or incorrectly formatted output. For Python scripts, exceptions that were not handled could cause unexpected failures. For other loggings or visual displays, the characters in the output were jumbled. With this update, the UUID strings are properly formatted and printing them no longer causes unexpected exceptions or jumbled characters on output.
Clone Of: 947974
Environment:
Last Closed: 2014-08-04 08:13:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0911 0 normal SHIPPED_LIVE libvirt bug fix update 2014-08-04 12:13:25 UTC

Description Libor Miksik 2014-06-17 08:00:20 UTC
This bug has been copied from bug #947974 and has been proposed
to be backported to 6.5 z-stream (EUS).

Comment 6 hongming 2014-07-04 07:53:42 UTC
Verify it as follows. The result is expected. Move its status to VERIFIED.


# rpm -q libvirt libvirt-python
libvirt-0.10.2-29.el6_5.10.x86_64
libvirt-python-0.10.2-29.el6_5.10.x86_64

# virsh create r6.4.xml
Domain r6.4 created from r6.4.xml

# python
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.open("")
>>> dom = conn.lookupByName("r6.4")
>>> dom.getCPUStats(0, 0)
[{'vcpu_time': 48019017686L, 'cpu_time': 87363244786L}, {'vcpu_time': 16978007952L, 'cpu_time': 34795454164L}, {'vcpu_time': 17747128599L, 'cpu_time': 27273854705L}, {'vcpu_time': 14829782612L, 'cpu_time': 22151642963L}]
>>> dom.memoryParameters(0)
{'swap_hard_limit': 5007199254740992L, 'hard_limit': 5007199254740992L, 'soft_limit': 5007199254740992L}
>>> params  = {'hard_limit': 5007199254740991L, 'soft_limit': 5007199254740991L, 'swap_hard_limit': 5007199254740991L}
>>> dom.setMemoryParameters(params,0)
0
>>> dom.memoryParameters(0)
{'swap_hard_limit': 5007199254740992L, 'hard_limit': 5007199254740992L, 'soft_limit': 5007199254740992L}
>>> dom.blkioParameters(0)
{'device_weight': '', 'weight': 500}
>>> params = {'device_weight': '', 'weight': 200}
>>> dom.setBlkioParameters(params,0)
0
>>> dom.blkioParameters(0)
{'device_weight': '', 'weight': 200}
>>> dom.numaParameters(0)
{'numa_nodeset': '0', 'numa_mode': 0}
>>> params  = {'numa_nodeset': '0', 'numa_mode': 0}
>>> dom.setNumaParameters(params,0)
0
>>> dom.numaParameters(0)
{'numa_nodeset': '0', 'numa_mode': 0}
>>> dom.schedulerParametersFlags(0)
{'vcpu_quota': -1L, 'vcpu_period': 100000L, 'emulator_period': 100000L, 'emulator_quota': -1L, 'cpu_shares': 2048L}
>>> params  ={'vcpu_quota': -1L, 'vcpu_period': 100000L, 'emulator_period': 100000L, 'emulator_quota': -1L, 'cpu_shares': 2048L}
>>> dom.setSchedulerParametersFlags(params,0)
0
>>> dom.schedulerParametersFlags(0)
{'vcpu_quota': -1L, 'vcpu_period': 100000L, 'emulator_period': 100000L, 'emulator_quota': -1L, 'cpu_shares': 2048L}
>>> dom.interfaceParameters("vnet2",0)
{'outbound.peak': 0, 'inbound.peak': 0, 'inbound.burst': 0, 'inbound.average': 0, 'outbound.average': 0, 'outbound.burst': 0}
>>> params  = {'outbound.peak': 0, 'inbound.peak': 0, 'inbound.burst': 0, 'inbound.average': 0, 'outbound.average': 128, 'outbound.burst': 0}
>>> dom.setInterfaceParameters("vnet2",params,0)
0
>>> dom.interfaceParameters("vnet2",0)
{'outbound.peak': 0, 'inbound.peak': 0, 'inbound.burst': 0, 'inbound.average': 0, 'outbound.average': 128, 'outbound.burst': 0}
>>> dom.destroy()
0


>>> dom.getCPUStats(0, 0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1868, in getCPUStats
    if ret is None: raise libvirtError ('virDomainGetCPUStats() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'


>>> dom.interfaceParameters("vnet2",0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1880, in interfaceParameters
    if ret is None: raise libvirtError ('virDomainGetInterfaceParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'


>>> params  = {'outbound.peak': 0, 'inbound.peak': 0, 'inbound.burst': 0, 'inbound.average': 0, 'outbound.average': 128, 'outbound.burst': 0}
>>> dom.setInterfaceParameters("vnet2",params,0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1978, in setInterfaceParameters
    if ret == -1: raise libvirtError ('virDomainSetInterfaceParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'


>>> dom.schedulerParametersFlags(0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1954, in schedulerParametersFlags
    if ret is None: raise libvirtError ('virDomainGetSchedulerParametersFlags() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

>>> params  ={'vcpu_quota': -1L, 'vcpu_period': 100000L, 'emulator_period': 100000L, 'emulator_quota': -1L, 'cpu_shares': 2048L}
>>> dom.setSchedulerParametersFlags(params,0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2002, in setSchedulerParametersFlags
    if ret == -1: raise libvirtError ('virDomainSetSchedulerParametersFlags() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

>>> dom.numaParameters(0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1922, in numaParameters
    if ret is None: raise libvirtError ('virDomainGetNumaParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

>>> params  = {'numa_nodeset': '0', 'numa_mode': 0}
>>> dom.setNumaParameters(params,0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1990, in setNumaParameters
    if ret == -1: raise libvirtError ('virDomainSetNumaParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

>>> dom.memoryParameters(0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1898, in memoryParameters
    if ret is None: raise libvirtError ('virDomainGetMemoryParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

>>> params  = {'hard_limit': 5007199254740991L, 'soft_limit': 5007199254740991L, 'swap_hard_limit': 5007199254740991L}
>>> dom.setMemoryParameters(params,0)
libvir: QEMU Driver error : Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1984, in setMemoryParameters
    if ret == -1: raise libvirtError ('virDomainSetMemoryParameters() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid 'd920458d-a80c-2796-8c60-f471f3e35a1b'

Comment 8 errata-xmlrpc 2014-08-04 08:13:59 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-2014-0911.html


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