You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Mice Xia (JIRA)" <ji...@apache.org> on 2013/02/04 09:18:13 UTC

[jira] [Commented] (CLOUDSTACK-272) Delete failure message for network with a VM is not informative

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570058#comment-13570058 ] 

Mice Xia commented on CLOUDSTACK-272:
-------------------------------------

I think this deserves some discussion. 

As a common practice of cloudstack, NetworkService is a direct implementation of API, any methods implement APIs are supposed to check input API parameters, and throw exceptions if the parameters are not expected. Error message generated here are directly interpreted by API layer and exposed to end user. 

But for Manager layer, in this case, NetworkService.destroyNetwork calls NetworkManager.destroyNetwork, in which error message are logged but not return to its caller. The caller only knows if it is succssful (true) or fail (false), but for further reasons, users have to search log files.

IMO, It would be more user-friendly if we can provide more details when an operation fails, should we encourage developers to provide error msg up to APi layer, either by throwing exception (or as a part of return value)?


                
> Delete failure message for network with a VM is not informative
> ---------------------------------------------------------------
>
>                 Key: CLOUDSTACK-272
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-272
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: API
>    Affects Versions: pre-4.0.0
>            Reporter: David Noland
>             Fix For: 4.1.0
>
>
> The following delete network API call is failing because there is a VM running in the network:
> http://localhost:8080/client/api?command=deleteNetwork&id=ba5a58e8-a803-4ab1-9b1e-5389e03e2d58&response=json&sessionkey=VEubeThTbte%2FufpplNGM6NYHWlQ%3D&_=1349483483336
> The popup states: "Failed to delete network", which is coming from the JSON response:
> { "queryasyncjobresultresponse" : {"accountid":"d0236100-db1a-4262-939b-d5a235e87d35","userid":"9cffba2c-54c9-4fde-8b5d-7e62c01eb9ee","cmd":"com.cloud.api.commands.DeleteNetworkCmd","jobstatus":2,"jobprocstatus":0,"jobresultcode":530,"jobresulttype":"object","jobresult":{"errorcode":530,"errortext":"Failed to delete network"},"created":"2012-10-06T00:25:43+0000","jobid":"f3ee91a6-c4ca-48fb-bff5-8d2f5eee7a9d"} }
> This gives the user too little information on why the network deletion failed. The error message should state that the network could not be deleted because there are VM(s) still running in the network.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira