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

Bug 452476

Summary: Traceback during sync, when errata has no description.
Product: Red Hat Satellite 5 Reporter: Miroslav Suchý <msuchy>
Component: ServerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Sayli Karmarkar <skarmark>
Severity: low Docs Contact:
Priority: low    
Version: 520CC: akarlsso, bperkins, cperry, hoffmann, jbrownin, jplans, mkearey, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 20:26:07 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:    
Bug Blocks: 456985, 473378, 474082    

Description Miroslav Suchý 2008-06-23 09:20:02 UTC
Description of problem:
From rhn-satellite:
Hi again and once again, thanks for the tips.

I have been experimenting with the script, and find that for our Lab Satellite
here we get the following traceback for certain channels:


Channel: Red Hat Desktop (v. 3 for x86) Label: rhel-i386-desktop-3
Traceback (most recent call last):
  File "repomd-precache.py", line 28, in ?
    repo.get_repomd_file()
  File "/usr/share/rhn/server/repomd/repository.py", line 326, in get_repomd_file
    self.repository.get_updateinfo_xml_file(),
  File "/usr/share/rhn/server/repomd/repository.py", line 106, in
get_updateinfo_xml_file
    viewobj.write_updateinfo()
  File "/usr/share/rhn/server/repomd/view.py", line 305, in write_updateinfo
    self.fileobj.write('\n'.join(self._get_erratum(erratum)))
  File "/usr/share/rhn/server/repomd/view.py", line 289, in _get_erratum
    output.append("    <description>%s</description>"
TypeError: cannot concatenate 'str' and 'NoneType' objects 

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

How reproducible:
the bug is obvious

Steps to Reproduce:
1. sync some channel with errate which has some synopsis and empty description
(or reverse: some description and none synopsis)
2. regenerate repomd cache either by requesting data from it by client or
regenerate using rhnChannel.channel_info API call.
  
Actual results:
Traceback

Expected results:
Works as charm.

Comment 1 Miroslav Suchý 2008-06-23 09:24:37 UTC
Fixed in trunk rev. 174335

Comment 2 Brandon Perkins 2008-07-30 02:59:57 UTC
Removing Bug 452476 depends on bug 452675.

Comment 5 Miroslav Suchý 2009-04-20 07:54:34 UTC
For Sayli:
Yes, you will need some RH channel with null description. It will be hard to get some. Since on hosted none with null description exist. So you will either create one yourself (dunno how) or you will find some old channel dump and import that.
Errata with null description was - for example - the 0day errata we used for release of Proxy 5.2. 
But again, you have to get it from some old dump. Current errata on hosted is fixed.

Comment 6 Sayli Karmarkar 2009-04-27 21:15:52 UTC
Verified. Synced rhel-i386-desktop-3 from old channel dumps and requested data from it by client. No traceback generated.

Comment 7 Brandon Perkins 2009-09-10 20:26:07 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/RHEA-2009-1434.html