Bug 596682 - Domain info is shown incorrectly.
Domain info is shown incorrectly.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt-qpid (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Ian Main
Virtualization Bugs
:
: 601551 616466 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-27 06:05 EDT by Johnny Liu
Modified: 2010-11-10 16:05 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-qpid-0.2.21-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:05:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2010-05-27 06:05:10 EDT
Description of problem:
Start two domains via virsh command, but in "list domain" output, only one domain is seen. The other is missing.

Version-Release number of selected component (if applicable):
# rpm -qa|grep qpid
qpid-tools-0.7.946106-3.el6.noarch
qpid-cpp-server-0.7.946106-2.el6.x86_64
libvirt-qpid-0.2.20-2.el6.x86_64
python-qpid-0.7.946106-1.el6.noarch
qpid-cpp-client-0.7.946106-2.el6.x86_64
# rpm -qa|grep libvirt
libvirt-client-0.8.1-7.el6.x86_64
libvirt-python-0.8.1-7.el6.x86_64
libvirt-qpid-0.2.20-2.el6.x86_64
libvirt-0.8.1-7.el6.x86_64
# uname -a
Linux dhcp-66-70-178.nay.redhat.com 2.6.32-30.el6.x86_64 #1 SMP Tue May 25 18:02:45 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
Always

Steps to Reproduce:
1. Start libvirt-qpid, qpidd, libvirtd service.
2. 
# qpid-tool 
Management Tool for QPID
qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  broker        1       0
    org.apache.qpid.broker  vhost         1       0
    com.redhat.libvirt      domain        1       0
    com.redhat.libvirt      pool          1       0
    org.apache.qpid.broker  binding       14      0
    com.redhat.libvirt      volume        1       0
    org.apache.qpid.broker  subscription  4       0
    org.apache.qpid.broker  queue         4       0
    org.apache.qpid.broker  session       2       0
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  connection    2       0
    com.redhat.libvirt      node          1       0
    org.apache.qpid.broker  system        1       0
qpid: list domain
Object Summary:
    ID   Created   Destroyed  Index
    ==============================================================================
    101  00:00:00  -          com.redhat.libvirt:domain:com.redhat.libvirt:node:
qpid: show 101
Object of type: com.redhat.libvirt:domain(b84f5eed-5ed5-3b70-077b-127b3f3e5fa5)
    Attribute      101
    ===================================================================================================
    uuid           '6bd72aef-3661-8400-ab2c-c15c935cdd85'
    name           'demo'
    id             8
    node           0-1-1-vendor:product:aacd80b8-ea2d-42ac-97b8-7ae1d270318b-com.redhat.libvirt:node:
    state          'running'
    numVcpus       1
    active         'true'
    maximumMemory  524288
    memory         524288
    cpuTime        42490000000
qpid: quit
Exiting...
# virsh list --all
 Id Name                 State
----------------------------------
  8 demo                 running
  9 rhel6                running
  - winxp                shut off
 
  
Actual results:
The other domains (rhel6 and winxp) info are not displayed in "list domain" output.

Expected results:
All defined domain should be displayed in output.

Additional info:
Comment 2 Ian Main 2010-05-27 12:12:08 EDT
Did you give it a bit to settle?  IIRC qpid-tool is a bit slow to pick up new objects..
Comment 3 Ian Main 2010-05-27 14:32:38 EDT
I think qpid-tool only queries for, and updates new objects every 30 or 60 seconds.
Comment 4 Johnny Liu 2010-05-27 22:35:06 EDT
I even waited for about 5 minutes, still only one domain object is seen.
Comment 5 Ian Main 2010-05-28 00:15:06 EDT
Thanks, I will give this a try tomorrow.
Comment 6 Ian Main 2010-06-02 13:00:54 EDT
I reproduced this on mantis.virt.bos.redhat.com and it's running now.

There are 3 domains defined and qpid-tool only shows one of them as per the bug.  However, libvirt-qpid seems to think it's doing a fine job of making the objects:

[root@mantis ~]# libvirt-qpid
Creating new domain object for mp-testbed03
Created new domain: mp-testbed03, ptr is 0x24f36b0
Creating new domain object for mp-testbed02
Created new domain: mp-testbed02, ptr is 0x24f3d50
Creating new domain object for mp-testbed01
Created new domain: mp-testbed01, ptr is 0x24f4250
verifying domain mp-testbed03
verifying domain mp-testbed02
verifying domain mp-testbed01

eg:

    domain = new _qmf::Domain(agent, this, parent, domain_uuid, domain_name);
    printf("Creating new domain object for %s\n", domain_name.c_str());
    agent->addObject(domain);


And even stranger is that libvirt-list doesn't show any domains at all, nor nodes or anything else related to libvirt-qpid.  It will show qpid objects however if edited/changed.  I've attached libvirt-list.rb.
Comment 7 Ian Main 2010-06-02 13:43:58 EDT
OK, turns out the use of index="y" is now used correctly but I was indexing on the wrong thing making only 1 object show up.

The ruby console has another bug however:  https://bugzilla.redhat.com/show_bug.cgi?id=599116

Fix pending for this bug.
Comment 8 Ian Main 2010-06-02 15:34:41 EDT
Fixed with latest build - libvirt-qpid-0.2.21-1.el6:

https://brewweb.devel.redhat.com/taskinfo?taskID=2488621
Comment 9 Johnny Liu 2010-06-11 06:18:27 EDT
Re-test this bug with libvirt-qpid-0.2.21-1.el6, looks like the bug still reproduce on my side.

# virsh list --all
 Id Name                 State
----------------------------------
  - demo                 shut off
  - rhel5u5              shut off
  - rhel6                shut off
  - win2003-32           shut off
  - win2003-32-bad       shut off
  - win2003-32-install   shut off

qpid: list
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  system        1       0
    com.redhat.libvirt      volume        1       0
    org.apache.qpid.broker  connection    2       0
    com.redhat.libvirt      pool          1       0
    org.apache.qpid.broker  broker        1       0
    org.apache.qpid.broker  queue         4       0
    org.apache.qpid.broker  binding       14      0
    org.apache.qpid.broker  session       2       0
    com.redhat.libvirt      domain        1       0
    org.apache.qpid.broker  vhost         1       0
    com.redhat.libvirt      node          1       0
    org.apache.qpid.broker  subscription  4       0
qpid: list domain
Object Summary:
    ID   Created   Destroyed  Index
    ======================================================
    101  00:00:00  -          com.redhat.libvirt:domain:
qpid: show 101
Object of type: com.redhat.libvirt:domain(ae99a2d6-bf17-063c-1125-789dbf093484)
    Attribute      101
    ===================================================================================================
    uuid           '6bd72aef-3661-8400-ab2c-c15c935cdd85'
    name           'demo'
    id             -1
    node           0-1-1-vendor:product:bb433e2c-5111-4121-9f35-7bb6ea55a47a-com.redhat.libvirt:node:
    state          'shutoff'
    numVcpus       1
    active         'false'
    maximumMemory  524288
    memory         524288
    cpuTime        0

From the above output, I defined 6 domains, but only one domain is shown in qpid list.

I even waited for about 5 minutes, still only one domain object is seen


libvirt-debuginfo-0.8.1-7.el6.x86_64
libvirt-client-0.8.1-8.el6.x86_64
libvirt-python-0.8.1-8.el6.x86_64
libvirt-0.8.1-8.el6.x86_64
libvirt-qpid-0.2.21-1.el6.x86_64
qpid-tools-0.7.946106-3.el6.noarch
qpid-cpp-server-0.7.946106-2.el6.x86_64
qpid-cpp-server-xml-0.7.946106-2.el6.x86_64
python-qpid-0.7.946106-1.el6.noarch
qpid-cpp-client-0.7.946106-2.el6.x86_64
Comment 10 Ian Main 2010-06-11 13:13:39 EDT
Did you restart libvirt-qpid after updating it?  Maybe that is not properly configured in the package..

Also could you do the following (this is in an interactive python session):

$ python
>>> from qmf.console import Session
>>> s = Session()
>>> b = s.addBroker()
>>> agents = s.getAgents()
>>> agents
[Agent(v2) at bank 1.0 (BrokerAgent), Agent(v2) at bank 1.vendor:product:4a0d8591-53f8-44a6-ac63-79922f653468 (QMFv2 Agent)]
>>> for a in agents:
...   print a
...
Agent(v2) at bank 1.0 (BrokerAgent)
Agent(v2) at bank 1.vendor:product:4a0d8591-53f8-44a6-ac63-79922f653468 (QMFv2 Agent)
>>> lv = agents[1]
>>> lv
Agent(v2) at bank 1.vendor:product:4a0d8591-53f8-44a6-ac63-79922f653468 (QMFv2 Agent)
>>> dlist = lv.getObjects(_class="domain")
>>> dlist
[com.redhat.libvirt:domain[0-1-1-vendor:product:4a0d8591-53f8-44a6-ac63-79922f653468-com.redhat.libvirt:domain:com.redhat.libvirt:node:] com.redhat.libvirt:domain:com.redhat.libvirt:node:]
>>> len(dlist)
1
>>> dlist[0].getIndex()
'com.redhat.libvirt:domain:com.redhat.libvirt:node:'



You should actually get different results for the last getIndex() call.  The bug is that the domains were all being assigned the same 'index' so they all had the same key.
Comment 11 Johnny Liu 2010-06-11 22:07:23 EDT
I did restart libvirt-qpid after updating it.

# python
Python 2.6.2 (r262:71600, Apr 29 2010, 18:01:50) 
[GCC 4.4.3 20100427 (Red Hat 4.4.3-19)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from qmf.console import Session
>>> s = Session()
>>> b = s.addBroker()
>>> agents = s.getAgents()
>>> agents
[Agent(v2) at bank 1.0 (BrokerAgent), Agent(v2) at bank 1.vendor:product:bb433e2c-5111-4121-9f35-7bb6ea55a47a (QMFv2 Agent)]
>>> for a in agents:
...    print a
... 
Agent(v2) at bank 1.0 (BrokerAgent)
Agent(v2) at bank 1.vendor:product:bb433e2c-5111-4121-9f35-7bb6ea55a47a (QMFv2 Agent)
>>> lv = agents[1]
>>> lv
Agent(v2) at bank 1.vendor:product:bb433e2c-5111-4121-9f35-7bb6ea55a47a (QMFv2 Agent)
>>> dlist = lv.getObjects(_class="domain")
>>>  dlist
  File "<stdin>", line 1
    dlist
    ^
IndentationError: unexpected indent
>>> dlist
[com.redhat.libvirt:domain[0-1-1-vendor:product:bb433e2c-5111-4121-9f35-7bb6ea55a47a-com.redhat.libvirt:domain:] com.redhat.libvirt:domain:]
>>> len(dlist)
1
>>> dlist[0].getIndex()
'com.redhat.libvirt:domain:'
>>>
Comment 12 Johnny Liu 2010-06-24 09:07:52 EDT
Today I installed a refresh os - ()
Even nothing about libvirt info is listed:

# virsh list --all
 Id Name                 State
----------------------------------
  2 winxp-virtio         running


# qpid-tool 
Summary of Objects by Type:
    Package                 Class         Active  Deleted
    =======================================================
    org.apache.qpid.broker  session       1       0
    org.apache.qpid.broker  system        1       0
    org.apache.qpid.broker  subscription  5       0
    org.apache.qpid.broker  connection    1       1
    org.apache.qpid.broker  vhost         1       0
    org.apache.qpid.broker  exchange      8       0
    org.apache.qpid.broker  binding       12      0
    org.apache.qpid.broker  queue         5       0
    org.apache.qpid.broker  broker        1       0



There is no any info about libvirt, such as: domain, vol, pool, and so on.



libvirt-python-0.8.1-10.el6.x86_64
libvirt-0.8.1-10.el6.x86_64
libvirt-client-0.8.1-10.el6.x86_64
python-qpid-0.7.946106-2.el6.noarch
libvirt-qpid-0.2.21-2.el6.x86_64
qpid-cpp-server-0.7.946106-3.el6.x86_64
qpid-cpp-client-0.7.946106-3.el6.x86_64
qpid-tools-0.7.946106-3.el6.noarch
Comment 13 Ian Main 2010-06-28 16:33:50 EDT
I just tried this out.. the new qpid sets 'auth=yes' in /etc/qpidd.conf by default now which means you must authenticate libvirt-qpid in order for it to connect to qpidd.  The easiest way around this is to set 'auth=no' in qpidd.conf and test again.

Also I somehow botched the last build and it didn't seem to have the right upstream sources.  I just built a new one and tested it.  It works fine.

https://brewweb.devel.redhat.com/taskinfo?taskID=2556588

libvirt-qpid-0.2.21-3
Comment 14 dyuan 2010-07-02 01:43:58 EDT
Test with libvirt-qpid-0.2.21-3, set 'auth=no' in qpidd.conf, it works fine.

Is the behaviour(set 'auth' manually) working as designed or a workaround for this issue ?
Comment 15 Ian Main 2010-07-05 15:49:19 EDT
It is by design.  It's just easier than setting up kerberos or a password database etc.
Comment 16 dyuan 2010-07-06 21:45:40 EDT
According to comment 14 and comment 15, verified PASSED with libvirt-qpid-0.2.21-3.
Comment 17 Ian Main 2010-07-19 13:20:08 EDT
*** Bug 601551 has been marked as a duplicate of this bug. ***
Comment 18 Ian Main 2010-07-20 15:30:11 EDT
*** Bug 616466 has been marked as a duplicate of this bug. ***
Comment 19 releng-rhel@redhat.com 2010-11-10 16:05:58 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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