Cudet doesn't return error exit codes if a failure occurs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Won't Fix
|
Medium
|
Denis Meltsaykin | ||
Mitaka |
Confirmed
|
Medium
|
Denis Meltsaykin |
Bug Description
Detailed bug description:
Cudet doesn't return error codes if any failure occurs (due to invalid input or operational error). Only an error message (stack trace like) is returned.
Although this doesn't prevent from using the tool, it requires the operator to parse the string output in case of necessity to automate any tasks.
Steps to reproduce:
1. Deploy 9.1 master
2. Execute cudet to check customizations of a non-existing node or an env
Expected result: error message is returned along with the a non-zero exit code.
Actual result: error message is returned, still the exit code is 0, as below
[root@nailgun ~]# cudet -n 3456
There are no nodes to check
2016-09-26 07:46:27,824 WARNING (utils) No valid nodes were found which could fit filter parameters.
[root@nailgun ~]# echo $?
0
[root@nailgun ~]# cudet -e 3456
There are no nodes to check
2016-09-26 07:46:54,319 WARNING (utils) No valid nodes were found which could fit filter parameters.
[root@nailgun ~]# echo $?
0
The same applies to the error of not available online packages bd:
[root@nailgun ~]# cudet -n 8888
[ERROR] Could't load databases.
[root@nailgun ~]# echo $?
0
Description of the environment:
MOS 9.1, snapshot #301
Changed in fuel: | |
assignee: | MOS Maintenance (mos-maintenance) → Denis Meltsaykin (dmeltsaykin) |
status: | New → Confirmed |
Changed in fuel: | |
status: | Confirmed → Won't Fix |