Migrating Foreman proxies from Almalinux 8 to 9 with leapp, insights-client error

Started the migration of my Foreman servers from Almalinux 8 to 9 with leapp and the Foreman servers went flawless, however for every proxy, I get one error after leapp reboots the server after everything is finished. It seems to try and register the proxy with insights even though that is not something we use. Would be nice if I can tell it not do do this. Anyone seen this before?

Jan 03 13:15:57 fmproxy leapp3[1508]: ==> Processing phase `FirstBoot`
Jan 03 13:15:57 fmproxy leapp3[1508]: ====> * insights_auto_register
Jan 03 13:15:57 fmproxy leapp3[1508]:         Automatically registers system into Red Hat Insights
Jan 03 13:15:58 fmproxy leapp3[6202]: Process Process-202:
Jan 03 13:15:58 fmproxy leapp3[6202]: Traceback (most recent call last):
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/usr/lib64/python3.9/multiprocessing/process.py", line 315, in _bootstrap
Jan 03 13:15:58 fmproxy leapp3[6202]:     self.run()
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/usr/lib64/python3.9/multiprocessing/process.py", line 108, in run
Jan 03 13:15:58 fmproxy leapp3[6202]:     self._target(*self._args, **self._kwargs)
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 75, in _do_>
Jan 03 13:15:58 fmproxy leapp3[6202]:     actor_instance.run(*args, **kwargs)
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 296, in run
Jan 03 13:15:58 fmproxy leapp3[6202]:     self.process(*args)
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/actor.>
Jan 03 13:15:58 fmproxy leapp3[6202]:     insightsautoregister.process()
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/librar>
Jan 03 13:15:58 fmproxy leapp3[6202]:     _insights_register()
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/librar>
Jan 03 13:15:58 fmproxy leapp3[6202]:     run(['insights-client', '--register'])
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/root/tmp_leapp_py3/leapp/libraries/stdlib/__init__.py", line 184, in run
Jan 03 13:15:58 fmproxy leapp3[6202]:     result = _call(args, callback_raw=callback_raw, callback_linebuffered=callback_>
Jan 03 13:15:58 fmproxy leapp3[6202]:   File "/root/tmp_leapp_py3/leapp/libraries/stdlib/call.py", line 147, in _call
Jan 03 13:15:58 fmproxy leapp3[6202]:     raise OSError(errno.ENOENT, os.strerror(errno.ENOENT), command[0])
Jan 03 13:15:58 fmproxy leapp3[6202]: FileNotFoundError: [Errno 2] No such file or directory: 'insights-client'
Jan 03 13:15:58 fmproxy leapp3[1508]: 2025-01-03 13:15:58.62  ERROR    PID: 1508 leapp.workflow.FirstBoot: Actor insights>
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 75, in _do_>
Jan 03 13:15:58 fmproxy leapp3[1508]:     actor_instance.run(*args, **kwargs)
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 296, in run
Jan 03 13:15:58 fmproxy leapp3[1508]:     self.process(*args)
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/actor.>
Jan 03 13:15:58 fmproxy leapp3[1508]:     insightsautoregister.process()
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/librar>
Jan 03 13:15:58 fmproxy leapp3[1508]:     _insights_register()
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/insightsautoregister/librar>
Jan 03 13:15:58 fmproxy leapp3[1508]:     run(['insights-client', '--register'])
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/root/tmp_leapp_py3/leapp/libraries/stdlib/__init__.py", line 184, in run
Jan 03 13:15:58 fmproxy leapp3[1508]:     result = _call(args, callback_raw=callback_raw, callback_linebuffered=callback_>
Jan 03 13:15:58 fmproxy leapp3[1508]:   File "/root/tmp_leapp_py3/leapp/libraries/stdlib/call.py", line 147, in _call
Jan 03 13:15:58 fmproxy leapp3[1508]:     raise OSError(errno.ENOENT, os.strerror(errno.ENOENT), command[0])
Jan 03 13:15:58 fmproxy leapp3[1508]: FileNotFoundError: [Errno 2] No such file or directory: 'insights-client'
Jan 03 13:15:58 fmproxy leapp3[1508]: ===================================================================================>
Jan 03 13:15:58 fmproxy leapp3[1508]: Actor insights_auto_register unexpectedly terminated with exit code: 1 - Please che>
Jan 03 13:15:58 fmproxy leapp3[1508]: ===================================================================================>

Looking on the leapp log I see:

2025-01-03 13:15:57.889 INFO     PID: 1508 leapp.workflow.FirstBoot: Starting stage Before of phase FirstBoot
2025-01-03 13:15:57.904 INFO     PID: 1508 leapp.workflow.FirstBoot: Starting stage Main of phase FirstBoot
2025-01-03 13:15:57.910 INFO     PID: 1508 leapp.workflow.FirstBoot: Skipping experimental actor remove_live_image
2025-01-03 13:15:57.918 INFO     PID: 1508 leapp.workflow.FirstBoot: Executing actor insights_auto_register
2025-01-03 13:15:58.22  DEBUG    PID: 6202 leapp.workflow.FirstBoot.insights_auto_register: External command has started: ['insights-client'
, '--register']
2025-01-03 13:15:58.37  DEBUG    PID: 6202 leapp.workflow.FirstBoot.insights_auto_register: External command has finished: ['insights-client
', '--register']
2025-01-03 13:15:58.62  ERROR    PID: 1508 leapp.workflow.FirstBoot: Actor insights_auto_register has crashed: Traceback (most recent call l
ast):

Think I solved this one, looking in the /var/log/leapp/leapp-report.json I seen:

      "summary": "After the upgrade, this system will be automatically registered into Red Hat Insights. The 'insights-client' package requi
red for the registration will be installed during the upgrade. To skip the automatic registration, use the '--no-insights-register' command
line option or set the LEAPP_NO_INSIGHTS_REGISTER environment variable.",

So added --no-insights-register to the leapp commands:

leapp preupgrade --no-insights-register
leapp upgrade --no-insights-register

Yum, that fixed that error, Now I got this error in the very end instead:

Jan 03 16:03:29 fmproxy leapp3[6479]: Running the installer. This can take a while.
Jan 03 16:03:29 fmproxy leapp3[1484]: ====> * enable_rhsm_target_repos
Jan 03 16:03:29 fmproxy leapp3[1484]:         On the upgraded target system, set release and enable repositories that wer>
Jan 03 16:03:56 fmproxy leapp3[1484]: ====> * remove_systemd_resume_service
Jan 03 16:03:56 fmproxy leapp3[1484]:         Remove systemd service to launch Leapp.
Jan 03 16:03:59 fmproxy leapp3[1484]: ============================================================
Jan 03 16:03:59 fmproxy leapp3[1484]:                            ERRORS
Jan 03 16:03:59 fmproxy leapp3[1484]: ============================================================
Jan 03 16:03:59 fmproxy leapp3[1484]: 2025-01-03 16:03:56.380998 [ERROR] Actor: enable_rhsm_target_repos
Jan 03 16:03:59 fmproxy leapp3[1484]: Message: A subscription-manager command failed to execute
Jan 03 16:03:59 fmproxy leapp3[1484]: Summary:
Jan 03 16:03:59 fmproxy leapp3[1484]:     Details: Command ['subscription-manager', 'release', '--set', '9.5'] failed wit>
Jan 03 16:03:59 fmproxy leapp3[1484]:     Stderr: No releases match '9.5'.  Consult 'release --list' for a full listing.
Jan 03 16:03:59 fmproxy leapp3[1484]:     Hint: Please ensure you have a valid RHEL subscription and your network is up. >
Jan 03 16:03:59 fmproxy leapp3[1484]:     Link: https://access.redhat.com/solutions/6138372
Jan 03 16:03:59 fmproxy leapp3[1484]: ============================================================
Jan 03 16:03:59 fmproxy leapp3[1484]:                        END OF ERRORS
Jan 03 16:03:59 fmproxy leapp3[1484]: ============================================================
Jan 03 16:03:59 fmproxy leapp3[1484]: Debug output written to /var/log/leapp/leapp-upgrade.log
Jan 03 16:03:59 fmproxy leapp3[1484]: ============================================================

Tried:

fmproxy ~]# subscription-manager release --list
No release versions available, please check subscriptions.

So looks like another “feature” not available for non Red Hat OS subscriptions.
I guess I can ignore that one :slight_smile:

I have used --no-rhsm with leapp.

Thanks, will try the --no-rhsm and see if that clears up the remaining error.

LEAPP_NO_RHSM
If set to 1, Leapp does not use Red Hat Subscription Management for the upgrade. It‘s equivalent to the --no-rhsm leapp option.

Finished without errors now. Seen in the report now:

Title: The subscription-manager release is going to be kept as it is during the upgrade
Summary: The upgrade is executed with the --no-rhsm option (or with the LEAPP_NO_RHSM environment variable). In this case, the subscription-
manager will not be configured during the upgrade. If the system is subscribed and release is set already, you could encounter issues to get
 RHEL content using DNF/YUM after the upgrade.
Remediation: [hint] Set the new release (or unset it) after the upgrade using subscription-manager: subscription-manager release --set 9.5