Bug 1448501
Summary: | GUI: Subscription-manager cannot unregister a system once network is up again | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Stavel <jstavel> |
Component: | subscription-manager | Assignee: | Jiri Hnidek <jhnidek> |
Status: | CLOSED ERRATA | QA Contact: | Jan Stavel <jstavel> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.4 | CC: | jhnidek, jsefler, khowell, redakkan, skallesh |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | subscription-manager-1.20.2-1 | Doc Type: | No Doc Update |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 09:49: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
Jan Stavel
2017-05-05 15:07:44 UTC
I'm able to reproduce this bug. The problem is deeper than I thought it will be. When you will run following simple C application using system call getaddrinfo(): https://gist.github.com/jirihnidek/bf7a2363e480491da72301b228b35d5d then you will notice same problem. I was able to prove this bug can be fixed using calling res_init() adding to previous example. Look also at this: https://stackoverflow.com/questions/30360029/if-getaddrinfo-fails-once-it-fails-forever-even-after-network-is-ready The socket module does not have api for res_init(), but salt stack uses following hack: https://github.com/saltstack/salt/issues/21397 Cool, sub-man GUI has method reset_resolver() using ctypes and direct glibc res_init() in similar way as salt stack does it. Thus it is not so complicated to fix it. Excelent! I am comping at the bit to automate this scenarion! reproducing the failure on RHEL74 ==================================== subscription management server: 2.2.0-1 subscription management rules: 5.26 subscription-manager: 1.19.21-1.el7 python-rhsm: 1.19.9-1.el7 1) register client to candlepin 2) launch gui 3) stop network 4) try to unregister from GUI--> notice network error ( expected ) 5) start network service 6) Again try to unregister from GUI Observed an error message 'Network error. Unable to connect a server'. Verifying on RHEL75: =================== subscription-manager-rhsm-certificates-1.20.5-1.el7.x86_64 subscription-manager-gui-1.20.5-1.el7.x86_64 subscription-manager-rhsm-1.20.5-1.el7.x86_64 subscription-manager-1.20.5-1.el7.x86_64 subscription-manager-initial-setup-addon-1.20.5-1.el7.x86_64 subscription-manager-plugin-container-1.20.5-1.el7.x86_64 Followed the same steps , observed that system was unregistered from the GUI with out any network error. rhsm.log for reference: 2017-11-10 14:14:04,037 [INFO] subscription-manager-gui:15480:MainThread @managergui.py:497 - Unregister button pressed, asking for confirmation. 2017-11-10 14:14:06,158 [INFO] subscription-manager-gui:15480:MainThread @managergui.py:472 - Proceeding with un-registration: 6e2874e2-d592-4e93-b91f-d2eea484c968 2017-11-10 14:14:06,322 [INFO] subscription-manager-gui:15480:MainThread @connection.py:556 - Response: status=204, requestUuid=d32f3f7e-18e1-45ce-9f1a-4cbe26676140, request="DELETE /candlepin/consumers/6e2874e2-d592-4e93-b91f-d2eea484c968" 2017-11-10 14:14:06,323 [INFO] subscription-manager-gui:15480:MainThread @unregister.py:55 - Successfully un-registered. based on the above observations , marking the bug as "Verified" 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, 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-2018:0681 |