Bug 639134 - Satellite API call 'listSystemsWithPackage' disregards package architecture
Summary: Satellite API call 'listSystemsWithPackage' disregards package architecture
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Šimon Lukašík
URL:
Whiteboard:
Depends On:
Blocks: sat54-errata
TreeView+ depends on / blocked
 
Reported: 2010-09-30 21:50 UTC by Chris Williams
Modified: 2018-11-14 18:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause Wrong package identification Consequence system.listSystemsWithPackage API disregards package architecture and returns list of systems having installed packages of other arch then requested Result system.listSystemsWithPackage API returns only valid list of systems having a given package installed
Clone Of:
Environment:
Last Closed: 2011-03-17 14:12:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0362 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix and enhancement update 2011-03-17 14:10:26 UTC

Comment 1 Karl Abbott 2010-10-01 12:15:38 UTC
What is the nature and description of the request? 

A function in the satellite API is not behaving as expected. 
s
ystem.listSystemsWithPackage(key,package_id) 

This API call should only returns the systems with that canonical package_id
installed. The canonical package_id only has one architecture attached to it.
We are seeing behavior that indicates this API call is returning all available
arches for a package name and version combination that is referred to by the
package_id. 

What we are seeing: 
Make a call and get output similar to: 
workstation1 pid=76246 cups-1.3.7-18.el5_5.7.ia64 
workstation1 pid=76230 cups-1.3.7-18.el5_5.7.i386 
workstation1 pid=76201 cups-1.3.7-18.el5_5.7.x86_64 
workstation1 pid=76171 cups-1.3.7-18.el5_5.7.ppc 

Surely, this machine does not have all 4 of these packages installed. Instead,
this call should only return the id's of the packages actually installed on the
system. 

What we should see: 
workstation1 pid=76201 cups-1.3.7-18.el5_5.7.x86_64 

Why does the customer need this? (List the business requirements here) 

At this point, the customer has instituted a work around which has effectively
fixed their current situation. That said, they were trying to write a script
which would tell them which systems a certain package was installed on. 
If you read the documentation for the API call, the actual behavior is quite
different than what is described. 

How would the customer like to achieve this? (List the functional requirements
here) 
The customer is fine with their workaround, which is to build a dictionary of
systems names and then return the keys of the dictionary as the output of their
script. That said, they shouldn't have to build this dictionary to get the
appropriate output from the API call. 

For each functional requirement listed in question 4, specify how Red Hat and
the customer can test to confirm the requirement is successfully implemented. 

I'm sure this customer would be more than happy to rerun the original version
of their script which is attached to this ticket. 

Is there already an existing RFE upstream or in Red Hat bugzilla? Not based on
my search for the string "listSystemsWithPackage" 

How quickly does this need resolved? (desired target release) 

As the customer's work around has solved their case, there is not a sense of
urgency from the customer end. That said, our API should function as described. 

Does this request meet the RHEL Inclusion criteria (please review) 
To the best of my understanding, it does. 

List the affected packages 
Satellite API

Comment 2 Tomas Lestach 2010-10-04 16:00:50 UTC
This doesn't look like a new feature, but like a bug report (Removing RFE from the summary).

spacewalk.git: eb2b7e4a70634ffce8cbffcde62736101c14fe4e

Comment 10 Tomas Lestach 2011-02-14 14:17:03 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Wrong package identification

Consequence
system.listSystemsWithPackage API disregards package architecture and returns list of systems having installed packages of other arch then requested

Result
system.listSystemsWithPackage API returns only valid list of systems having a given package installed

Comment 11 Šimon Lukašík 2011-02-24 10:32:09 UTC
Taking QA contact.

Comment 13 Šimon Lukašík 2011-03-02 14:09:19 UTC
After discussion with Tomas I am flipping to ASSIGNED.

SQL query systems_with_package needs to be rewritten.

Comment 14 Tomas Lestach 2011-03-02 17:46:29 UTC
Yes, the query didn't consider the package architecture ...

spacewalk.git: 9a13e6c95577cb8f9f21e619bf87e32d59f45fbc
satellite.git: c90e58c42dd337a6a856ac34db3ec19f9da58f1f

Comment 16 Šimon Lukašík 2011-03-03 09:20:41 UTC
Changing to Verified.

Testing procedure:
Automated test.

Verified against:
spacewalk-java-1.2.39-38

Comment 17 errata-xmlrpc 2011-03-17 14:12:59 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-0362.html


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