Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 2007667

Summary: the RHC Client used for the Ansible Automation Platform Service Catalog is unable to reconnect after a random disconnect
Product: Red Hat Enterprise Linux 8 Reporter: Raed Soliman <rsoliman>
Component: rhcAssignee: Link Dupont <link>
Status: CLOSED ERRATA QA Contact: Priscila Gutierres <prgutier>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: cmarinea, fjansen, link, lmiksik, pakotvan, pgm-rhel-tools, rsoliman
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rhc-0.2.0-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2007767 2009641 (view as bug list) Environment:
Last Closed: 2021-11-09 17:52:56 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:
Bug Depends On:    
Bug Blocks: 2007767, 2009641    
Attachments:
Description Flags
log file with trace level logging set that shows the behavior
none
patch none

Description Raed Soliman 2021-09-24 14:16:47 UTC
Created attachment 1825905 [details]
log file with trace level logging set that shows the behavior

Description of problem:
the RHC Client used for the Ansible Automation Platform Service Catalog is unable to reconnect after a random disconnect - causing the source to be unavailable and unusable from cloud.redhat.com

Version-Release number of selected component (if applicable):

rhc-0.2.0-1.el8_4.x86_64


How reproducible:
Random

Steps to Reproduce:
1.Install AAP Controller
2.Install Catalog Worker
3.Source shows up on CRC
4.Wait for a disconnect
5.Log shows a reconnect but the source remains unavailable

Actual results:

Source is unavailable even though the Service is up and running

Expected results:

Source to be available

Additional info:

The "Dispatchers" map is empty. The call to the
"publishConnectionStatus" method during the onConnect handler is
*always* publishing with an empty dispatcher map.

log file with trace level logging set that shows the behavior is attached.

Comment 1 Link Dupont 2021-09-24 14:20:29 UTC
The root cause this bug is that when the client disconnects (in this case via a pingresp timeout), the reconnection logic always publishes connection status with an empty dispatchers map.

> go publishConnectionStatus(client, map[string]map[string]string{})

https://github.com/RedHatInsights/yggdrasil/blob/yggdrasil-0.2/cmd/yggd/main.go#L241

Comment 3 Link Dupont 2021-09-24 19:24:18 UTC
This can be reproduced without installing Tower or the Catalog worker. This should be reproducible with rhc-worker-playbook (or any worker, for that matter). I believe these steps should be able to reproduce it.

1. sudo subscription-manager register --auto-attach
2. sudo dnf upgrade rhc rhc-worker-playbook
3. sudo rhc connect
4. Follow the rhcd logs: journalctl -u rhcd -f
5. Disconnect the network (if running a local libvirt domain: virsh domif-setlink <domain> <iface> down (for example: virsh domif-setlink my_test_vm vnet0 down))

Logs should eventually print something like:

[yggd] 2021/09/24 15:09:30 /code/RedHatInsights/yggdrasil/cmd/yggd/main.go:248: connection lost unexpectedly: pingresp not received, disconnecting

6. Reconnect the network (virsh domif-setlink <domain> <iface> up)

Logs should eventually print something like:

[yggd] 2021/09/24 15:10:02 /code/RedHatInsights/yggdrasil/cmd/yggd/mqtt.go:139: message: {Type:connection-status MessageID:3b030ca4-e6cf-4a89-bdfb-ad5469b63d56 ResponseTo: Version:1 Sent:2021-09-24 15:10:02.640230843 -0400 EDT m=+77.425672847 Content:{CanonicalFacts:{InsightsID: MachineID:7a784197-0fc6-fab9-13a0-2ca8ae57fe18 BIOSUUID:d67903a8-0d15-4242-af65-3825a2aa4028 SubscriptionManagerID:f08ca6b1-3d69-4d40-86e7-d0cb15bff74d IPAddresses:[192.168.122.68] MACAddresses:[52:54:00:50:bb:59 00:00:00:00:00:00] FQDN:centos-8-stream} Dispatchers:map[] State:online Tags:map[]}}
                                         ^-----here------^
To verify the reproduction, we are looking for the empty Dispatchers map.

Comment 14 Christian Marineau 2021-10-21 19:49:55 UTC
*** Bug 2007054 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2021-11-09 17:52:56 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 (rhc bug fix and enhancement update), 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-2021:4174

Comment 17 Link Dupont 2022-05-03 15:21:46 UTC
*** Bug 2081406 has been marked as a duplicate of this bug. ***

Comment 18 Link Dupont 2022-05-03 15:22:46 UTC
*** Bug 2081408 has been marked as a duplicate of this bug. ***