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.

Bug 2115229

Summary: pull-provider rex jobs occassionally hanging
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Remote ExecutionAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.12.0CC: aruzicka, link, pcreech
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:35:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Ondrejka 2022-08-04 07:59:52 UTC
Description of problem:

Pull-provider job invocations are occasionally left in pending state. I cannot reproduce this consistently though. The job task is pending on Actions::ProxyAction

Version-Release number of selected component (if applicable):
Satellite 6.12 snap 4

How reproducible:
Not consistently 

Steps to Reproduce:
1. have an internal capsule with --foreman-proxy-plugin-remote-execution-script-mode=pull-mqtt
2. have a host with yggdrasil client enabled
3. run jobs against host

Actual results:
Most jobs execute successfully, occasionally a hanging job occurs

Additional info:
Found when installing and removing katello-agent on hosts along with running yggdrasil, though not certain if it has a connection to the issue

Comment 1 Adam Ruzicka 2022-08-04 08:06:51 UTC
Could you try running with debug logging enabled on the capsule and satellite, try reproducing it and then attaching production.log and proxy.log from the capsule and satellite and output of journalctl -u yggdrasild from the remote host?

Comment 2 Adam Ruzicka 2022-08-04 08:16:54 UTC
And maybe output of journalctl -u mosquitto from satellite/capsule

Comment 11 Adam Ruzicka 2022-08-29 12:53:45 UTC
Have not found a cause for the rapid reconnects, but the main issue here was caused by kptm not restarting yggdrasil after changing its config.

Comment 12 Adam Ruzicka 2022-09-13 08:14:58 UTC
All the related PRs were merged. The one in Foreman[1] will need to be cherry-picked, katello-pull-transport-migrate could probably be rebased, if we manage to find someone who can actually release it.

[1] - https://github.com/theforeman/foreman/pull/9412

Comment 13 Adam Ruzicka 2022-09-13 08:20:05 UTC
Right, that didn't take long. kptm-1.0.2 including the fix is out.

Comment 14 Peter Ondrejka 2022-10-03 12:20:20 UTC
Verified on Satellite 6.12 sn 13, after re-registration yggdrasil is correctly restarted and the rex job works as expected. Also verified that re-registration can cope with a stopped yggdrasil service and with uninstalled yggdrasil package

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