Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1596643 - Change the error message thrown while trying to update facts on a system with no network
Summary: Change the error message thrown while trying to update facts on a system with...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-29 11:33 UTC by Shwetha Kallesh
Modified: 2018-08-16 19:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Shwetha Kallesh 2018-06-29 11:33:04 UTC
Description of problem:
Change the error message thrown while trying to update facts on a system with no network 

Version-Release number of selected component (if applicable):
[root@localhost ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.3.8-1
subscription management rules: 5.26
subscription-manager: 1.21.5-5.el7


How reproducible:


Steps to Reproduce:
1.Bring down the network on the system
2. Launch GUI ----> system ---> View system facts
3. Click on Update facts button

Actual results:
Error updating system data on the server

Expected results:
Network error, unable to connect to network

Additional info:

Comment 2 Kevin Howell 2018-07-05 14:10:51 UTC
If the user looks at /var/log/rhsm/rhsm.log , is sufficient information present to determine there was a network related error?

Comment 3 Shwetha Kallesh 2018-07-10 07:06:27 UTC
Kevin ,

Here is the rhsm.log , not sure if user can figure out if network is down with that error.

2018-07-10 12:29:45,828 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:497 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, redhat-entitlement-authority.pem, candlepin-ca.pem, shwetha-candlepin.pem
2018-07-10 12:29:45,828 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:545 - Making request: GET /subscription/consumers/ef7e7488-677f-442a-b03b-2b61c5596f65/owner
2018-07-10 12:29:47,081 [INFO] subscription-manager-gui:30850:MainThread @connection.py:588 - Response: status=200, requestUuid=e98a08e4-e470-46ae-b18f-35a777d2d23c, request="GET /subscription/consumers/ef7e7488-677f-442a-b03b-2b61c5596f65/owner"
2018-07-10 12:30:24,816 [DEBUG] subscription-manager-gui:30850:MainThread @cache.py:169 - Checking current system info against cache: /var/lib/rhsm/facts/facts.json
2018-07-10 12:30:24,841 [INFO] subscription-manager-gui:30850:MainThread @dmiinfo.py:75 - Using dmidecode dump file: /dev/mem
2018-07-10 12:30:24,988 [INFO] subscription-manager-gui:30850:MainThread @custom.py:87 - Loading custom facts from: /etc/rhsm/facts/migration.facts
2018-07-10 12:30:24,989 [DEBUG] subscription-manager-gui:30850:MainThread @cache.py:171 - System data has changed, updating server.
2018-07-10 12:30:24,989 [DEBUG] subscription-manager-gui:30850:MainThread @facts.py:87 - Updating facts on server
2018-07-10 12:30:24,991 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:497 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, redhat-entitlement-authority.pem, candlepin-ca.pem, shwetha-candlepin.pem
2018-07-10 12:30:24,992 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:545 - Making request: PUT /subscription/consumers/ef7e7488-677f-442a-b03b-2b61c5596f65
2018-07-10 12:30:24,992 [ERROR] subscription-manager-gui:30850:MainThread @cache.py:181 - Error updating system data on the server
2018-07-10 12:30:24,992 [ERROR] subscription-manager-gui:30850:MainThread @cache.py:182 - [Errno -2] Name or service not known
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/subscription_manager/cache.py", line 173, in update_check
    self._sync_with_server(uep, consumer_uuid)
  File "/usr/lib64/python2.7/site-packages/subscription_manager/facts.py", line 88, in _sync_with_server
    uep.updateConsumer(consumer_uuid, facts=self.get_facts())
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1051, in updateConsumer
    ret = self.conn.request_put(method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 702, in request_put
    return self._request("PUT", method, params, headers=headers)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 719, in _request
    info=info, headers=headers)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 557, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python2.7/httplib.py", line 1041, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1075, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 1037, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 881, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 843, in send
    self.connect()
  File "/usr/lib64/python2.7/httplib.py", line 1251, in connect
    HTTPConnection.connect(self)
  File "/usr/lib64/python2.7/httplib.py", line 824, in connect
    self.timeout, self.source_address)
  File "/usr/lib64/python2.7/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
2018-07-10 12:30:25,023 [ERROR] subscription-manager-gui:30850:MainThread @factsgui.py:177 - Could not update system facts 
Error: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
2018-07-10 12:30:25,024 [ERROR] subscription-manager-gui:30850:MainThread @utils.py:99 - Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/subscription_manager/gui/factsgui.py", line 173, in update_facts
    self.facts.update_check(self.cp_provider.get_consumer_auth_cp(), identity.uuid, force=True)
  File "/usr/lib64/python2.7/site-packages/subscription_manager/cache.py", line 183, in update_check
    raise Exception(_("Error updating system data on the server, see /var/log/rhsm/rhsm.log "
Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
2018-07-10 12:30:25,087 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:497 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem, redhat-entitlement-authority.pem, candlepin-ca.pem, shwetha-candlepin.pem
2018-07-10 12:30:25,088 [DEBUG] subscription-manager-gui:30850:MainThread @connection.py:545 - Making request: GET /subscription/consumers/ef7e7488-677f-442a-b03b-2b61c5596f65/owner
2018-07-10 12:30:25,088 [ERROR] subscription-manager-gui:30850:MainThread @factsgui.py:137 - Could not get owner name: [Errno -2] Name or service not known

Comment 4 Kevin Howell 2018-07-12 14:18:08 UTC
Dev, can probably add gaierror to exception handler in exceptions.py We already have a message there that is appropriate: SOCKET_MESSAGE = _('Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.')

Comment 5 Chris Snyder 2018-08-16 19:21:00 UTC
Deferring to RHEL 7.7 as the fix for this will not make it into RHEL 7.6 at this point in the cycle.


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