Bug 1781340 - Cleaning orphaned facts fails with undefined method map
Summary: Cleaning orphaned facts fails with undefined method map
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Fact
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: Lukas Zapletal
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-09 19:59 UTC by wclark
Modified: 2020-04-14 13:28 UTC (History)
7 users (show)

Fixed In Version: foreman-1.24.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1791498 (view as bug list)
Environment:
Last Closed: 2020-04-14 13:27:49 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 28295 Normal Closed Cleaning orphaned facts fails with undefined method map 2020-11-12 09:31:19 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:28:03 UTC

Description wclark 2019-12-09 19:59:03 UTC
In some cases, select! returns nil.

Starting orphaned facts clean up
rake aborted!
NoMethodError: undefined method `map' for nil:NilClass
/usr/share/foreman/app/services/fact_cleaner.rb:54:in `block in delete_excluded_facts'

Comment 5 wclark 2019-12-09 23:10:24 UTC
Hotfix RPM is available for Satellite 6.5.3. This hotfix contains the fix for this BZ, as well as for BZ 1773133:

To obtain the hotfix:

1. Open a support ticket to obtain the RPM, since the hotfix RPM is too large to be provided as a bugzilla attachment.

2. Take a complete snapshot or backup of your Satellite server.

3. Copy the hotfix RPM to your Satellite server

4. # rpm -Uvh --nodeps foreman-1.20.1.36-2.HOTFIXRHBZ1773133.el7sat.noarch.rpm 

No service restart should be necessary for the change to take effect, since facts cleanup is done via `foreman-rake facts:clean`

Comment 6 wclark 2019-12-09 23:11:48 UTC
There is a typo in the previous instructions, step #4 the release version is incorrect. It should be

4. # rpm -Uvh --nodeps foreman-1.20.1.36-3.HOTFIXRHBZ1773133.el7sat.noarch.rpm

Comment 7 Bryan Kearney 2019-12-10 01:00:56 UTC
Upstream bug assigned to lzap@redhat.com

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

Comment 11 Tomer Brisker 2019-12-24 13:45:29 UTC
Connecting redmine issue https://projects.theforeman.org/issues/28295 from this bug

Comment 12 wclark 2019-12-24 15:59:30 UTC
Hotfix RPM is available for Satellite 6.6.1 which fixes this BZ and BZ1773133:

To obtain the hotfix:

1. Open a support ticket to obtain the RPM, since the hotfix RPM is too large to be provided as a bugzilla attachment.

2. Take a complete snapshot or backup of your Satellite server.

3. Copy the hotfix RPM to your Satellite server

4. # rpm -Uvh --nodeps foreman-1.22.0.33-2.HOTFIXRHBZ1773133_1781340.el7sat.noarch.rpm 

No service restart should be necessary for the change to take effect, since facts cleanup is done via Rake.

!!!NOTE!!!: This hotfix can be installed on Satellite 6.6.0 as well but it will be necessary to downgrade it before updating to Satellite 6.6.1 or later:

To remove the hotfix from Satellite 6.6.0 before updating:

1. # satellite-maintain packages unlock

2. # yum downgrade foreman-1.22.0.32

3. # satellite-maintain packages lock

Comment 14 Radovan Drazny 2020-02-20 09:48:26 UTC
Tested together with BZ1773133.

Comment 17 errata-xmlrpc 2020-04-14 13:27:49 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


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