Bug 525876 - rlBundleLogs , error when working dir in only readable
Summary: rlBundleLogs , error when working dir in only readable
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-26 15:33 UTC by Petr Sklenar
Modified: 2016-09-20 02:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 11:39:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2009-09-26 15:33:01 UTC
Description of problem:
rlBundleLogs , error when working dir in only readable

Version-Release number of selected component (if applicable):
rhtslib from rhts, 
beaker-lib-0.4.8-1.fc10

How reproducible:
always

Steps to Reproduce:

1. cd /mnt/redhat/something # its only readable dir
2. 
rlBundleLogs satellite-logs  /var/log/rhn/* /var/log/spacewalk/schema-upgrade/* /var/log/messages /var/log/tomcat5/catalina.out /var/spool/mail/root

rlBundleLogs var-log-whole-dir `find /var/log -type f`
  
Actual results:
traceback

:: [09:27:48] ::  I am sending many logs ... 
:: [09:27:49] ::  Bundling logs
mkdir: cannot create directory `satellite-logs.90831_264552_2158844': Read-only file system
:: [09:27:49] :: [ INFO    ] :: rlBundleLogs: Adding '/var/log/rhn/install_db.log.1' as '_var_log_rhn_install_db.log.1'
cp: cannot create regular file `satellite-logs.90831_264552_2158844/_var_log_rhn_install_db.log.1': No such file or directory
:: [09:27:49] :: [ ERROR   ] :: rlBundleLogs: '/var/log/rhn/install_db.log.1' can't be packed
:: [09:27:49] :: [ INFO    ] :: rlBundleLogs: Adding '/var/log/rhn/osa-dispatcher.log' as '_var_log_rhn_osa-dispatcher.log'
cp: cannot create regular file `satellite-logs.90831_264552_2158844/_var_log_rhn_osa-dispatcher.log': No such file or directory

later:

Traceback (most recent call last):
  File "/usr/bin/rhts_submit_log", line 85, in ?
    main()
  File "/usr/bin/rhts_submit_log", line 81, in main
    report_log(recipetestid, logname)
  File "/usr/bin/rhts_submit_log", line 35, in report_log
    rhts.uploadWrapper(session, logname, recipetestid)
  File "/usr/share/rhts/lib/rhts/__init__.py", line 119, in uploadWrapper
    fo = file(localfile, "r")  #specify bufsize?
IOError: [Errno 2] No such file or directory: 'satellite-logs.90831_264552_2158844.tar.gz'


see log:
http://rhts.redhat.com/testlogs/2009/09/90830/264550/2158836/TESTOUT.log

Expected results:
rlBundleLogs could use some writeable work dir (for.ex. `mktemp -d`) instead of actual dir

Additional info:

Comment 1 Petr Muller 2011-04-11 16:06:28 UTC
I believe this was fixed over time. Can you check, please?

Comment 2 Petr Sklenar 2011-04-12 09:48:38 UTC
It works as expected:

# rpm -qf /usr/lib/beakerlib/beakerlib.sh
beakerlib-redhat-1-2.el6.noarch

# pwd
/mnt/redhat/brewroot

# rlBundleLogs my-logs  /var/log/messages
:: [05:46:55] ::  Bundling logs
Argh Blargh!: 2
:: [05:46:55] :: [ INFO    ] :: rlBundleLogs: Adding '/var/log/messages' as '_var_log_messages'
Argh Blargh!: 2
tar: Removing leading `/' from member names
:: [05:46:56] :: [ INFO    ] :: Sending /tmp/my-logs.__.tar.gz as tmp-my-logs.__.tar.gz
Argh Blargh!: 2
:: [05:46:56] ::  File '/tmp/tmp.FF3rKOrZlF/tmp-my-logs.__.tar.gz' stored here: /tmp/BEAKERLIB_STORED_tmp-my-logs.__.tar.gz
Argh Blargh!: 2


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