Bug #29699
closedForeman-maintain ends with wrong exit code.
Description
foreman-maintain should not give exit code 1 if the check fails with warning status.
~~~
[root@foreman ~]# foreman-maintain health check --label disk-performance
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for recommended disk speed of pulp, mongodb, pgsql dir.:
\ Finished
Disk speed : 12 MB/sec [WARNING]
Slow disk detected /var/lib/pulp mounted on /dev/mapper/rhel-root.
Actual disk speed: 12 MB/sec
Expected disk speed: 60 MB/sec.
WARNING: Low disk speed might have a negative impact on the system.
See https://access.redhat.com/solutions/3397771 before proceeding
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.
The following steps ended up in warning state:
[disk-performance]
The steps in warning state itself might not mean there is an error,
but it should be reviewed to ensure the behavior is expected
[root@foreman ~]# echo $?
1
~~~
As the above command/process is completed without any ERROR it should return the exit code 0.