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:
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"}}}
Created redmine issue https://projects.theforeman.org/issues/34438 from this bug
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
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