Description of problem: rlRun contain -l) DO_LOG=true; [ -n "$LOG_FILE" ] || LOG_FILE=$( mktemp --tmpdir=$__INTERNAL_PERSISTENT_TMP ) shift;; -c) DO_LOG=true; DO_CON=true; LOG_FILE=$( mktemp --tmpdir=$__INTERNAL_PERSISTENT_TMP ) shift;; which sets DO_LOG=true and fails to set LOG_FILE because on RHEL-5 mktemp doesn't support --tmpdir option. later on LOG_FILE is set to /dev/null via [ -n "$LOG_FILE" ] || LOG_FILE="/dev/null" at the end of the function there is: elif $DO_LOG; then rm $LOG_FILE fi which removes /dev/null. Beside fixing the --tmpdir issue I think either of following options would do the job. set [ -n "$LOG_FILE" ] || LOG_FILE="/dev/null" && DO_LOG=false or elif $DO_LOG && [ "$LOG_FILE" != /dev/null ]; then rm $LOG_FILE I am using beakerlib-1.7-1
(In reply to Karel Srot from comment #0) > Beside fixing the --tmpdir issue "tmpdir -p $__INTERNAL_PERSISTENT_TMP" should do the job
*** Bug 968381 has been marked as a duplicate of this bug. ***
Moving this to internal product, as I will fix this in RHEL packages only.
Or not.
Okay: when LOG_FILE fails to be created (and /dev/null is used instead), it's probably a BeakerLib problem. In this case the advanced switches are turned off, and therefore the LOG_FILE is not erased. https://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=13af1c5d7be9c3d40f5b74ea3c3e15419edf9c98
And this part is clearly not urgent (the --tmpdir part probably is, but that's different story)
(In reply to Petr Muller from comment #6) > And this part is clearly not urgent (the --tmpdir part probably is, but > that's different story) If /dev/null is deleted it is recreated as a regular file by any script running >/dev/null. Such a file has wrong selinux context and various services (and therefore also a lot of tests) do not work properly because they cannot access /dev/null (snmpd as an example).
Yep, but /dev/null should be never used for logging in the first place. When the tmp file is created, then /dev/null is not used and therefore not removed. This remains simply a robustification and better handling of weird error states, but with the wrong mktemp call, we are *causing* weird error state. But, it's just paper pushing. I'll try to push both fixes in one batch, and will try to do it soon.
beakerlib-1.8-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/beakerlib-1.8-1.fc19
Package beakerlib-1.8-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing beakerlib-1.8-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-10465/beakerlib-1.8-1.fc19 then log in and leave karma (feedback).
beakerlib-1.8-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.