Bug 2053395 - Satellite upgrade failed with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass"
Summary: Satellite upgrade failed with error "Couldn't connect to the server: undefine...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.11.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.11.0
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-11 08:24 UTC by Devendra Singh
Modified: 2022-07-19 10:57 UTC (History)
7 users (show)

Fixed In Version: rubygem-foreman_maintain-1.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:33:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34438 0 Normal Closed Satellite upgrade failed with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass" 2022-02-14 14:46:40 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:33:23 UTC

Description Devendra Singh 2022-02-11 08:24:21 UTC
Description of problem: Satellite upgrade failed with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass" 

Version-Release number of selected component (if applicable):
7.0

How reproducible:
always

Steps to Reproduce:
1. Restore Satellite 6.10.z by using the backup data.
2. Setup the repository to perform the satellite upgrade.
3. Run the upgrade from 6.10.z to 7.0
foreman-maintain upgrade run --target-version 7.0 -y
.....
.....
 Running Checks after upgrading to Satellite 7.0
 ================================================================================
 Clean old Kernel and initramfs files from tftp-boot:                  [32m[1m[OK][0m
 --------------------------------------------------------------------------------
 Check number of fact names in database:                               [32m[1m[OK][0m
 --------------------------------------------------------------------------------
 Check whether all services are running:                               [32m[1m[OK][0m
 --------------------------------------------------------------------------------
 Check whether all services are running using the ping call:           [31m[1m[FAIL][0m
 Couldn't connect to the server: undefined method `to_sym' for nil:NilClass 
 --------------------------------------------------------------------------------
 Continue with step [Restart applicable services]? (assuming yes) 

Actual results:
Satellite upgrade failed in post-upgrade check with "undefined method `to_sym' for nil:NilClass " error.

Expected results:
Satellite upgrade should be completed successfully.

Additional info:

Comment 3 Evgeni Golov 2022-02-11 09:01:47 UTC
Looking at the f-m logs, the corresponding ping call was:

D, [2022-02-10 12:37:09-0500 #53235] DEBUG -- : Called /katello/api/ping
D, [2022-02-10 12:37:09-0500 #53235] DEBUG -- : Response: 200,   {"status":"FAIL","services":{"candlepin":{"status":"ok","duration_ms":"30"},"candlepin_auth":{"status":"ok","duration_ms":"29"},"foreman_tasks":{"status":"ok","duration_ms":"4"},"katello_events":{"status":"ok","message":"0 Processed, 0 Failed","duration_ms":"0"},"candlepin_events":{"status":"ok","message":"0 Processed, 0 Failed","duration_ms":"0"},"pulp3":{"status":"ok","duration_ms":"72"},"pulp3_content":{"status":"ok","duration_ms":"59"},"katello_agent":{"status":"FAIL","message":"Not running","duration_ms":"1"}}}

Comment 4 Evgeni Golov 2022-02-11 09:02:55 UTC
Created redmine issue https://projects.theforeman.org/issues/34438 from this bug

Comment 6 Lukas Pramuk 2022-03-31 14:56:58 UTC
VERIFIED.

@Satellite 6.11.0 Snap14
rubygem-foreman_maintain-1.0.4-1.el7sat.noarch

by the following reproducer:

1) Restore a certain customer DB backup to 6.10.z

2) Check Satellite status before upgrade

# hammer ping
...
katello_agent:    
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 0ms

3) Upgrade to 6.11.0

# satellite-maintain upgrade run --target-version 6.11 -w repositories-validate,repositories-setup -y
...

REPRO:

Check whether all services are running using the ping call:           [FAIL]
Couldn't connect to the server: undefined method `to_sym' for nil:NilClass

vs.

FIX:

Check whether all services are running using the ping call:           [FAIL]
Some components are failing: katello_agent


>>> no longer rubyish message, message is now user friendly

4) Check Satellite status after upgrade

# hammer ping
...
katello_agent:    
    Status:          FAIL
    message:         Not running
    Server Response: Duration: 1ms

 
>>> cloning this BZ in order to deliver what is expected: successful upgrade -> BZ#2070620

Comment 9 errata-xmlrpc 2022-07-05 14:33:11 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.