when client is terminated by an keyboardInterrupt, return code should be 130

Bug #1373231 reported by Rakesh H S
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Rakesh H S
python-novaclient
Fix Released
Low
Rakesh H S

Bug Description

---------------------------------
root@devstack:/opt/stack/python-neutronclient# glance image-list
^C... terminating glance client
root@devstack:/opt/stack/python-neutronclient# echo $?
1
---------------------------------

As shown above, the return code as of now is 1.

Since the client was terminated by an KeyboardInterrupt the return code should be 130. It is useful when people are writing automation test cases and want to validate based on the return code.

As of now, some of the clients such as:
cinderclient
heatclient
ironicclient
already report correclty as 130.

proposing the same for glanceclient and novaclient.

Revision history for this message
melanie witt (melwitt) wrote :

Code 130 is a special code to mean "Script terminated by Control-C" so I think this makes sense.

[1] http://tldp.org/LDP/abs/html/exitcodes.html

Changed in python-novaclient:
importance: Undecided → Low
status: New → Confirmed
Rakesh H S (rh-s)
Changed in python-novaclient:
assignee: nobody → Rakesh H S (rh-s)
Changed in python-glanceclient:
assignee: nobody → Rakesh H S (rh-s)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/123936
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=09f97e9ee43427d101c719ec26e8cd26dcd0e39d
Submitter: Jenkins
Branch: master

commit 09f97e9ee43427d101c719ec26e8cd26dcd0e39d
Author: Rakesh H S <email address hidden>
Date: Thu Sep 25 11:31:26 2014 +0530

    return 130 for keyboard interrupt

    when keyboard interrupt is received by novaclient, the return code as
    of now is 1.

    But since the client was terminated by an keyboard interrupt, the return
    code should be 130. (http://tldp.org/LDP/abs/html/exitcodes.html)
    It is useful when people are writing automation test cases and want to
    validate based on the return code.
    I have also changed the message that is printed on shell to match other
    clients.

    Change-Id: If544ade154c53b1f18518773f4d49cd335a394d0
    Closes-Bug: #1373231

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
milestone: none → v0.16.0
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/123934
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=96ff6e46c4e5c476b42399d9df016a468b2e1b6d
Submitter: Jenkins
Branch: master

commit 96ff6e46c4e5c476b42399d9df016a468b2e1b6d
Author: Rakesh H S <email address hidden>
Date: Thu Sep 25 11:19:31 2014 +0530

    Return 130 for keyboard interrupt

    When keyboard interrupt is received by glanceclient, the return code as
    of now is 1.

    But since the client was terminated by an keyboard interrupt, the return
    code should be 130. (http://tldp.org/LDP/abs/html/exitcodes.html)
    It is useful when people are writing automation test cases and want to
    validate based on the return code.

    Change-Id: Ia70116ab6f0708a0ce6eeaed07c1e7a56e68c9f4
    Closes-Bug: #1373231

Changed in python-glanceclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.21.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Changed in python-glanceclient:
status: Fix Committed → Fix Released
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.