Bug 630923 - TESTOUT.log is resent every 5 minutes in a whole: send only what's appended
Summary: TESTOUT.log is resent every 5 minutes in a whole: send only what's appended
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: beah
Version: 0.5
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Marian Csontos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 632609
TreeView+ depends on / blocked
 
Reported: 2010-09-07 11:46 UTC by Marian Csontos
Modified: 2011-09-28 15:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-10 14:58:47 UTC
Embargoed:


Attachments (Terms of Use)
rhts patch (6.35 KB, patch)
2010-09-07 12:07 UTC, Marian Csontos
no flags Details | Diff
python 2.2 incompatibility patch (1.61 KB, patch)
2010-09-08 04:33 UTC, Marian Csontos
no flags Details | Diff

Description Marian Csontos 2010-09-07 11:46:54 UTC
TESTOUT.log is sent to server every 5 minutes - see rhts-test-runner.sh.

Though it is growing, the file is send from offest 0 every time.

High priority due to the data-overload is known to cause problems on LC/Scheduler.
+ the change will save us lot of bandwidth.

Comment 1 Marian Csontos 2010-09-07 11:47:32 UTC
Testing the change.

Comment 2 Marian Csontos 2010-09-07 12:07:30 UTC
Created attachment 443493 [details]
rhts patch

Following patch works fine in el6. Testing on 3 to 5.

Comment 3 Bill Peck 2010-09-07 17:25:08 UTC
Hi Marian,

Slight issue when run on RHEL3.

https://beaker-stage.app.eng.bos.redhat.com/logs/2010/29/1429/2690/26412///TESTOUT.log

/distribution/install result: PASS
   metric: 441
   Log: /tmp/tmp.ir1820
   DMesg: /tmp/dmesg.log
Traceback (most recent call last):
  File "/usr/bin/rhts-db-submit-result", line 450, in ?
    main()
  File "/usr/bin/rhts-db-submit-result", line 398, in main
    (result, dmesgerrors)=check_for_errors(dmesgfile)
  File "/usr/bin/rhts-db-submit-result", line 305, in check_for_errors
    dmesg_log_file = mktemp_file()
  File "/usr/bin/rhts-db-submit-result", line 58, in mktemp_file
    (fh, f) = tempfile.mkstemp(prefix='tmp.rhts-db-submit-result.', dir='/tmp')
AttributeError: 'module' object has no attribute 'mkstemp'
/bin/cat: /mnt/testarea/modprobe.log: No such file or directory


I'm looking to see what can be done.

Comment 4 Bill Peck 2010-09-07 17:25:59 UTC
hmm assumed this was due to the new upload code.  but I'm not sure now.  

Still investigating.

Comment 5 Marian Csontos 2010-09-08 04:33:14 UTC
Created attachment 445840 [details]
python 2.2 incompatibility patch

There is not much to investigate: documentation [1] says:

> New in version 2.3.

RHEL3 uses Python2.2.

[1] http://docs.python.org/library/tempfile.html#tempfile.mkstemp7

Proposed patch: let python<=2.2 use mktemp and all above mkstemp.

IIUC mkstemp was introduced accidentally.

Comment 6 Marian Csontos 2010-09-08 07:23:31 UTC
Forget about previous comment. I have to admit embarrassingly I was not right:
- mkstemp has a purpose: mktemp does not create the file, just returns a new name.
- and worse: my "fix" is not python 2.2. compatible: mktemp change was not documented. I will not rely on documentation anymore...

Embracing Bill's change which I was not aware of.

The fix for original issue works just fine: see J:1438, J:1439 and J:1440.
I will retest the changes on el3 which is not verified yet.

Comment 7 Marian Csontos 2010-09-08 11:25:48 UTC
After some aborted jobs it's verified on el3 as well.

It's all on rhts.git's origin/master now.

Comment 8 Bill Peck 2010-09-08 12:29:44 UTC
Did you notice I already committed a patch for python2.2 to deal with mkstemp?

Comment 9 Bill Peck 2010-09-10 14:58:47 UTC
this has been pushed


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