Bug 639134 - Satellite API call 'listSystemsWithPackage' disregards package architecture
Satellite API call 'listSystemsWithPackage' disregards package architecture
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Lestach
Šimon Lukašík
:
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2010-09-30 17:50 EDT by Chris Williams
Modified: 2011-03-17 10:12 EDT (History)
4 users (show)

See Also:
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
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-17 10:12:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Comment 1 Karl Abbott 2010-10-01 08:15:38 EDT
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 12:00:50 EDT
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 09:17:03 EST
    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 05:32:09 EST
Taking QA contact.
Comment 13 Šimon Lukašík 2011-03-02 09:09:19 EST
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 12:46:29 EST
Yes, the query didn't consider the package architecture ...

spacewalk.git: 9a13e6c95577cb8f9f21e619bf87e32d59f45fbc
satellite.git: c90e58c42dd337a6a856ac34db3ec19f9da58f1f
Comment 16 Šimon Lukašík 2011-03-03 04:20:41 EST
Changing to Verified.

Testing procedure:
Automated test.

Verified against:
spacewalk-java-1.2.39-38
Comment 17 errata-xmlrpc 2011-03-17 10:12:59 EDT
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.