Bug 1538096 - Security erratum severity is not being synced using synchronization tools
Summary: Security erratum severity is not being synced using synchronization tools
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiří Dostál
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-24 13:12 UTC by Jiří Dostál
Modified: 2018-05-15 21:47 UTC (History)
4 users (show)

Fixed In Version: spacewalk-backend-2.5.3-167-sat
Doc Type: Release Note
Doc Text:
Severity is a new column in DB and should be correctly synchronized using different synchronization tools. This BZ fulfills this requirement.
Clone Of:
Environment:
Last Closed: 2018-05-15 21:46:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:1565 0 None None None 2018-05-15 21:47:03 UTC

Description Jiří Dostál 2018-01-24 13:12:53 UTC
Description of problem:
When syncing repository using cdn-sync, spacewalk-repo-sync, sync from dump etc... 'severity' for security erratas is not synced.

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

How reproducible:
100%

Steps to Reproduce:
1. Sync a repository with security erratas containing 'severity' information
2. Check values in satellite DB

Actual results:
'Severity' empty

Expected results:
'Moderate', 'Low', 'Critical' or 'Important' severity

Comment 1 Jiří Dostál 2018-01-24 13:34:49 UTC
spacewalk 70f616ef728fc79f47bf005065f0609e32e905fb

Comment 2 Jiří Dostál 2018-01-25 09:15:26 UTC
one more f66b5d6d35baacbb8d7c4f22fb1fa9ec32115e507

Comment 6 Radovan Drazny 2018-04-13 11:32:43 UTC
Verified on spacewalk-backend-2.5.3-165. After re-syncing content (originally added before this fix) using the cdn-sync --force-all-errata, severity IDs were correctly added to the db:

$ echo "select id,advisory_name,advisory_type,severity_id from rhnerrata where advisory_type like 'Security Advisory' limit 20;" | spacewalk-sql --select-mode -
 id  | advisory_name  |   advisory_type   | severity_id 
-----+----------------+-------------------+-------------
  67 | RHSA-2015:0750 | Security Advisory |           2
 152 | RHSA-2014:0919 | Security Advisory |           0
 153 | RHSA-2015:0265 | Security Advisory |           0
 158 | RHSA-2017:2424 | Security Advisory |           0
 163 | RHSA-2015:0046 | Security Advisory |           0
 225 | RHSA-2014:1652 | Security Advisory |           1
 231 | RHSA-2014:1635 | Security Advisory |           0
 252 | RHSA-2017:1789 | Security Advisory |           0
 260 | RHSA-2017:0061 | Security Advisory |           1
 277 | RHSA-2015:1982 | Security Advisory |           0
 316 | RHSA-2017:0269 | Security Advisory |           0
 334 | RHSA-2014:1293 | Security Advisory |           0
 345 | RHSA-2016:2843 | Security Advisory |           0
 355 | RHSA-2015:0809 | Security Advisory |           1
 380 | RHSA-2016:0005 | Security Advisory |           2
 390 | RHSA-2015:2617 | Security Advisory |           2
 452 | RHSA-2014:2021 | Security Advisory |           1
 471 | RHSA-2016:0009 | Security Advisory |           2
 511 | RHSA-2014:1983 | Security Advisory |           1
 612 | RHSA-2017:0252 | Security Advisory |           2

When syncing the new content using the cdn-sync, severity IDs are present from the start. 

VERIFIED

Comment 7 Jiří Dostál 2018-05-09 08:39:38 UTC
Even though it's already in VERIFIED state, I'd like to include one more commit. 

We've found a case when repodata contains invalid values on severity - severity string 'None' - and reposync crashes on this value. 

Despite the fact, that the error is in input data, reposync should not crash and process string "None" as None.

spacewalk.git 8b4aebf45a8f100b7720ded81bd135fa78374095

Comment 9 Radovan Drazny 2018-05-09 13:29:04 UTC
Reproduced the issue with errata containig "None" in severity on spacewalk-backend-2.5.3-166. 

2018/05/09 10:30:33 -04:00 Command: ['/usr/bin/spacewalk-repo-sync', '-c', 'epel7channel', '--force-all-errata']
2018/05/09 10:30:33 -04:00 Sync of channel started.
2018/05/09 10:30:33 -04:00 
2018/05/09 10:30:33 -04:00   Processing repository with URL: http://download.fedoraproject.org/pub/epel/7/x86_64
2018/05/09 10:30:41 -04:00     Packages in repo:             12530
2018/05/09 10:31:10 -04:00     No new packages to sync.
2018/05/09 10:31:10 -04:00 
2018/05/09 10:31:10 -04:00   Importing comps file f2f5ddd4101a588a7c6eb60e20c45756b87e8123994fe1b3f0116a57ef74ce89-comps-Everything.x86_64.xml.gz.
2018/05/09 10:31:12 -04:00 
2018/05/09 10:31:12 -04:00   Errata in repo: 4247.
2018/05/09 10:32:50 -04:00     Syncing 4238 new errata to channel.
2018/05/09 10:32:53 -04:00 ERROR: Invalid severity: None
2018/05/09 10:32:53 -04:00 ERROR: Invalid severity: None
2018/05/09 10:32:55 -04:00 Sync of channel completed in 0:02:21

After update to spacewalk-backend-2.5.3-167:

2018/05/09 10:45:13 -04:00 Command: ['/usr/bin/spacewalk-repo-sync', '-c', 'epel7channel', '--force-all-errata']
2018/05/09 10:45:13 -04:00 Sync of channel started.
2018/05/09 10:45:13 -04:00
2018/05/09 10:45:13 -04:00   Processing repository with URL: http://download.fedoraproject.org/pub/epel/7/x86_64
2018/05/09 10:45:16 -04:00     Packages in repo:             12530
2018/05/09 10:45:55 -04:00     No new packages to sync.
2018/05/09 10:45:56 -04:00
2018/05/09 10:45:56 -04:00   Importing comps file f2f5ddd4101a588a7c6eb60e20c45756b87e8123994fe1b3f0116a57ef74ce89-comps-Everything.x86_64.xml.gz.
2018/05/09 10:46:00 -04:00
2018/05/09 10:46:00 -04:00   Errata in repo: 4247.
2018/05/09 10:47:37 -04:00     Syncing 4238 new errata to channel.
2018/05/09 10:48:17 -04:00 Sync of channel completed in 0:03:03.

No error, errata was synced successfully.

VERIFIED.

Comment 12 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


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