Project

Profile

Help

Issue #1734

closed

The Pulp streamer logs a traceback when a ConnectionError occurs.

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

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
2.8.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

For example:

Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.threaded:WARNING: ('Connection aborted.', BadStatusLine("''",))
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008) u'response_code'
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008) Traceback (most recent call last):
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/base.py", line 145, in _fire_event_to_listener
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008)     event_listener_callback(*args, **kwargs)
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008)   File "/home/vagrant/devel/pulp/streamer/pulp/streamer/server.py", line 101, in download_failed
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008)     '%%(response_msg)s' %% error_report))
Mar 02 14:28:47 dev pulp_streamer[10439]: nectar.downloaders.base:ERROR: (10439-91008) KeyError: u'response_code'

A requests.ConnectionError was raised, and subsequently calls the `download_failed` method on the event listener. The streamer's event listener should be updated to not assume the 'response_code' field is present in the failure report.

Actions #1

Updated by mhrivnak about 8 years ago

  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes
  • Tags Easy Fix added
Actions #2

Updated by jcline@redhat.com about 8 years ago

  • Severity changed from 1. Low to 3. High
  • Platform Release set to 2.8.1

I'm changing this to be a 2.8.1 bug with high severity because I dug into this a bit more and realized this has very serious consequences. When this KeyError occurs, the response code the streamer returns to the caching proxy will be 200 OK, even though things are definitely not okay.

This in turn causes the download tasks to believe everything went okay and because https://pulp.plan.io/issues/1737 is not fixed yet, the task cannot check the integrity of the file (which is a 0-byte file) so it gets written to permanent storage.

Actions #3

Updated by jcline@redhat.com about 8 years ago

  • Tags deleted (Easy Fix)
Actions #4

Updated by jcline@redhat.com about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jcline@redhat.com
Actions #5

Updated by jcline@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST

Added by Jeremy Cline about 8 years ago

Revision 74bd56aa | View on GitHub

Ensure a proper HTTP status code in the streamer on failure

If a non-HTTP error occurs in Nectar the streamer would fail to return a reasonable status code. An example of this is if the domain name is unresolvable or the host is not accepting connections. This resulted in an HTTP 200 from the streamer. It is now a HTTP 503.

closes #1734

Added by Jeremy Cline about 8 years ago

Revision 74bd56aa | View on GitHub

Ensure a proper HTTP status code in the streamer on failure

If a non-HTTP error occurs in Nectar the streamer would fail to return a reasonable status code. An example of this is if the domain name is unresolvable or the host is not accepting connections. This resulted in an HTTP 200 from the streamer. It is now a HTTP 503.

closes #1734

Actions #7

Updated by Anonymous about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #9

Updated by semyers about 8 years ago

  • Status changed from MODIFIED to 5
Actions #11

Updated by semyers about 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #13

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF