Description of problem: The "Change Content Source" option works great under normal circumstances but when it comes to pulp-mqtt mode of REX, Then It does not updates\provides the step to update the broker information in the /etc/yggdrasil/config.toml file of client system causing the future remote executions to fail. Version-Release number of selected component (if applicable): Satellite 6.12 How reproducible: Always Steps to Reproduce: 1. Install a Satellite and Capsule 6.12 and enable the pull-mqtt mode for REX in both. 2. Administer --> Settings --> Content and enable the "Prefer registered through proxy for remote execution" option. 3. Register a system with a satellite server using the global registration method ( pull provider enabled ) 4. Ensure that remote-execution related options are properly configured in Satellite settings ( as per the requirement of the infra ). 5. Run "uptime" command via REX Script job on the host. Once the job finishes click on the name of the host and it will show that, Satellite tried to execute the job directly on the host as expected. Also, run "subscription-manager facts --update" on the host. 6. Check the yggdrasil configuration on the host and the broker should point to satellite. # cat /etc/yggdrasil/config.toml 7. Now Go to the New Hosts UI and use the "Change Content Source" option to switch the host content source to external Capsule. Copy the script provided by satellite to execute on the client and complete the process. 8. Edit the Host and ensure that the content source has changed to the external capsule. 9. Repeat Step 5 i.e. try running another "uptime" REX job and see what happens. 10. Repeat Step 6. Actual results: On Step 6: yggdrasil points to satellite.example.com # cat /etc/yggdrasil/config.toml # yggdrasil global configuration settings written by katello-pull-transport-migrate broker = ["mqtts://satellite.example.com:1883"] cert-file = "/etc/pki/consumer/cert.pem" key-file = "/etc/pki/consumer/key.pem" ca-root = ["/etc/rhsm/ca/katello-server-ca.pem"] log-level = "error" On Step 8, The job will remain hung on satellite forever. On Step 9, The yggdrasil still points to satellite server. Now, the issue is, After changing the content source to capsule.example.com and running "sub-man facts --update", both the content source and registered_through capsule for the host is capsule.example.com. This means, When the next job will be scheduled, Satellite will delegate the job to the capsule, and the capsule will wait for the host to pick up the job. On the other hand, The host is still configured to pull jobs from satellite only. Expected results: The yggdrasil will be corrected by some method so that, the pull-mqtt mode continues to work and the REX tasks remains unaffected for the Host. Additional info: Three ways I could fix it: A) Either install katello-pull-transport-migrate + restart yggdrasild manually. B) If katello-pull-transport-migrate package is installed then run "/usr/sbin/katello-pull-transport-migrate" on the host + restart yggdrasild manually. C) Fix the broken url in /etc/yggdrasil/config.toml + restart yggdrasild manually.
I'm adding a second issue on here because EL hosts without kickstart repos will fail to render the new template snippet without a fix for it.
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35516 has been resolved.
Verified on Satellite 6.12 sn 13, after applying the change content host script, the host is reconfigured correctly -- yggdrassil points to the new source and the subsequent rex pull jobs succeed
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 (Important: Satellite 6.12 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:8506