Cudet doesn't return error exit codes if a failure occurs

Bug #1627622 reported by Dmitriy Kruglov
6
This bug affects 1 person
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
Roman Vyalov (r0mikiam)
Changed in fuel:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.