Bug 496003 - isNvreInstalled api without epoch is not returning correct result
isNvreInstalled api without epoch is not returning correct result
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2009-04-15 18:05 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:09 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:55:24 EDT
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 Sayli Karmarkar 2009-04-15 18:05:51 EDT
Description of problem:

>>> server.system.isNvreInstalled(key, 1000010460, "tar", "1.15.1", "23.0.1.el5")
0
>>> server.system.isNvreInstalled(key, 1000010460, "tar", "1.15.1", "23.0.1.el5", "2")
1

So, basically when I provide epoch as well, then it succeeds, but only NVR returns 0.  
  
Expected results:
It should return 1(success) in the first case also.
Comment 1 Brad Buckingham 2009-04-16 17:51:16 EDT
master git commit: e06bd36b4a119720a0b48f38e5301b157019bd17
vader git commit: 9160e27e46c0f0a1ee9409f6b1f04a10637eb8d8

>>> client.system.isNvreInstalled(key,1000013430, "tar", "1.15.1", "23.0.1.el5")
1
>>> client.system.isNvreInstalled(key,1000013430, "tar", "1.15.1", "23.0.1.el5", "2")
1
Comment 2 Brad Buckingham 2009-04-27 08:26:58 EDT
mass move to ON_QA
Comment 3 Sayli Karmarkar 2009-04-28 17:44:07 EDT
verified.
Comment 4 John Sefler 2009-08-27 16:54:53 EDT
Verified on staged (Satellite-5.3.0-RHEL5-re20090724.0) with updates from Aug 20, 2009

Created and ran the following python script against a satellite with a system that had package:
tar-1.15.1-23.0.1.el5:2

[jsefler@jsefler api]$ cat system_isNvreInstalled.py 
#!/usr/bin/env python
import xmlrpclib

u = 'admin'
p = 'redhat'
url = 'http://sun-x4200-01.rhts.bos.redhat.com/rpc/api'
server = xmlrpclib.Server(url,verbose=0)
sid = 1000010233

try:
 ses = server.auth.login(u,p)
 print "result=%d" % (server.system.isNvreInstalled(ses,sid,"tar","1.15.1","23.0.1.el4"))
 print "result=%d" % (server.system.isNvreInstalled(ses,sid,"tar","1.15.1","23.0.1.el5"))
 print "result=%d" % (server.system.isNvreInstalled(ses,sid,"tar","1.15.1","23.0.1.el5", "1"))
 print "result=%d" % (server.system.isNvreInstalled(ses,sid,"tar","1.15.1","23.0.1.el5", "2"))
except(xmlrpclib.Fault), f:
 print "ERROR: an Error was encountered!\n", f
 exit(-1)

[jsefler@jsefler api]$ ./system_isNvreInstalled.py 
result=0
result=1
result=0
result=1

moving to RELEASE_PENDING
Comment 5 Brandon Perkins 2009-09-10 15:55:24 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/RHEA-2009-1434.html

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