Bug 1427231 - cdn-sync: better check disk space during downloading packages
Summary: cdn-sync: better check disk space during downloading packages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Martin Korbel
URL:
Whiteboard:
Depends On:
Blocks: 1340444
TreeView+ depends on / blocked
 
Reported: 2017-02-27 16:12 UTC by Jan Dobes
Modified: 2017-06-21 12:11 UTC (History)
3 users (show)

Fixed In Version: spacewalk-backend-2.5.3-91
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:11:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Dobes 2017-02-27 16:12:43 UTC
Description of problem:
If Satellite storage runs out of space during downloading packages, unhandled exception will occur.

...
13:36:50 6256/18457 : kernel-devel-2.6.32-358.23.2.el6.x86_64.rpm
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1105, in _retrieve
    self.fo.write(buf)
IOError: [Errno 28] No space left on device

Code can fail on other places too but downloading packages is the most risky stage and it would be nice to fix it at least there.

Actual results:
Exception not catched properly.

Expected results:
Catch exception and end.

Comment 1 Jan Dobes 2017-03-16 14:45:14 UTC
fixing printing empty lines when package was not downloaded for whatever reason, spacewalk master:

b298e39a5dc7c7a2839d1aac6d2950d9540e7239

Comment 3 Jan Dobes 2017-03-28 14:51:31 UTC
some fixes in spacewalk master:

421b49d671c9c992c10618472d7bbbc1442720bb
d1a9f5ccca28f47a4a4d09952a7753eb660b988f
ac9d079a84d94d2d35a40bec108d0ea3c1c65dd6

It will stop downloading and interrupts syncing completely. At least on RHEL 6 because there is KeyboardInterrupt raised when we run out of space.

Unfortunately, the message from comment #0 is still printed from urlgrabber code and we can't stop it. Another problem is behavior on RHEL 6 and RHEL 7 is quite different because of different versions of urlgrabber. It should be considered to replace yum and urlgrabber libraries with something more predictable.


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