Bug 1334035
Summary: | Unable to delete SCAP reports or delete a HOST if it has SCAP reports present | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Will D <will_darton> |
Component: | SCAP Plugin | Assignee: | Ondřej Pražák <oprazak> |
Status: | CLOSED ERRATA | QA Contact: | Sanket Jagtap <sjagtap> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.2.0 | CC: | bbuckingham, cwelton, dnagarat, ohadlevy, sjagtap |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
URL: | http://projects.theforeman.org/issues/15365 | ||
Whiteboard: | |||
Fixed In Version: | rubygem-foreman_openscap-0.5.3.14-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 11:15:19 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: |
Description
Will D
2016-05-07 11:50:04 UTC
It seems that reports are not properly associated with a capsule that uploaded them. It can be easily verified: 1) foreman-rake console 2) ForemanOpenscap::ArfReport.find(<report number>).openscap_proxy I expect the result to be nil I'll get the fix ready, there should be a simple workaround in the meantime. In the console: reports_without_proxy = ForemanOpenscap::ArfReport.where(:openscap_proxy => nil) proxy = SmartProxy.with_features("Openscap").first reports_without_proxy.each do |report| report.openscap_proxy = proxy report.save! end Confirmed the workaround worked great. Am able to delete reports that did not have a capsule properly assigned to them. Thanks! Created redmine issue http://projects.theforeman.org/issues/15365 from this bug Moving to POST since upstream bug http://projects.theforeman.org/issues/15365 has been closed Build:Satellite 6.2 snap 18.1 Can delete the Scap reports and the hosts successfully Also , from comment 2 reports are asscociated with proxy foreman-rake console ForemanOpenscap::ArfReport.find(/usr/share/foreman/lib/tasks/console.rake:4: warning: already initialized constant ARGV Loading production environment (Rails 4.1.5) irb(main):001:0> ForemanOpenscap::ArfReport.find(2181).openscap_proxy => #<SmartProxy id: 1, name: "xyz.redhat.com", url: "https://satellite.redhat.com...", created_at: "2016-07-01 18:00:26", updated_at: "2016-07-01 18:00:26", expired_logs: "0", pubkey: "ssh-rsa AAAAxxxxxxxxxxxxxxxxxxxxxxx..."> 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/RHBA-2016:1501 |