Bug 676369 - rhnpush is crashing when pushing large rpm
Summary: rhnpush is crashing when pushing large rpm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space16
TreeView+ depends on / blocked
 
Reported: 2011-02-09 16:35 UTC by Honza Brázdil
Modified: 2011-12-22 16:50 UTC (History)
2 users (show)

Fixed In Version: spacewalk-backend-1.6.61-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-22 16:50:01 UTC
Embargoed:


Attachments (Terms of Use)
traceback (1.47 KB, text/plain)
2011-02-09 16:35 UTC, Honza Brázdil
no flags Details

Description Honza Brázdil 2011-02-09 16:35:27 UTC
Created attachment 477855 [details]
traceback

Description of problem:
rhnpush is crashing when pushing rpm bigger then 1/2 of the available disk space.
(f.e.: 500MB rpm, available disk space on server < 1000MB)


Version-Release number of selected component (if applicable):
rhnpush-5.5.16-1.el5
spacewalk-backend-1.4.5-1.el5

How reproducible:
always

Steps to Reproduce:
1. make large rpm (400MB) 
2. tune2fs -l ROOT_PARTITION -m 0
3. dd if=/dev/zero of=/tmp/bigfile01 bs=1M count=720 (1.8 * rpm size)
4. dd if=/dev/zero of=/tmp/bigfile02 bs=1M
5. rm /tmp/bigfile01
6. rhnpush the large rpm
  
Actual results:
rhnpush crashes with Internal server error 500

Expected results:
some nice error message describing what's going on

Comment 2 Miroslav Suchý 2011-04-11 07:33:47 UTC
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.

Comment 3 Miroslav Suchý 2011-04-11 07:37:17 UTC
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.

Comment 4 Jan Pazdziora 2011-07-20 11:52:13 UTC
Aligning under space16.

Comment 5 Michael Mráka 2011-12-05 12:20:30 UTC
This bug is caused by fact that backend stores uploaded file into temp file (in /tmp) and then copies it over to the /var/satellite. After applying commit below temp file is created under /var/satellite and moved to the right place so we always work with only one copy of package.


Spacewalk master commits:
commit 580b4e6015ddf7a3402ea6e8b7f97197d12123e5
    676369 - unlink old file when forced
commit c9d894c679bea0e556774d0708cfa593eaebea28
    676369 - sync packages directly to /var/satellite
commit 2dbe4deade884d410f93bfcd30947bb77dd18e88
    676369 - move package to the final location
commit dc547088d8b9b85be4d0ec57bee54fc81e10cdfd
    676369 - create tempfile under /var/satellite
    so we can move it (not copy) to the final location

Comment 6 Ionuț Arțăriși 2011-12-06 10:57:13 UTC
Hello.

Is there any specific reason for using the "protected" _dirSetAttr method in yum_src.py?

Simply setting repo.pkgdir before calling repo.setup() looks like it should be enough (and compatible with older yum versions which do not contain the _dirSetAttr method). Alternatively, in newer versions, repo.pkgdir is a property which calls _dirSetAttr behind the scenes so even that should be better than violating the API by calling _dirSetAttr directly.

Comment 7 Michael Mráka 2011-12-06 13:06:19 UTC
Hi Ionuț,

no special reason, I've changed it according to your proposal. Thanks.

commit d698c2e547dbb51b85c765b025d7331cf085e7a0
    676369 - set pkgdir directly not via private API

Comment 9 Michael Mráka 2011-12-08 15:39:18 UTC
One more commit to create missing directories:

commit 1102424615dd1e48ef016b07576c0e55c2c5891b
    676369 - directory may not exist

Comment 10 Michael Mráka 2011-12-15 15:51:29 UTC
Two more commits
commit c89748987a146686431cc4a8c84569040112731a
    676369 - create pkgdir with appropriate user and group
commit 8d701bd33b932325fefae936955160f7503ba4ea
    676369 - put downloaded packages into stage

Comment 11 Milan Zázrivec 2011-12-22 16:50:01 UTC
Spacewalk 1.6 has been released.


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