Bug 1368760 - Unable to update policy when associated hostgroup is deleted
Summary: Unable to update policy when associated hostgroup is deleted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.2.0
Hardware: x86_64
OS: All
medium
high vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-21 07:48 UTC by Ranjan Kumar
Modified: 2019-09-26 14:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16210 0 Normal Closed Unable to update policy when associated hostgroup is deleted 2020-11-16 12:51:55 UTC

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


Note You need to log in before you can comment on or make changes to this bug.