Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1609330

Summary: RFE restraint should have a log similar to beah's /mnt/testarea/current.log
Product: [Retired] Restraint Reporter: Jan Tluka <jtluka>
Component: generalAssignee: Carol Bouchard <cbouchar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.1.32CC: asavkov, azelinka, bpeck, cbouchar, mastyk, mstowell
Target Milestone: 0.1.40   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1700886 (view as bug list) Environment:
Last Closed: 2019-04-18 12:42:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1700886    

Description Jan Tluka 2018-07-27 15:21:48 UTC
Description of problem:

Compared to beah restraint streams the task log to beaker on the fly. It would be good to have the log available before task completes. For example to be able to parse the log content from inside of the task.

Beah provides such log in file /mnt/testarea/current.log

This is a regression from beah for making restraint the default harness.

Version-Release number of selected component (if applicable):
restraint-0.1.32-1.el8+5

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
Current task log is streamed to Beaker directly.

Expected results:
Current task log should be also available as a file on the testing system.

Additional info:

Comment 2 Bill Peck 2019-04-09 18:34:22 UTC
This might be resolved by changing the systemd unit file for restraintd to log it's output to a file.  But it would be one log for the entire life of the job run, not per task run.  But I would argue this would be cleaner and more unix like.

Comment 3 Carol Bouchard 2019-04-11 14:31:36 UTC
I've been investigating this bug.  I'm using restraint and I'm seeing /mnt/testarea/current.log is intact while it is also being streamed to beaker.  Are you still experiencing problems in this area?

Comment 4 Jan Tluka 2019-04-11 15:31:52 UTC
(In reply to Carol Bouchard from comment #3)
> I've been investigating this bug.  I'm using restraint and I'm seeing
> /mnt/testarea/current.log is intact while it is also being streamed to
> beaker.  Are you still experiencing problems in this area?

Could you describe how do you run restraint?

I've checked a beaker machine while running beaker tasks through restraint but the log is not there:

[root@wsfd-netdev42 ~]# ls /mnt/testarea/current.log
ls: cannot access '/mnt/testarea/current.log': No such file or directory

[root@wsfd-netdev42 ~]# rpm -qa restraint
restraint-0.1.39-1.el8bkr.x86_64

[root@wsfd-netdev42 ~]# pstree -alp

  ├─restraintd,5766
  │   ├─10_bash_login,23613 -l /usr/share/restraint/plugins/task_run.d/10_bash_login /usr/share/restraint/plugins/task_run.d/15_beakerlib /usr/share/restraint/plugins/task_run.d/20_unconfined /usr/share/restraint/plugins/task_run.d/25_environment /usr/share/restraint/plugins/task_run.d/30_restore_events /usr/share/restraint/plugins/task_run.d/35_oom_adj make run
  │   │   └─make,23634 run
  │   │       └─runtest.sh,23648 ./runtest.sh
  │   │           └─rhts-run-simple,23649 /usr/bin/rhts-run-simple-test /kernel/distribution/lnst/run-recipe ./do-my-test
  │   │               ├─rhts-run-simple,23654 /usr/bin/rhts-run-simple-test /kernel/distribution/lnst/run-recipe ./do-my-test
  │   │               │   └─do-my-test,23657 ./do-my-test
  │   │               │       ├─do-my-test,23672 ./do-my-test
  │   │               │       │   └─lnst-ctl,23674 /usr/bin/lnst-ctl -t /mnt/testarea/lnst_output.html -s /usr/share/lnst/result_xslt/xml_to_html.xsl -d --pools /mnt/testarea/lnst-pool -A ipv=ipv4 -A driver=ixgbe -A netperf_duration=60 -A nperf_cpupin=5 -A netdev_cpupin=0 -A nperf_protocols=tcp udp -A product_name=RHEL8 -A official_result=no run /usr/share/lnst/recipes/regression_tests/phase1/simple_netperf.xml
  │   │               │       └─tee,23673 -a /mnt/testarea/lnst_current_log
  │   │               └─tee,23655 /mnt/testarea/tmp.Eus4pq


Beaker job used for this check https://beaker.engineering.redhat.com/recipes/6731218#tasks

Comment 6 Martin Styk 2019-09-10 05:57:14 UTC
Restraint 0.1.40 has been released.