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 1753313 - "undefined method `policies' for nil:NilClass" when assigning a policy
Summary: "undefined method `policies' for nil:NilClass" when assigning a policy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: Ondřej Pražák
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-18 14:57 UTC by Lukáš Hellebrandt
Modified: 2023-12-15 16:46 UTC (History)
12 users (show)

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


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


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27959 0 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 0 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:
Unknown

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]
screenshot.png

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

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

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

Steps:
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.

https://access.redhat.com/errata/RHSA-2020:1454

Comment 18 Oleh Fedorenko 2023-09-04 14:19:35 UTC
*** Bug 1819823 has been marked as a duplicate of this bug. ***


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