Bug 1458765 - Incorrect retry count evaluation and better exception handle
Summary: Incorrect retry count evaluation and better exception handle
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-06-05 12:19 UTC by Jan Dobes
Modified: 2017-09-06 12:27 UTC (History)
4 users (show)

Fixed In Version: spacewalk-backend-2.5.3-149-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-06 12:27:53 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2645 normal SHIPPED_LIVE Moderate: satellite and spacewalk security and bug fix update 2017-09-06 16:26:43 UTC

Description Jan Dobes 2017-06-05 12:19:50 UTC
Description of problem:
There are 2 commits in spacewalk master for reposync/cdnsync downloader:

1. 72a30c87aeda3833ca6c0f5607961582dbbfe5b5
- fixing maximal retry count if there is more mirrors than default retries - 3

2. 6bb8389788991a29fe3c112ec84a6c3ca6046c45
- catching KeyboardException preventing some ugly traceback during downloading

These commits have incorrectly BZ1446198 in their message but they are not mentioned in BZ1446198.

Comment 1 Jan Dobes 2017-07-25 09:54:36 UTC
Switching to MODIFIED because these commits are already in spacewalk.

Comment 6 Radovan Drazny 2017-08-18 12:39:03 UTC
Tested on spacewalk-backend-2.5.3-149. As there is no real bug or reproducer present, I did just a bit of manual testing based on info from Jan. First commit just fixes an obvious mistake in the code, the other one improves interrupt handling in the package downloading phase of cdn-sync. When Ctrl+C'ed, cdn-sync now finishes all remaining transfers before exiting. In case of network connectivity loss (simulated with "iptables -A OUTPUT -p tcp --destination-port 443 -j DROP") it is still possible to interrupt the process, but it takes two Ctrl+C's. 

VERIFIED

Comment 7 Lukáš Hellebrandt 2017-08-29 12:02:01 UTC
Re-verified with spacewalk-backend-2.5.3-151.

Tested on cdn-sync and spacewalk-repo-sync:
1) Sanity - the tools work as expected, checked by automation
2) CTRL+C now doesn't produce ugly traceback and waits for open connections to close - valid for "download" phases, but for example after "<time> Repo URL: <URL>" output, CTRL+C results in

"""
^CTraceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1603, in _progress_update
    def _progress_update(self, download_total, downloaded, upload_total, uploaded):
KeyboardInterrupt

Process has been interrupted.
"""

... which is not subject of this BZ.

Comment 8 errata-xmlrpc 2017-09-06 12:27:53 UTC
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/RHSA-2017:2645


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