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: | rhc | Assignee: | Link Dupont <link> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Priscila Gutierres <prgutier> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 8.4 | CC: | cmarinea, fjansen, link, lmiksik, pakotvan, pgm-rhel-tools, rsoliman | ||||||
| Target Milestone: | rc | Keywords: | 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: |
|
||||||||
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 Created attachment 1826027 [details] patch Fixed upstream https://github.com/RedHatInsights/yggdrasil/commit/82635d912276d834a1b3e47da77accb41ad8de20 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.
*** Bug 2007054 has been marked as a duplicate of this bug. *** 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 *** Bug 2081406 has been marked as a duplicate of this bug. *** *** Bug 2081408 has been marked as a duplicate of this bug. *** |
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.