Bug 1418811

Summary: rteval is failing when running during the boot time
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Bristot de Oliveira <daolivei>
Component: rtevalAssignee: John Kacur <jkacur>
Status: CLOSED DUPLICATE QA Contact: Jiri Kastner <jkastner>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.4CC: bhu, jkacur, jkastner
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 00:06:23 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: 1353018    

Description Daniel Bristot de Oliveira 2017-02-02 19:12:10 UTC
Description of problem:
In the kvm-rt-cert scripts, we run rteval via a boot script. But now it is failing to run at boot time.

Version-Release number of selected component (if applicable):
rteval-2.9-1.el7_2.noarch
rteval-loads-1.3-3.el7.noarch
rteval-common-2.9-1.el7_2.noarch

How reproducible:
Always

Steps to Reproduce:

1. Add the following service:
------------------------- %< ----------------
# cat /usr/lib/systemd/system/kvm-rt-guest.service 
[Unit]
Description=Automated cyclictest run
After=tuned.service

[Service]
ExecStart=/usr/bin/load
TimeoutSec=0
RemainAfterExit=yes
WorkingDirectory=/root/bin
StandardOutput=tty
StandardError=tty

[Install]
WantedBy=multi-user.target
------------------------- >% ----------------

2. The following script and turn it executable:
-------------- %< -------------
# cat /usr/bin/load
#!/bin/sh

/usr/bin/rteval --onlyload --duration=1m --verbose
-------------- >% -------------

3. Enable the service:
# systemctl enable kvm-rt-guest

Reboot the box.


Actual results:

After the boot, rteval fails with the following message:
---------------- %< -------------------
    Traceback (most recent call last):
      File "/usr/bin/rteval", line 40, in <module>
        from rteval.Log import Log
      File "/usr/lib/python2.7/site-packages/rteval/__init__.py", line 37, in <module>
        from modules.loads import LoadModules
      File "/usr/lib/python2.7/site-packages/rteval/modules/__init__.py", line 26, in <module>
        from rteval.rtevalConfig import rtevalCfgSection
      File "/usr/lib/python2.7/site-packages/rteval/rtevalConfig.py", line 82, in <module>
        'srcdir'     : default_config_search(['loadsource']),
      File "/usr/lib/python2.7/site-packages/rteval/rtevalConfig.py", line 41, in default_config_search
        (os.getenv('SUDO_USER') or os.getenv('USER')) or ""), '.rteval'),
    TypeError: cannot concatenate 'str' and 'NoneType' objects
---------------- >% -------------------

Expected results:
No error messages

Additional info:

Comment 2 John Kacur 2017-03-21 00:06:23 UTC

*** This bug has been marked as a duplicate of bug 1312057 ***