Bug 2124087 - The "Change Content Source" option does not provides steps to change the yggdrasil configuration in case putt-mqtt mode is use in Satellite 6.12
Summary: The "Change Content Source" option does not provides steps to change the yggd...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.12.0
Hardware: All
OS: All
medium
high
Target Milestone: 6.12.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-04 16:16 UTC by Sayan Das
Modified: 2022-11-16 13:35 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-katello-4.5.0.17-1,foreman-3.3.0.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35516 0 Normal Closed Changing content source for a host breaks REX pull, if configured 2022-09-27 22:01:55 UTC
Foreman Issue Tracker 35561 0 Normal Closed Allow delaying yggdrasild restart 2022-09-27 22:01:55 UTC
Foreman Issue Tracker 35566 0 Normal Closed Content change template assumes host has a kickstart repository available 2022-09-27 22:01:56 UTC
Red Hat Issue Tracker SAT-12885 0 None None None 2022-09-12 11:15:37 UTC
Red Hat Issue Tracker SAT-12957 0 None None None 2022-09-27 20:18:45 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:49 UTC

Description Sayan Das 2022-09-04 16:16:57 UTC
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.

Comment 3 Ian Ballou 2022-09-26 17:49:57 UTC
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.

Comment 4 Bryan Kearney 2022-09-27 20:04:24 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35516 has been resolved.

Comment 7 Peter Ondrejka 2022-10-04 20:11:49 UTC
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

Comment 11 errata-xmlrpc 2022-11-16 13:35:39 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 (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


Note You need to log in before you can comment on or make changes to this bug.