Bug 1232194

Summary: "foreman-rake db:seed" run fails for openscap with no default scap content for satellite6
Product: Red Hat Satellite Reporter: Kedar Bidarkar <kbidarka>
Component: OtherAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 6.1.0CC: bbuckingham, mmccune, slukasik, szadok
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 16:04:12 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:    
Bug Blocks: 1196240, 1230086    

Description Kedar Bidarkar 2015-06-16 09:23:55 UTC
Description of problem:

"foreman-rake db:seed" run fails for openscap


 ~]# foreman-rake db:seed
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-config_templates.rb
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb
Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb
Seeding /usr/share/foreman/db/seeds.d/16-mail_notifications.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12.8/db/seeds.d/20-foreman_tasks_permissions.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-4.0.2.13/db/seeds.d/50-bootdisk_templates.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-2.0.0.15/db/seeds.d/60_discovery_proxy_feature.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.10/db/seeds.d/openscap_feature.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.10/db/seeds.d/openscap_scap_default.rb
## SCAP content is invalid: Invalid SCAP Source Datastream (1.2) content in NONEXISTENT. [oscap_source.c:205]
NONEXISTENT:8755: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:11334: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:11340: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:11346: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:40256: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42835: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42841: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42847: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
 ##
All seed files executed



Version-Release number of selected component (if applicable):
sat61-GA-snap8-c2

 ~]# rpm -qav | grep -i openscap
rubygem-smart_proxy_openscap-0.3.0.9-1.el6_6sat.noarch
ruby193-rubygem-foreman_openscap-0.3.2.10-1.el6_6sat.noarch
openscap-1.2.3-3.el6_6sat.x86_64
ruby193-rubygem-openscap-0.4.2-2.el6_6sat.noarch
openscap-scanner-1.2.3-3.el6_6sat.x86_64
openscap-utils-1.2.3-3.el6_6sat.x86_64


How reproducible:


Steps to Reproduce:
1. yum install ruby193-rubygem-foreman_openscap
2. run "foreman-rake db:seed"
3.

Actual results:
"foreman-rake db:seed" run fails for openscap

 It looks like rhel6 scap-security-guide DS files are not supported by openscap version 1.2.3 

Expected results:
"foreman-rake db:seed" run should be successful.

Additional info:

Comment 2 Šimon Lukašík 2015-06-16 10:52:01 UTC
Weird. Why we are seeing same issue again?

It should have been fixed by bug 1220262.

Comment 3 Šimon Lukašík 2015-06-16 11:02:01 UTC
How we have get to the duplicate bug?

Analysis:
 * The fix for bug 1220262 has landed upstream after openscap 1.2.3 upstream release.
 * The bug 1220262 comment 7 contained important question that has not been answered.
 * The package openscap-1.2.3-1.1.el7sat (fix for bug 1220262) has not been based on upstream release (1.2.3). But some later commit.
 * The openscap-1.2.3-3.el6_6sat.x86_64 was again based on upstream release. (Not included the fix).

Comment 4 Šimon Lukašík 2015-06-16 11:02:52 UTC
Moving to post, fixed upstream.

Comment 6 Kedar Bidarkar 2015-06-16 11:57:19 UTC
This issue is now also seen on RHEL7.

rhel71 ~]# foreman-rake db:seed
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-config_templates.rb
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb
Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb
Seeding /usr/share/foreman/db/seeds.d/16-mail_notifications.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12.8/db/seeds.d/20-foreman_tasks_permissions.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_bootdisk-4.0.2.13/db/seeds.d/50-bootdisk_templates.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-2.0.0.15/db/seeds.d/60_discovery_proxy_feature.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.10/db/seeds.d/openscap_feature.rb
Seeding /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.10/db/seeds.d/openscap_scap_default.rb
## SCAP content is invalid: Invalid SCAP Source Datastream (1.2) content in NONEXISTENT. [oscap_source.c:205]
NONEXISTENT:9896: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:9902: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:9908: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:11812: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42817: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42823: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:42829: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
NONEXISTENT:44733: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}filepath': This element is not expected. Expected is ( {http://oval.mitre.org/XMLSchema/oval-definitions-5#linux}epoch ).
 ##
Saved /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml as Red Hat rhel7 default content
All seed files executed

Comment 7 Mike McCune 2015-06-16 23:35:21 UTC
I'm going to temporarily roll back to openscap-1.2.3-1.1.el7sat until we can straighten this out.  This will get RHEL7 working.

What I think we want is either:

1) an upstream 1.2.4 release that includes all the fixes above rebuilt directly downstream

2) I keep openscap-1.2.3 and backport the patch:

https://github.com/OpenSCAP/openscap/pull/76

into openscap-1.2.3.X

Option (1) seems easier from a maint perspective for us but I don't know if we want to pull in all of the 1.2-maint code.

Thoughts?

Comment 10 Šimon Lukašík 2015-06-17 11:49:09 UTC
My proposal is:
 * 1.2.4 will be soon released
 * RHEL-7.2 will be released with 1.2.4-1 package
 * Satellite can pick up 1.2.4 release early next week to the composes
 * Satellite can package it as 1.2.4-0.1. So it gets updated with RHEL-7.2 bits once they are released. (that has certain maintenance benefits going forward, i.e. if 1.2.4-1.el7 gets certified it will include Satellite customers).

Comment 13 Kedar Bidarkar 2015-07-22 12:22:23 UTC
VERIFIED with sat6.1.1 SNAP13-c1 build.

For sat6.1 running on RHEL66, make note that only RHEL6 OSCAP content would get created automatically.

But adding RHEL7 ds-stream.xml file manually does work fine.

Comment 14 Bryan Kearney 2015-08-12 16:04:12 UTC
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.