Bug 1383303

Summary: rlService* will stop execution with less(1)
Product: [Fedora] Fedora Reporter: Alois Mahdal <amahdal>
Component: beakerlibAssignee: Dalibor Pospíšil <dapospis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: rawhideCC: amahdal, azelinka, bblaskov, dapospis, jprokes, jscotka, mkyral, muller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: beakerlib-1.13-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 08:47:24 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:

Description Alois Mahdal 2016-10-10 11:49:44 UTC
Description of problem
======================

Running a test in 1minutetip (OpenShift via ssh) Fedora 24, test will
stop on every rlService* as *less* is automatically executed.


Version-Release number of selected component
============================================

beakerlib-1.11-2.fc24
systemd-229-16.fc24


Additional info
===============

This seems as systemctl "feature" got in way of testing -- systemctl
"thinks" this is an interactive session and opens less(1) to allow user
to view status messages.

I guess it should be possible to always suppress this.

Comment 1 Alois Mahdal 2016-10-10 11:57:44 UTC
Just creating new test and adding

    rlServiceStart httpd

(and installing httpd on the machine) reproduced this, although I think it did not happen on *first* run.  I guess this (i.e. the ability of systemctl to false-detect interactive session) could be related to way how tests are exactly started.

By the way I'm running this roughly as

    urxvt -e "1minutetip ..."

Comment 2 Alois Mahdal 2016-10-10 12:32:42 UTC
Adding

    export PAGER=

to the test can be used as workaround (tested).

(Thx Brano for suggestion.)

Comment 3 Dalibor Pospíšil 2016-10-12 08:26:46 UTC
I'm not able to reproduce it, is it tight to urxvt only?

Comment 4 Dalibor Pospíšil 2016-10-12 08:27:39 UTC
Is there also another solution of this?

Comment 5 Alois Mahdal 2016-10-12 19:28:52 UTC
(In reply to Dalibor Pospíšil from comment #3)
> I'm not able to reproduce it, is it tight to urxvt only?

Also with xfce4-terminal, with that one it even happens on first run (unlime urxvt, where it happens on the second and later runs).

BTW I just upgraded my workstation to F24 (and qa-tools-workstation from 3.10-143 to from 3.10-144).

Comment 6 Dalibor Pospíšil 2016-10-14 06:47:29 UTC
It seems like the proper solution would be to call systemctl with --no-pager option but as we still use 'service' for handling services, the simplest solution would be to use environment variable PAGER as suggested in the workaround. At least until we migrate to systemctl for RHEL>=7 completely.

Comment 8 Dalibor Pospíšil 2016-11-16 12:56:11 UTC
*** Bug 1395622 has been marked as a duplicate of this bug. ***

Comment 9 Dalibor Pospíšil 2016-12-08 09:44:31 UTC
Recently I found out that some services, e.g. audit, cannot by handled correctly by systemctl. So I need to revert to service and therefor I will use PAGER variable for this.