Bug 460464 - xml-rpc call packages.listChannelSourceBySession doesn't parse nvr correctly
xml-rpc call packages.listChannelSourceBySession doesn't parse nvr correctly
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
510
All Linux
medium Severity high
: ---
: ---
Assigned To: Pradeep Kilambi
Sayli Karmarkar
:
Depends On:
Blocks: 456985
  Show dependency treegraph
 
Reported: 2008-08-28 07:05 EDT by Daniel Mach
Modified: 2015-03-22 21:09 EDT (History)
4 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 16:27:46 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)
nvr split using RE (2.93 KB, patch)
2008-08-28 07:05 EDT, Daniel Mach
no flags Details | Diff
nvr split using rsplit (2.87 KB, patch)
2008-08-28 07:06 EDT, Daniel Mach
no flags Details | Diff
reproducer (329 bytes, text/x-python)
2008-10-08 14:10 EDT, Daniel Mach
no flags Details

  None (edit)
Description Daniel Mach 2008-08-28 07:05:32 EDT
Created attachment 315196 [details]
nvr split using RE

Description of problem:
when listing a channel srpms, I get:
['net', 'snmp', '5.1.2', '', 'rhel-i386-as-4']
instead of
['net-snmp', '5.1.2', '12.el4', '', 'rhel-i386-as-4']


Steps to Reproduce:
1. push a srpm with many dashes in it's name to a satellite
2. list sprms via packages.listChannelSourceBySession()


I made two patches doing the same thing:
 - first one uses RE to get n-v-r parts
 - the second one uses rsplit to get n-v-r

Patches were tested on RHEL-5/Python2.4.
Just choose the one which would work on all supported satellite versions...
Comment 1 Daniel Mach 2008-08-28 07:06:25 EDT
Created attachment 315197 [details]
nvr split using rsplit
Comment 2 Brandon Perkins 2008-10-08 12:30:20 EDT
While this may be a valid bug in Satellite for us to fix, it seems like you need this fixed in RHN Hosted.  Can you please confirm one of:

1) You want this fixed in RHN Hosted
2) You want this fixed in Satellite
3) You want this fixed in both RHN Hosted and Satellite

If 1, we'll be happy to realign it to them.  If 2, we'll triage it and see if we can get it into 530.  If 3, we'll clone the bug to Hosted so they can look at it while we look at it and maybe we can fix it in both.
Comment 3 Daniel Mach 2008-10-08 14:03:43 EDT
Originally, I found this bug on Satellite.
Now I tried to reproduce it on Hosted (webqa) and I also got invalid results:
['system', 'config', 'network', '', 'rhel-i386-as-4']
['net', 'snmp', '5.1.2', '', 'rhel-i386-as-4']

I think that we want 3).
Comment 4 Daniel Mach 2008-10-08 14:10:41 EDT
Created attachment 319775 [details]
reproducer

Push net-snmp or system-config-* rpm + srpm to the rhel-i386-as-4 channel.
Then setup and run this script.
Result should be lines with [name, version, release, epoch, channel] lists.
Comment 5 Brandon Perkins 2008-10-08 16:22:20 EDT
Accepting this bug for Satellite 530 and will now clone for RHN Hosted.  Ideally once we have the fix, Hosted can just *borrow* it from us.
Comment 6 Brandon Perkins 2008-10-08 16:24:34 EDT
Hosted Bug 466170 -  xml-rpc call packages.listChannelSourceBySession doesn't parse nvr correctly has been created.
Comment 8 Sayli Karmarkar 2009-06-11 20:06:57 EDT
Verified.
Create a channel foobar. Pushed 2 packages to channel "foobar".

#!/usr/bin/python                                                                                                                                                                                    
import xmlrpclib

ADDRESS = "rlx-0-22.rhndev.redhat.com"
USERNAME = "admin"
PASSWORD = "password"

rhn = xmlrpclib.Server("http://%s/APP" % ADDRESS)
session_id = rhn.packages.login(USERNAME, PASSWORD)
pkgs = rhn.packages.listChannelSourceBySession(["foobar"], session_id)
for i in pkgs:
    print i


>>> python list-channel-source.py
['nfs-utils-lib', '1.0.6', '10.el4', '', 'foobar']
['net-snmp', '5.1.2', '18.el4', '', 'foobar']
Comment 9 Sayli Karmarkar 2009-08-13 14:43:54 EDT
>>> python list-channel-source.py
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['yum-rhn-plugin', '0.4.3', '1.el5', '', 'sayli-rhel-test']
['system-config-lvm', '1.0.22', '1.0.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['tcsh', '6.14', '12.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['readahead', '1.3', '7.el5', '', 'sayli-rhel-test']
['aspell-de', '0.50', '11.2.2', '', 'sayli-rhel-test']
['linuxwacom', '0.7.4.3', '2.el5', '', 'sayli-rhel-test']
...

Moving to release_pending.
Comment 10 Brandon Perkins 2009-09-10 16:27:46 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.