Project

General

Profile

Actions

Bug #29699

closed

Foreman-maintain ends with wrong exit code.

Added by Suraj Patil over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
medium
Triaged:
No
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Related to Foreman Remote Execution - Tracker #29643: Capsule upgrade playbook trackerClosedSuresh Thirugnanasambandan

Actions
Actions

Also available in: Atom PDF