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 1368760

Summary: Unable to update policy when associated hostgroup is deleted
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2.0CC: bkearney, ehelms, jcallaha, jjansky, kbidarka, vmeghana
Target Milestone: UnspecifiedKeywords: Patch, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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 Ranjan Kumar 2016-08-21 07:48:50 UTC
Description of problem:Unable to update policy when associated hostgroup is deleted


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


Steps to Reproduce:
1. Goto Host -> Policies. 
2. Create policy and associate hostgroup. 
3. Go to configure -> hostgroup. and delete associated hostgroup.
3. Now try to edit created policy. it throws error "Policy not found Please try to update your request" 

Expected results: It should not raise error while updating policy

Comment 1 Bryan Kearney 2016-08-23 08:17:47 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/16210 has been closed

Comment 2 Kedar Bidarkar 2017-09-04 15:46:57 UTC
We are now able to update the policy successfully when hostgroup added to policy is deleted.

2017-09-04 11:43:24 b68f65f6 [app] [I] Started PATCH "/compliance/policies/1" for 10.67.116.57 at 2017-09-04 11:43:24 -0400
2017-09-04 11:43:24 b68f65f6 [app] [I] Processing by PoliciesController#update as HTML
2017-09-04 11:43:24 b68f65f6 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"mgKYllMsY7c2saKvnCoKtnDVAfyIANzOVBsa8o0oXy41CmM3hm1w3GaPi7xOqIUVqDXueUGqYHxTqDDiBwlxzw==", "policy"=>{"name"=>"rhel7grp_policy", "description"=>"", "scap_content_id"=>"4", "scap_content_profile_id"=>"24", "tailoring_file_id"=>"", "period"=>"weekly", "weekday"=>"tuesday", "day_of_month"=>"1", "cron_line"=>"", "location_ids"=>["2", ""], "organization_ids"=>["1", ""], "hostgroup_ids"=>["", "3"]}, "commit"=>"Submit", "id"=>"1"}
2017-09-04 11:43:24 b68f65f6 [app] [I] Current user: admin (administrator)
2017-09-04 11:43:25 b68f65f6 [app] [I] Redirected to https://qe-sat6.domain.redhat.com/compliance/policies
2017-09-04 11:43:25 b68f65f6 [app] [I] Completed 302 Found in 179ms (ActiveRecord: 26.3ms)

VERIFIED with sat630-snap14.0

Comment 3 Satellite Program 2018-02-21 16:51:07 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 4 Oleh Fedorenko 2023-09-04 15:42:05 UTC
*** Bug 1728157 has been marked as a duplicate of this bug. ***