Bug 1753313 - "undefined method `policies' for nil:NilClass" when assigning a policy
Summary: "undefined method `policies' for nil:NilClass" when assigning a policy
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: 6.7.0
Assignee: Ondřej Pražák
QA Contact: Sanket Jagtap
Depends On:
TreeView+ depends on / blocked
Reported: 2019-09-18 14:57 UTC by Lukáš Hellebrandt
Modified: 2020-06-23 18:36 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-14 13:25:37 UTC
Target Upstream Version:

Attachments (Terms of Use)
screenshot.png (27.99 KB, image/png)
2019-09-26 09:49 UTC, Lukáš Hellebrandt
no flags Details

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 27959 Normal Closed "undefined method `policies' for nil:NilClass" when assigning a policy 2020-10-15 06:24:55 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:25:49 UTC

Description Lukáš Hellebrandt 2019-09-18 14:57:15 UTC
Description of problem:
I don't know how I got to this state but when I try to assign a policy to some host, it fails with error "undefined method `policies' for nil:NilClass".

Version-Release number of selected component (if applicable):
Reproduced on Sat 6.6 snap 20

How reproducible:

Steps to Reproduce:
1. ???
2. Hosts -> All Hosts
3. Select host
4. Select Action -> Assign Compliance Policy

Actual results:
undefined method `policies' for nil:NilClass

Expected results:
Compliance policy assigned

Comment 3 Lukáš Hellebrandt 2019-09-18 14:59:17 UTC
No traceback in production.log

Comment 4 Lukáš Hellebrandt 2019-09-19 09:35:05 UTC
It is bound to one certain policy. Operations involving it fail, e.g. assigning it to a host or changing the policy's hostgroup. Creating a new policy and using it instead, everything works.

Comment 9 Lukáš Hellebrandt 2019-09-26 09:49:28 UTC
Created attachment 1619440 [details]

Comment 10 Ondřej Pražák 2019-09-30 08:38:29 UTC
Created redmine issue https://projects.theforeman.org/issues/27959 from this bug

Comment 11 Bryan Kearney 2019-09-30 14:04:02 UTC
Upstream bug assigned to oprazak@redhat.com

Comment 12 Bryan Kearney 2019-09-30 14:04:04 UTC
Upstream bug assigned to oprazak@redhat.com

Comment 13 Bryan Kearney 2019-10-01 12:04:07 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27959 has been resolved.

Comment 14 Sanket Jagtap 2020-01-02 07:25:56 UTC
Build:Satellite 6.7 snap7

1. Create a host with policy 
2. Generate arf reports for that policy and host
3. Delete the host
4. Assign the same policy to another host. 

The policy assignment was successful and no errors were observed

Comment 17 errata-xmlrpc 2020-04-14 13:25:37 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.


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