Bug 1365913

Summary: Satellite5.6: support more than 13 chars for CVE names
Product: Red Hat Satellite 5 Reporter: Tomas Lestach <tlestach>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 560CC: cperry, ggainey, jdostal, jhutar, lhellebr, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: satellite-schema- Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-14 12:05:17 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:

Description Tomas Lestach 2016-08-10 13:27:43 UTC
Description of problem:
I see Satellite 5.6 still supports only 13 chars for CVE names.

[satellite] (SATELLITE-5.7)$ git diff SATELLITE-5.6 schema/spacewalk/common/tables/rhnCVE.sql
diff --git a/schema/spacewalk/common/tables/rhnCVE.sql b/schema/spacewalk/common/tables/rhnCVE.sql
index 1056841..8a87c30 100644
--- a/schema/spacewalk/common/tables/rhnCVE.sql
+++ b/schema/spacewalk/common/tables/rhnCVE.sql
@@ -19,7 +19,7 @@ CREATE TABLE rhnCVE
     id    NUMBER NOT NULL
               CONSTRAINT rhn_cve_id_pk PRIMARY KEY
               USING INDEX TABLESPACE [[2m_tbs]],
-    name  VARCHAR2(13) NOT NULL
+    name  VARCHAR2(20) NOT NULL

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

How reproducible:

Steps to Reproduce:
1. Create an erratum with CVE longer than 13 chars

Comment 1 Tomas Lestach 2016-08-10 13:30:45 UTC
So, looking at the upstream code, this has been achieved by at least following three commits ...

Moving to MODIFIED as the fix is available in upstream.

Comment 6 Lukáš Hellebrandt 2016-09-07 13:17:42 UTC
Verified with both satellite-schema- and the pre-erratum satellite-schema-

After consulting with jdobes and ggainey, it turns out this was never an issue - the problem was on Hosted. The fix in the last commit added is just formal.

Steps taken to verify:
* Sync erratum with CVE longer than 13 chars, check the whole CVE name is present in the Satellite.
* Migrate the satellite to Managed DB from Embedded DB, do the same check.
* Verify that the constant 13 in /etc/sysconfig/rhn/schema-upgrade/satellite-schema-{postgresql,oracle} is changed to 20.

Comment 8 errata-xmlrpc 2016-09-14 12:05:17 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.