Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Installation\Re-installation of katello-pull-transport-migrate can fix an incorrect yggdrasil configuration but does not restarts the yggdrasild service on the target host.
Description of problem:
If there was an existing /etc/yggdrasil/config.toml configuration present and someone manually changed it, We will expect that installing\re-installing katello-pull-transport-migrate will correct the configuration based on latest rhsm.conf details and will restart the yggdrasild service as well.
But it tries to only start the service, not restart.
Version-Release number of selected component (if applicable):
Satellite 6.12
How reproducible:
Always
Steps to Reproduce:
1. Have a Satellite and Capsule 6.12 up and running with pull-mqtt enabled.
2. Open SSH terminals for each system and leave this command runing:
# journalctl -fu mosquitto
3. Register a system with the satellite server with "REX pull mode" set to yes. Preferably use Global Registration method.
4. Confirm that yggdrasild on host is communicating with Satellite and you can run a simple uptime command via REX from Satellite on that host.
5. Change the Content Source of the Host using the UI feature of the Satellite, to the external capsule.
6. Check the /etc/yggdrasil/config.toml file on host.
7. Install\re-install the katello-pull-transport-migrate package on the host and check back on /etc/yggdrasil/config.toml file.
8. Try running a REX job from Satellite on the host.
Actual results:
Step 4: Success
Step 6: Even though rhsm.conf points to capsule, the /etc/yggdrasil/config.toml points to satellite and the host is still connected with satellite or trying to connect with satellite via yggdrasild.
Step 7. The /etc/yggdrasil/config.toml config is correct now i.e. shows correct broker url but the Host is still connected with\trying to connect with satellite.
Step 8: The job remains in hung state ( assuming Satellite deligated the job properly to the capsule )
Expected results:
The package katello-pull-transport-migrate or its underlying script /usr/sbin/katello-pull-transport-migrate needs to be improved to restart the yggdrasild service after any sort of modifications on /etc/yggdrasil/config.toml.
Additional info:
A manual "systemctl restart yggdrasild" fixes the issue.
I have katello-pull-transport-migrate-1.0.1-1.el8sat.noarch installed and it has the following code:
# start the yggdrasild service
echo "Starting yggdrasild..."
systemctl enable --now yggdrasild
Whereas https://github.com/theforeman/katello-pull-transport-migrate/blob/develop/katello-pull-transport-migrate#L59-L62 has the following:
# start the yggdrasild service
echo "Starting yggdrasild..."
systemctl try-restart yggdrasild
systemctl enable --now yggdrasild
And this "systemctl try-restart yggdrasild" fixes the issue if it is part of the script. As i can't see any new RPM version for katello-pull-transport-migrate, Please have the updated script from github pushed into a new version of katello-pull-transport-migrate RPM and that should fix the issue.
Verified on Sat 6.12 sn 13. Re-registration now restarts the yggdrasil service and updates configuration, tested both with manual changes to /etc/yggdrasil/config.toml as well as with changed content source
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 (Satellite 6 Satellite Client 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/RHBA-2022:8507