Neutron CLI exits with 0 on failure

Bug #1623169 reported by Xiang Wang
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
High
Unassigned

Bug Description

With python-neutronclient 6.0.0 installed, when running the following commands, the output is 0. A return code of 1 is expected.

root@controller1:~# neutron net-delete blah
Unable to find network with name or id 'blah'
root@controller1:~# echo $?
0

In python-neutronclient 5.1.0, the return code is 1.

Changed in python-neutronclient:
assignee: nobody → Reedip (reedip-banerjee)
Richard Theis (rtheis)
tags: added: newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/375810

Changed in python-neutronclient:
status: New → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This affects shell scripts using neutron CLI.

Changed in python-neutronclient:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/375810
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=9ecea3bbf1d4664f2a70f9a6caac88120d7c119b
Submitter: Jenkins
Branch: master

commit 9ecea3bbf1d4664f2a70f9a6caac88120d7c119b
Author: Reedip <email address hidden>
Date: Sat Sep 24 11:29:38 2016 +0530

    Return proper error code for CLI failure

    Due to [1] , the return code which was expected from
    NeutronClient changed if a particular CLI failed to
    find an object belonging to the resource to be deleted.
    The following patch fixes it.
    [1]: https://review.openstack.org/#/c/263609/

    Change-Id: I19b4328361157fbca3e557e02797ed0c895e924b
    Closes-Bug:#1623169

Changed in python-neutronclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.1.0

This issue was fixed in the openstack/python-neutronclient 6.1.0 release.

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.