Project

Profile

Help

Story #1866

closed

As a user, I'd like pulp-admin to gracefully handle connection failures

Added by jcline@redhat.com over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The following traceback was observed by a Katello user to happen intermittently:

message: (None, 'wrong version number', None)
Traceback (most recent call last):
File \"/usr/lib/python2.7/site-packages/pulp/agent/lib/dispatcher.py\", line 108, in update
    report = handler.update(conduit, units, dict(options))

File \"/usr/lib/python2.7/site-packages/pulp_node/handlers/handler.py\", line 161, in update
    bindings = RepositoryBinding.fetch(pulp_bindings, conduit.consumer_id, repo_ids)

File \"/usr/lib/python2.7/site-packages/pulp_node/handlers/model.py\",
    line 534, in fetch\n    binds.extend(RepositoryBinding.filtered(http.response_body))

File \"/usr/lib/python2.7/site-packages/pulp/bindings/consumer.py\", line 158, in find_by_id
    return self.server.GET(path)

File \"/usr/lib/python2.7/site-packages/pulp/bindings/server.py\", line 92, in GET
    return self._request('GET', path, queries)

File \"/usr/lib/python2.7/site-packages/pulp/bindings/server.py\", line 142, in _request
    response_code, response_body = self.server_wrapper.request(method, url, body)

File \"/usr/lib/python2.7/site-packages/pulp/bindings/server.py\", line 332, in request
    # Attempt to deserialize the body (should pass unless the server is busted)
    ConnectionException: (None, 'wrong version number', None)

This happens when the TLS handshake fails to complete successfully. That can happen due to a real mis-match in supported protocol versions or because the underlying TCP connection came to a premature end.

It would be nice if we retried when certain connection errors occurred (initial connections, timeouts for safe HTTP methods, etc) automatically with pulp-admin. All this would be provided if we switched to the requests library for pulp-admin.

If you're interested in the OpenSSL code that causes this error, it can be found at https://github.com/openssl/openssl/blob/83f68df32f0067ee7b092f70568fc33e526fd4fd/ssl/record/ssl3_record.c#L306-L320


Related issues

Related to Pulp - Refactor #1918: pulp depends on m2crypto, which will not be ported to Python 3CLOSED - NOTABUG

Actions
Actions #1

Updated by dkliban@redhat.com over 8 years ago

@jcline, let's see if we can turn this into a story.

Actions #2

Updated by mhrivnak over 8 years ago

I think there are two changes being requested here:

Refactor: use "requests" in the bindings. This is blocked currently because the bindings have to run on python 2.4, but it would be good to track this change.

Story: enhancement to have pulp-admin retry requests when there is a connection error. I don't think failure to retry is necessarily a bug. Perhaps something like "As a user of pulp-admin, I don't have to manually re-run a command when a connection error occurs".

Actions #3

Updated by jcline@redhat.com over 8 years ago

  • Description updated (diff)
Actions #4

Updated by jcline@redhat.com over 8 years ago

  • Tracker changed from Issue to Story
  • Subject changed from The Pulp Python bindings don't use requests and fail to retry to As a user, I'd like pulp-admin to gracefully handle connection failures
  • Description updated (diff)
  • Groomed set to No
  • Sprint Candidate set to No
Actions #5

Updated by mhrivnak over 8 years ago

  • Related to Refactor #1918: pulp depends on m2crypto, which will not be ported to Python 3 added
Actions #6

Updated by bmbouter over 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #7

Updated by bmbouter over 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #8

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF