You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Rohit Yadav (JIRA)" <ji...@apache.org> on 2014/10/30 11:12:34 UTC

[jira] [Resolved] (CLOUDSTACK-7669) Cloudmonkey does not return a failure exit code on error

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-7669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Yadav resolved CLOUDSTACK-7669.
-------------------------------------
    Resolution: Fixed

The current fix simply returns non-zero exit code (1 actually), if during single command run the api call fails from mgmt server's side. It will still return 0 in case a set command or printing within cloudmonkey failed. In future, when we'll refactor cloudmonkey we can do a better job at using different exit codes etc.

> Cloudmonkey does not return a failure exit code on error
> --------------------------------------------------------
>
>                 Key: CLOUDSTACK-7669
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7669
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Cloudmonkey
>         Environment: $ cloudmonkey --version
> cloudmonkey 5.2.0
> Command Line Interface for Apache CloudStack (http://cloudstack.apache.org)
>            Reporter: Shalom Bhooshi
>            Assignee: Rohit Yadav
>
> {code}
> # cloudmonkey --version
> cloudmonkey 5.2.0
> Command Line Interface for Apache CloudStack (http://cloudstack.apache.org)
> # $SHELL --version
> GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)
> {code}
> It is difficult to tell whether cloudmonkey has successfully executed an API call when the backend fails. Cloudmonkey ought to return a non-zero exit code on any error/unexpected failure.
> {code}
> #  if zones=$(cloudmonkey list zones); then 
> >   echo "zones data is $zones";
> > fi
> zones data is 404 Client Error: Not Found
> # cloudmonkey list zones; echo $?
> 404 Client Error: Not Found
> 0
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)