Bug 1105485

Summary: phase with ERRORs does PASS anyway
Product: [Fedora] Fedora Reporter: Martin Žember <mzember>
Component: beakerlibAssignee: Petr Muller <pmuller>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: ebenes, ohudlick, pmuller, psplicha
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-06 10:53:37 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:
Attachments:
Description Flags
squid.conf from RHEL6 that does not work in RHEL7 and causes the service not to start none

Description Martin Žember 2014-06-06 09:10:08 UTC
Created attachment 902822 [details]
squid.conf from RHEL6 that does not work in RHEL7 and causes the service not to start

Description of problem:
Setup phase PASSes even when there are errors.

Version-Release number of selected component (if applicable):
beakerlib-1.8-1.el7

How reproducible:
Always

Steps to Reproduce:
1. put a rlServiceStart call into a phase, e.g. rlServiceStart squid
2. ensure that the service will have a problem to start, e.g. garble its configuration file (a sample configuration file for this is attached)
3. make run
4. service does not start, says ERROR, but the phase PASSes anyway

Actual results:

:: [   ERROR  ] :: rlServiceStart: Starting service squid failed
:: [   ERROR  ] :: Status of the failed service:
:: [   LOG    ] ::   Redirecting to /bin/systemctl status  squid.service
:: [   LOG    ] ::   squid.service - Squid caching proxy
:: [   LOG    ] ::   Loaded: loaded (/usr/lib/systemd/system/squid.service; disabled)
:: [   LOG    ] ::   Active: failed (Result: exit-code) since Mon 2014-06-02 21:55:57 CEST; 527ms ago
:: [   LOG    ] ::   Process: 23323 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=1/FAILURE)
:: [   LOG    ] ::   Process: 23316 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)
:: [   LOG    ] ::   .....[snipped, reveals internal hostnames]... systemd[1]: Unit squid.service entered failed state.
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: Setup

Expected results:
:: [   FAIL   ] :: RESULT: Setup


Additional info:

Comment 1 Petr Muller 2014-06-06 10:53:37 UTC
That is expected. It is intentional that no non-rlAssert* function ever directly affects the result of the phase. If the result of rlServiceX is somehow important, its RC needs to be checked with rlAssert0 or perhaps even rlRun, just as any other command.