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 1994212 - Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
Summary: Failed at scanning for repository: undefined method `resolve_substitutions' f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.10.0
Hardware: x86_64
OS: All
high
medium
Target Milestone: 6.11.0
Assignee: Justin Sherrill
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-17 03:53 UTC by Ganesh Payelkar
Modified: 2024-12-20 20:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2030445 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:29:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33383 0 None None None 2021-08-31 16:50:39 UTC
Red Hat Knowledge Base (Solution) 6957306 0 None None None 2022-05-10 11:08:54 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:29:49 UTC

Description Ganesh Payelkar 2021-08-17 03:53:30 UTC
Description of problem:

Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass

Version-Release number of selected component (if applicable):
satellite-6.10.0-0.6.beta

How reproducible:
New installation of satellite 6.10 Beta

Steps to Reproduce:
1. Install satellite 6.10 Beta
2. Try to enable repos through WebUI 
3. Check the logs

Actual results:

2021-08-17T09:15:18 [I|bac|d0db5e92] Task {label: Actions::Katello::RepositorySet::ScanCdn, id: c2607c7e-488e-4448-990a-5917c117fa26, execution_plan_id: d6af3cd0-f4d7-4efa-b70b-1414b592c794} state changed: running 
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:19 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [E|app|d0db5e92] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-17T09:15:21 [I|bac|d0db5e92] Task {label: Actions::Katello::RepositorySet::ScanCdn, id: c2607c7e-488e-4448-990a-5917c117fa26, execution_plan_id: d6af3cd0-f4d7-4efa-b70b-1414b592c794} state changed: stopped  result: success


Expected results:


Additional info:


# hammer ping 
database:         
    Status:          ok
    Server Response: Duration: 0ms
candlepin:        
    Status:          ok
    Server Response: Duration: 32ms
candlepin_auth:   
    Status:          ok
    Server Response: Duration: 28ms
candlepin_events: 
    Status:          ok
    message:         20 Processed, 0 Failed
    Server Response: Duration: 0ms
katello_events:   
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 0ms
pulp3:            
    Status:          ok
    Server Response: Duration: 68ms
foreman_tasks:    
    Status:          ok
    Server Response: Duration: 3ms


# satellite-maintain service status -b
Running Status Services
================================================================================
Get status of applicable services: 

Displaying the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, rh-redis5-redis, pulpcore-worker, pulpcore-worker, pulpcore-worker, pulpcore-worker, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, puppetserver, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy, foreman-cockpit
\ displaying rh-redis5-redis                       [OK]                         
| displaying postgresql                            [OK]                         
| displaying pulpcore-api                          [OK]                         
| displaying pulpcore-content                      [OK]                         
| displaying rh-redis5-redis                       [OK]                         
| displaying pulpcore-worker             [OK]                         
| displaying pulpcore-worker             [OK]                         
| displaying pulpcore-worker             [OK]                         
| displaying pulpcore-worker             [OK]                         
| displaying tomcat                                [OK]                         
| displaying dynflow-sidekiq@orchestrator          [OK]                         
| displaying foreman                               [OK]                         
| displaying httpd                                 [OK]                         
| displaying puppetserver                          [OK]                         
| displaying dynflow-sidekiq@worker-1              [OK]                         
| displaying dynflow-sidekiq@worker-hosts-queue-1  [OK]                         
| displaying foreman-proxy                         [OK]                         
| displaying foreman-cockpit                       [OK]                         
| All services are running                                            [OK]      
--------------------------------------------------------------------------------

Comment 1 Brad Buckingham 2021-08-19 15:03:17 UTC
Is this for specific repositories?
Is this only for a particular manifest?
Do the repositories get enabled despite the error message?

Thanks!

Comment 2 Ashish Humbe 2021-08-19 16:36:36 UTC
This is not specific to any repository set, when we try to expand the repository set then we see the below messages in the logs.

2021-08-19T12:29:36 [I|app|09c02915] Started GET "/katello/api/v2/products/36/repository_sets/4117/available_repositories" for 10.74.9.96 at 2021-08-19 12:29:36 -0400
2021-08-19T12:29:36 [I|app|09c02915] Processing by Katello::Api::V2::RepositorySetsController#available_repositories as JSON
2021-08-19T12:29:36 [I|app|09c02915]   Parameters: {"api_version"=>"v2", "product_id"=>"36", "id"=>"4117"}
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass
2021-08-19T12:29:36 [E|app|16c8c4e0] Failed at scanning for repository: undefined method `resolve_substitutions' for nil:NilClass

Comment 5 Justin Sherrill 2021-08-31 16:48:13 UTC
I'm suggesting we move this off of 6.10 for these reasons:

1. Its easily reproducible on 6.8 and 6.9 (not a regression)
2. This only adds some errors to the logs, scanning the repository causes no issues
3. It only happens with certain content sets, such as 'rhel-7-server-extras-rpms'


Steps to reproduce:

1.  import a manifest
2.  go to the RH repos page, scan repos for the 'rhel-7-server-extras-rpms' content set
3.  Notice you see no errors, and see the repository as expected.  You can enable it with no issue
4.  Check /var/log/foreman/production.log for errors, notice the errors mentioned here.

Thanks for the reproducer details Ganesh!

Comment 7 Justin Sherrill 2021-08-31 16:50:38 UTC
Created redmine issue https://projects.theforeman.org/issues/33383 from this bug

Comment 8 Bryan Kearney 2021-08-31 20:05:36 UTC
Upstream bug assigned to jsherril

Comment 9 Bryan Kearney 2021-08-31 20:05:39 UTC
Upstream bug assigned to jsherril

Comment 10 Bryan Kearney 2021-11-08 16:04:52 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33383 has been resolved.

Comment 11 Sam Bible 2022-04-29 19:44:16 UTC
Verified on:
6.11 - 18

Steps to reproduce:
1.  import a manifest
2.  go to the RH repos page, scan repos for the 'rhel-7-server-extras-rpms' content set
3.  Notice you see no errors, and see the repository as expected.
4.  Check /var/log/foreman/production.log for errors.

Expected Results:
No errors appearing in the production log

Actual Results:
No errors in the production log.

Comment 14 errata-xmlrpc 2022-07-05 14:29:34 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 (Moderate: Satellite 6.11 Release), 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-2022:5498


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