Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 618876

Summary: Libvirt-qpid needs to be rebuilt for new qpid/qmf libraries.
Product: Red Hat Enterprise Linux 6 Reporter: Ian Main <imain>
Component: libvirt-qpidAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: high    
Version: 6.0CC: ajia, akarol, apevec, dallan, dyuan, hbrock, mjenner, mshao, nsantos, syeghiay, tross
Target Milestone: rcKeywords: Reopened, RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-qpid-0.2.22-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:23:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 631002    
Bug Blocks:    
Attachments:
Description Flags
libvirt-list lists libvirt-qpid objects. none

Description Ian Main 2010-07-27 22:57:27 UTC
Description of problem:

libvirt-qpid will appear to run but will cause clients to get msg format errors if not rebuilt.

Version-Release number of selected component (if applicable):

0.2.22

How reproducible:

100%

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


Expected results:


Additional info:

Comment 2 RHEL Program Management 2010-07-27 23:17:39 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Ian Main 2010-07-28 14:56:59 UTC
Presently, this bug shows up as:

$ ./libvirt-list.rb 
Console Connection Established...
sessions are
#<Qmf::ConsoleObject:0x7f8f31c65fd0>#<Qmf::ConsoleObject:0x7f8f31c658f0>#<Qmf::ConsoleObject:0x7f8f31c65210>#<Qmf::ConsoleObject:0x7f8f31c64b30>#<Qmf::ConsoleObject:0x7f8f31c64450>#<Qmf::ConsoleObject:0x7f8f31c63d70>#<Qmf::ConsoleObject:0x7f8f31c63690>
querying for nodes.
terminate called after throwing an instance of 'qpid::framing::OutOfBounds'
  what():  Out of Bounds
Aborted (core dumped)

Or you can use qpid-tool.  Note that all you have to do is start qpid-tool with
libvirt-qpid running and it will attempt to query the agent, resulting in:

# qpid-tool
Management Tool for QPID
qpid: EXCEPTION in Broker._v1Cb: unpack requires a string argument of length 1
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/qmf/console.py", line 2361, in
_v1Dispatch
    self._v1DispatchProtected(msg)
  File "/usr/lib/python2.6/site-packages/qmf/console.py", line 2415, in
_v1DispatchProtected
    agent._handleQmfV1Message(opcode, seq, mp, ah, codec)
  File "/usr/lib/python2.6/site-packages/qmf/console.py", line 3106, in
_handleQmfV1Message
    elif opcode == 'c': self._v1HandleContentInd(codec, seq, prop=True)
  File "/usr/lib/python2.6/site-packages/qmf/console.py", line 2888, in
_v1HandleContentInd
    classKey = ClassKey(codec)
  File "/usr/lib/python2.6/site-packages/qmf/console.py", line 1525, in
__init__
    self.pname = str(codec.read_str8())
  File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 170, in
read_str8
    return self.read_vbin8().decode("utf8")
  File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 162, in
read_vbin8
    return self.read(self.read_uint8())
  File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 85, in
read_uint8
    return self.unpack("!B")
  File "/usr/lib/python2.6/site-packages/qpid/packer.py", line 29, in unpack
    values = struct.unpack(fmt, self.read(struct.calcsize(fmt)))
error: unpack requires a string argument of length 1

Comment 4 Ian Main 2010-07-28 14:59:19 UTC
Created attachment 435041 [details]
libvirt-list lists libvirt-qpid objects.

I've attached the libvirt-list.rb script as a good testing mechanism.

Comment 5 Ian Main 2010-07-28 19:44:09 UTC
Fixed in libvirt-qpid-0.2.22-3.

Comment 7 dyuan 2010-08-03 08:02:53 UTC
Verified PASSED with libvirt-qpid-0.2.22-3.el6.
 
# qpid-tool 
Management Tool for QPID
qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  binding       15      12
    org.apache.qpid.broker  vhost         1       0
    com.redhat.libvirt      volume        102     0
    org.apache.qpid.broker  broker        1       0
    com.redhat.libvirt      node          1       0
    com.redhat.libvirt      pool          6       0
    com.redhat.libvirt      domain        2       0
    org.apache.qpid.broker  agent         1       0
    org.apache.qpid.broker  connection    2       1
    org.apache.qpid.broker  session       2       1
    org.apache.qpid.broker  subscription  6       5
    org.apache.qpid.broker  queue         6       5
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  system        1       0

Comment 8 Alex Jia 2010-09-09 12:57:30 UTC
I can't find node class in the list, is this a expected result? 

# service libvirt-qpid restart
Stopping libvirt-qpid daemon:                              [  OK  ]
Starting libvirt-qpid daemon:                              [  OK  ]

# service qpidd restart
Stopping Qpid AMQP daemon:                                 [  OK  ]
Starting Qpid AMQP daemon:                                 [  OK  ]

# qpid-tool
Management Tool for QPID
qpid: list
Summary of Objects by Type:
qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  session       2       0
    org.apache.qpid.broker  agent         1       0
    com.redhat.libvirt      domain        1       0
    com.redhat.libvirt      volume        1       0
    org.apache.qpid.broker  broker        1       0
    org.apache.qpid.broker  binding       15      0
    com.redhat.libvirt      pool          1       0
    org.apache.qpid.broker  subscription  6       0
    org.apache.qpid.broker  system        1       0
    org.apache.qpid.broker  queue         6       0
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  connection    2       0
    org.apache.qpid.broker  vhost         1       0
qpid: list node
Object Summary:



# uname -a
Linux dhcp-66-92-184.nay.redhat.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1
01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.0 (Santiago)

# rpm -qa|grep qpid
python-qpid-0.7.946106-12.el6.noarch
qpid-cpp-client-0.7.946106-5.el6.x86_64
qpid-cpp-server-0.7.946106-5.el6.x86_64
qpid-tools-0.7.946106-4.el6.noarch
libvirt-qpid-0.2.22-3.el6.x86_64

Comment 9 Ian Main 2010-09-09 19:34:56 UTC
My suspicion is that libvirt-qpid is not connecting to qpidd properly because there is no authentication method configured.  By default now qpidd requires authentication.

The easiest way to fix this is to add auth=no to /etc/qpidd.conf and restart qpidd and libvirt-qpid and try again.

ajia: I'll try to catch you on irc again if I can.

Comment 11 Alex Jia 2010-09-10 03:35:04 UTC
(In reply to comment #9)
> My suspicion is that libvirt-qpid is not connecting to qpidd properly because
> there is no authentication method configured.  By default now qpidd requires
> authentication.
> 
> The easiest way to fix this is to add auth=no to /etc/qpidd.conf and restart
> qpidd and libvirt-qpid and try again.
> 
> ajia: I'll try to catch you on irc again if I can.

Ian,
In fact, I have done it as you said, change auth=yes to auth=no and restart qpidd and libvirt-qpid services, so I can see domain & pool & volume classes in qpid-tool list, but I can't find node class.

Comment 12 Ian Main 2010-09-10 04:29:10 UTC
Ah, I see what you mean, sorry I didn't not read carefully enough.

I just checked and I am in fact seeing the same thing.  However, libvirt-list.rb correctly shows the node object, so now I don't know if it's qpid-tool at fault or what..

I just ran qpid-tool again and this time it worked:

qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  binding       15      0
    org.apache.qpid.broker  connection    2       0
    org.apache.qpid.broker  agent         1       0
    com.redhat.libvirt      node          1       0
    org.apache.qpid.broker  session       2       0
    org.apache.qpid.broker  system        1       0
    org.apache.qpid.broker  vhost         1       0
    org.apache.qpid.broker  subscription  6       0
    com.redhat.libvirt      domain        4       0
    org.apache.qpid.broker  queue         6       0
    org.apache.qpid.broker  broker        1       0
    org.apache.qpid.broker  exchange      8       0

libvirt-list.rb always works though:

...
querying for nodes.
nodes are #<Qmf::ConsoleObject:0x7fd3de2365e0>
node: mantis.virt.bos.redhat.com
  property: hostname, mantis.virt.bos.redhat.com

So somehow qpid-tool is always finding the node object.  I will ask tross about this tomorrow.

Comment 13 Ian Main 2010-09-10 04:35:39 UTC
Restarting libvirt-qpid while qpid-tool is running makes it show up more often than just running qpid-tool, but it is still intermittent.

I'm starting to think this may be a QMF bug.

Comment 14 Ian Main 2010-09-10 04:38:54 UTC
Sorry, comment 12 should read "So somehow qpid-tool NOT is always finding the node object."  

To be clear qpid-tool is finding the node object intermittently, but usually it will not find it in my testing.  Maybe 1 in 10 times or so it will show up.  If you restart libvirt-qpid while qpid-tool is running, it seems to show up more often.

The 'node' object is a singleton and is created on startup.  No properties are updated once the object is created.

Comment 15 Alex Jia 2010-09-10 09:29:16 UTC
Ian, 
I retest the bug on RHEL6.0 RC2, the issue still exists, sometimes I can't get
node class, sometimes I can get node class, and I thinks it probably is a
qpid-tool bug not QMF, because I always can get node class using QMF python
binding:

# python
Python 2.6.5 (r265:79063, Jul 14 2010, 11:36:05)
[GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from qmf.console import Session
>>> s = Session()
>>> b = s.addBroker()
>>> agents = s.getAgents()
>>> for a in agents:
...     print a
...
Agent(v2) at bank 1.0 (BrokerAgent)
Agent(v1) at bank 1.10 (Red Hat:libvirt-qpid:)
>>> lv = agents[1]
>>> lv
Agent(v1) at bank 1.10 (Red Hat:libvirt-qpid:)
>>> dlist=lv.getObjects(_class="node")
>>> dlist
[com.redhat.libvirt:node[0-1-1-10-1] dhcp-93-155.englab.nay.redhat.com]
>>> dlist[0].getIndex()
u'dhcp-93-155.englab.nay.redhat.com'


Version-Release number of selected component (if applicable):

# uname -r
2.6.32-71.el6.x86_64

# rpm -qa | grep qpid
qpid-cpp-server-0.7.946106-5.el6.x86_64
libvirt-qpid-0.2.22-3.el6.x86_64
qpid-cpp-client-0.7.946106-5.el6.x86_64
ruby-qpid-0.7.946106-2.el6.x86_64
qpid-tests-0.7.946106-1.el6.noarch
python-qpid-0.7.946106-12.el6.noarch
qpid-tools-0.7.946106-4.el6.noarch

# rpm -qa | grep qmf
qmf-0.7.946106-5.el6.x86_64
python-qmf-0.7.946106-5.el6.noarch
ruby-qmf-0.7.946106-5.el6.x86_64

Comment 16 Ian Main 2010-09-10 18:01:34 UTC
I spoke with Ted Ross and we do not think this is a libvirt-qpid bug, but a qpid-tool bug.

I opened a new BZ against qpid tool: https://bugzilla.redhat.comshow_bug.cgi?id=632678

libvirt-qpid itself seems to be behaving properly and works fine with the ruby and python consoles so I think this should be closed.

Comment 18 Dave Allan 2010-09-20 19:24:49 UTC
I am closing as not a bug, per comment #16.

Comment 19 Alan Pevec 2011-02-04 14:59:16 UTC
Need to rebuild libvirt-qpid for 6.1, update qpid-cpp changed lib version:

* Fri Feb 04 2011 Kim van der Riet<kim.vdriet> - 0.7.946106-11
- Related: rhbz#631002 - Synchronize qpid-cpp build to MRG 1.3.
  This build synchronizes with RHEL-{4,5} qpid-cpp-mrg-0.7.946106-27 (MRG 1.3.2 RC2).
  Updated lib version numbers for RHEL 6.1.

Comment 21 Alan Pevec 2011-02-07 08:33:34 UTC
libvirt-qpid-0.2.22-4.el6 didn't have qpid-cpp with new libs in buildroot

Comment 24 Dave Allan 2011-03-30 20:05:53 UTC
*** Bug 690585 has been marked as a duplicate of this bug. ***

Comment 26 Aziza Karol 2011-05-02 06:14:03 UTC
Libvirt-qpid  is rebuilt for new qpid/qmf libraries.

No msg format errors is displayed now.

Verified on:
root@amd-ma78gm-03 home]# uname -a
Linux amd-ma78gm-03.rhts.eng.bos.redhat.com 2.6.32-131.0.10.el6.x86_64 #1 SMP Wed Apr 27 15:27:19 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@amd-ma78gm-03 home]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.1 (Santiago)

[root@amd-ma78gm-03 home]# rpm -qa|grep qpid
qpid-qmf-0.10-6.el6.x86_64
qpid-cpp-server-0.10-3.el6.x86_64
qpid-cpp-client-0.10-3.el6.x86_64
python-qpid-qmf-0.10-6.el6.x86_64
libvirt-qpid-0.2.22-6.el6.x86_64
python-qpid-0.10-1.el6.noarch
qpid-tools-0.10-3.el6.noarch

verification details:
[root@amd-ma78gm-03 home]# qpid-tool 
Management Tool for QPID
qpid: agents
QMF Agents:
    Agent Name                                                   Label        Epoch  QMF Version
    ==============================================================================================
    1.0                                                          BrokerAgent  0      2
    1.Red Hat:libvirt-qpid:03efb019-9b71-4621-aa23-6953d9f8c6d1  QMFv2 Agent  1      2

qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  binding       16      0
    org.apache.qpid.broker  system        1       0
    org.apache.qpid.broker  broker        1       0
    org.apache.qpid.broker  subscription  6       0
    org.apache.qpid.broker  connection    2       0
    org.apache.qpid.broker  session       2       0
    org.apache.qpid.broker  queue         6       0
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  vhost         1       0

qpid: list system
Object Summary:
    ID   Created   Destroyed  Index
    ========================================================================
    142  05:45:45  -          UUID('ffe8d4dd-23f2-4b73-84d7-e956eea40fa8')
qpid: show 142
Object of type: org.apache.qpid.broker:system:_data(92f7522b-1888-82d7-49ea-668db4c5ea0b)
    Attribute  142
    =========================================================
    systemId   UUID('ffe8d4dd-23f2-4b73-84d7-e956eea40fa8')
    osName     Linux
    nodeName   amd-ma78gm-03.rhts.eng.bos.redhat.com
    release    2.6.32-131.0.10.el6.x86_64
    version    #1 SMP Wed Apr 27 15:27:19 EDT 2011
    machine    x86_64
qpid: list exchange
Object Summary:
    ID   Created   Destroyed  Index
    ==================================================
    144  05:51:32  -          167.
    145  05:51:32  -          167.amq.direct
    146  05:51:32  -          167.amq.fanout
    147  05:51:32  -          167.amq.match
    148  05:51:32  -          167.amq.topic
    149  05:51:32  -          167.qmf.default.direct
    150  05:51:32  -          167.qmf.default.topic
    151  05:51:32  -          167.qpid.management
qpid: 


However the qpid-tool does not list domain,pool & volume classes.
As per comment 11,I haved changed the auth=yes to auth=no in /etc/qpidd.conf  and restarted
qpidd and libvirt-qpid services.still the list does not display the domain,pool & volume classes.

Are this classes being removed from the list?
Just want to know if this classes are removed from qpid-tool,then this bug can be mark as verified.

Comment 27 Alan Pevec 2011-05-02 12:45:33 UTC
Use qmf-tool, libvirt-qpid recompiled with new qpid is now QMF v2 agent and qpid-tool doesn't handle them. With v2 you need to query agents explicitly:
# qmf-tool 
Management Tool for QMF
qmf: list agents
QMF Agents:
       Id  Vendor      Product       Instance                              Epoch
    ==============================================================================
       1   Red Hat     libvirt-qpid  4a78b1ed-29ea-4be8-ba6d-b73c9fcd6f76  1
    *  2   apache.org  qpidd         9c5f7e5a-0ea6-416f-8cb1-df9964cadfbd  26
qmf: set default 1
Default Agent: Red Hat:libvirt-qpid:4a78b1ed-29ea-4be8-ba6d-b73c9fcd6f76
qmf: list classes
Classes:
    Package             Class   Type
    ==================================
    com.redhat.libvirt  domain  Data
    com.redhat.libvirt  node    Data
    com.redhat.libvirt  pool    Data
    com.redhat.libvirt  volume  Data
qmf: query domain
Data Objects Returned: 3:
    Number  Data Address
    ===============================================================================
    1       com.redhat.libvirt:domain:483c3243-b667-300c-7da5-de01492ce181,xp
    2       com.redhat.libvirt:domain:7134780a-dedd-db84-2a53-d183ece58395,node8
    3       com.redhat.libvirt:domain:ada3ed87-7d8a-6361-f2e8-4cdea33f2119,nodel5
qmf: show 1
Properties:
    Name           Value
    ================================================================================================================================================================
    node           {'_object_name': 'com.redhat.libvirt:node:ape', '_agent_name': 'Red Hat:libvirt-qpid:4a78b1ed-29ea-4be8-ba6d-b73c9fcd6f76', '_agent_epoch': 1L}
    name           xp
    maximumMemory  786432
    numVcpus       1
    state          shutoff
    cpuTime        0
    memory         786432
    active         false
    id             -1
    uuid           483c3243-b667-300c-7da5-de01492ce181
qmf:

Comment 28 Aziza Karol 2011-05-03 13:06:56 UTC
As per comment 27,Used qmf-tool to list and query the agents explicitly.

Verified on:
[root@amd-ma78gm-03 home]# uname -a
Linux amd-ma78gm-03.rhts.eng.bos.redhat.com 2.6.32-131.0.10.el6.x86_64 #1 SMP Wed Apr 27 15:27:19 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@amd-ma78gm-03 home]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.1 (Santiago)

[root@amd-ma78gm-03 home]# rpm -qa|grep qpid
qpid-qmf-0.10-6.el6.x86_64
qpid-cpp-server-0.10-3.el6.x86_64
qpid-cpp-client-0.10-3.el6.x86_64
python-qpid-qmf-0.10-6.el6.x86_64
libvirt-qpid-0.2.22-6.el6.x86_64
python-qpid-0.10-1.el6.noarch
qpid-tools-0.10-3.el6.noarch

verification details:
qmf: list agents
QMF Agents:
       Id  Vendor      Product       Instance                              Epoch
    ==============================================================================
       1   Red Hat     libvirt-qpid  57d27c8f-84ce-46f0-93f0-336f4239f3d0  1
    *  2   apache.org  qpidd         0772899b-664d-414b-9b56-13096cd4613b  7
qmf: set default 1
Default Agent: Red Hat:libvirt-qpid:57d27c8f-84ce-46f0-93f0-336f4239f3d0
qmf: list classes
Classes:
    Package             Class   Type
    ==================================
    com.redhat.libvirt  domain  Data
    com.redhat.libvirt  node    Data
    com.redhat.libvirt  pool    Data
    com.redhat.libvirt  volume  Data
qmf: query node
Data Objects Returned: 1:
    Number  Data Address
    =======================================================================
    1       com.redhat.libvirt:node:amd-ma78gm-03.rhts.eng.bos.redhat.com
qmf: show 1
Properties:
    Name               Value
    ==========================================================
    hypervisorVersion  0.12.1
    threads            1
    hypervisorType     QEMU
    uri                qemu:///system
    hostname           amd-ma78gm-03.rhts.eng.bos.redhat.com
    cpus               4
    apiVersion         0.8.7
    sockets            1
    libvirtVersion     0.8.7
    mhz                800
    memory             7673024
    cores              4
    model              x86_64
    nodes              1
qmf: 

Marking this bug as verified.

Comment 29 errata-xmlrpc 2011-05-19 14:23:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0762.html