Bug 1552537

Summary: KeyError: 'severity' caught when exporting channel with rhn-satellite-exporter
Product: Red Hat Satellite 5 Reporter: Jiří Dostál <jdostal>
Component: ServerAssignee: Jiří Dostál <jdostal>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: jhutar, lhellebr, ogajduse, satqe-list, tkasparek, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-166 Doc Type: Release Note
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: 1550001 Environment:
Last Closed: 2018-05-15 21:46:38 UTC Type: Bug
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: 1550001    
Bug Blocks: 1450111    

Description Jiří Dostál 2018-03-07 10:03:46 UTC
+++ This bug was initially created as a clone of Bug #1550001 +++

Description of problem:
I was trying to verify that Spacewalk is able to export channel which contains info about errata severity to the dump using rhn-satellite-exporter. Dumps seem to be exported successfully. In the current situation, I don't see a reason to sync this dump back as there were some errors. I consider this as a blocker in the whole process of exporting and reimporting it back to the Spacewalk.

Version-Release number of selected component (if applicable):
spacewalk-admin-2.8.4-1.el6.noarch
spacewalk-backend-2.8.47-1.el6.noarch
spacewalk-schema-2.8.17-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1.sync the channels using cdn-sync: cdn-sync -c rhel-x86_64-server-7 -c rhn-tools-rhel-x86_64-server-7
2.export these two channels using rhn-satellite-exporter: rhn-satellite-exporter --verbose --dir=/tmp/satexport/ -c rhel-x86_64-server-7 -c rhn-tools-rhel-x86_64-server-7 --email

Actual results:
Exporting these channels result in traceback.

Expected results:
Export should exit without traceback.

Additional info:
I'm attaching two attachments:
output of: tree /tmp/satexport/
email sent by rhn-satellite-exporter.

--- Additional comment from Ondrej Gajdusek on 2018-02-28 10:34 CET ---



--- Additional comment from Jiří Dostál on 2018-03-01 09:41:35 CET ---

177cede178a600957e254945b20b94f68c0a1a88

Comment 4 Lukáš Hellebrandt 2018-04-11 13:28:23 UTC
Failed with spacewalk-java-2.5.14-118 , spacewalk-backend-2.5.3-165.

rhn-satellite exporter exports the errata with severity_id=0 (i.e., Critical) as if they had empty severity_id.

Comment 5 Jiří Dostál 2018-04-12 09:52:12 UTC
spacewalk c5166c10584fb5ff3797527f7147b27e775fc4fd

Comment 7 Lukáš Hellebrandt 2018-04-20 09:26:41 UTC
Verified with spacewalk-backend-2.5.3-166.

Followed the steps from OP. Then:

# mail
[Log without traceback]

# find /tmp/satexport/errata/ | wc -l
3004

On different Sat:

# satellite-sync -m satexport -c rhel-x86_64-server-7 -c rhn-tools-rhel-x86_64-server-7
[...]
# echo $?
0

... errata succesfully imported.

Furthermore, checked that severities of errata imported from the export file are indeed correct. Tested both with RH channels and custom channel.

Comment 10 errata-xmlrpc 2018-05-15 21:46:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1565