Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 529243

Summary: QMF querying returns multiples of results.
Product: Red Hat Enterprise MRG Reporter: Ian Main <imain>
Component: qpid-qmfAssignee: Ted Ross <tross>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Sarenik <jsarenik>
Severity: urgent Docs Contact:
Priority: low    
Version: DevelopmentCC: cctrieloff, hbrock, imain, jsarenik
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-13 13:19:16 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: 599116, 609298    
Bug Blocks:    

Description Ian Main 2009-10-15 17:23:52 UTC
Description of problem:

Querying for objects in QMF results in spurious objects being returned.  For example this code:
 
      remote_pool = qmfc.object(:object_id => result.pool)
      obj_list = qmfc.objects(:object_id => result.pool)
      puts "obj list returned from object id of remote pool is #{obj_list}"
      obj_list.each do |obj|
        puts "obj entry: #{obj}"
        puts "obj entry id #{obj.object_id}"
      end

produces:

obj list returned from object id of remote pool is #<Qmf::ConsoleObject:0x7f24b95af840>#<Qmf::ConsoleObject:0x7f24b95ae710>
obj entry: #<Qmf::ConsoleObject:0x7f24b95af840>
obj entry id 0-1-1-21-4
obj entry: #<Qmf::ConsoleObject:0x7f24b95ae710>
obj entry id 0-1-1-22-4

In addition the "remote_pool" variable will be 'nil' because the object() method expects only a single return value.

We are seeing this with other query types as well which return doubles etc.

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

qmf-0.5.825492-1.fc11.x86_64

How reproducible:

very.

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


Expected results:


Additional info:

Comment 1 Ted Ross 2009-10-15 21:38:47 UTC
Fixed upstream at svn 825672.

Comment 2 Ian Main 2009-10-15 22:26:20 UTC
Seems to be working but haven't tested extensively yet as I'm hitting other bugs. I will file new BZs :).

Comment 3 Jan Sarenik 2010-05-25 12:28:08 UTC
Ian, excuse me, what language is the original code snippet
written in and how can I use it to verify this is already
working?

Comment 4 Ian Main 2010-05-25 17:25:13 UTC
This is in ruby.

Comment 6 Jan Sarenik 2010-05-28 14:12:46 UTC
Ian, but I am unable to make the code work.
No idea where 'result' comes from. Please
give me a hint.

Comment 7 Ian Main 2010-06-07 16:30:22 UTC
Well, right now the ruby bindings are very broken, see:

https://bugzilla.redhat.com/show_bug.cgi?id=599116

So you wouldn't be able to make it work at all anyway, but take a look at 599116 as there is a ruby script in there for querying libvirt-qpid which would work to prove this bug too.