Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1479900

Summary: apidoc for openscap results in a 404
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: SCAP PluginAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: low Docs Contact:
Priority: low    
Version: 6.3.0CC: bbuckingham, egolov, ehelms, mbacovsk, mhulan, nkathole, oprazak, tstrachota
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman_openscap 0.7.10-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 17:09:48 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:
Attachments:
Description Flags
screenshot none

Description Bryan Kearney 2017-08-09 17:17:25 UTC
While testing 6.3, Snap 10:

1) Navigate to https://$HOST/apidoc/v2
2) Search on any of Policies, Arf reports, Scap Content, Tailoring Files
3) For each main section, or sub command, click on any link. Each ends in a 404.

Relevant Versions
satellite-cli-6.3.0-16.0.beta.el7sat.noarch
satellite-installer-6.3.0.3-1.beta.el7sat.noarch
satellite-6.3.0-16.0.beta.el7sat.noarch
tfm-rubygem-foreman_theme_satellite-1.0.4-1.el7sat.noarch
tfm-rubygem-foreman_openscap-0.7.4-1.fm1_15.el7sat.noarch
tfm-rubygem-apipie-rails-0.4.0-2.el7sat.noarch
tfm-rubygem-apipie-bindings-0.2.0-1.el7sat.noarch
tfm-rubygem-apipie-params-0.0.5-1.el7sat.noarch

Comment 1 Marek Hulan 2017-08-10 14:28:37 UTC
as a workaround, generate the cache by running

> foreman-rake apipie:cache

after it finishes, pages are there.

I suppose this might be similar for other plugins and might not be trivial to be fixed. The task is run in installer after the db is seeded, but we run only rake apipie:cache:index, I'm not sure whether it's the cause. Tomas do you happen to know? I suppose apipie:cache:index is used to make the installer run faster.

Comment 2 Tomas Strachota 2017-08-11 06:44:55 UTC
If I recall it correctly plugins are supposed to provide their own part of the cache and apipie:cache:index glues the information together:
https://github.com/theforeman/foreman/blob/develop/lib/tasks/apipie.rake#L12-L16

I'm not sure where the plugin cache is generated. I guess that Martin will know.

Comment 3 Marek Hulan 2017-09-25 12:06:55 UTC

*** This bug has been marked as a duplicate of bug 1490070 ***

Comment 4 Marek Hulan 2017-09-25 12:09:43 UTC

*** This bug has been marked as a duplicate of bug 1480563 ***

Comment 5 Martin Bacovsky 2017-10-15 21:06:22 UTC
The scap plugin needs to prebuild the cache during a build time. This will be fixed by adding '-a' switch to the foreman_precompile_plugin macro [1].

I'm reopening the bug as though the consequences are same as in the virt-who plugin each of the plugins will require its own fix.

[1]  https://github.com/theforeman/foreman-packaging/blob/rpm/develop/rubygem-foreman_openscap/rubygem-foreman_openscap.spec#L77

Comment 6 Ondřej Pražák 2017-10-18 11:14:54 UTC
Connecting redmine issue http://projects.theforeman.org/issues/21377 from this bug

Comment 9 Nikhil Kathole 2017-12-04 06:49:55 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 27

Found api documentation for policy, scap-content, tailoring-file and arf-report.

Comment 10 Nikhil Kathole 2017-12-04 06:50:22 UTC
Created attachment 1362533 [details]
screenshot

Comment 11 Bryan Kearney 2018-02-21 16:44:00 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/RHSA-2018:0336

Comment 12 Bryan Kearney 2018-02-21 17:09:48 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/RHSA-2018:0336