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

Namita Chaudhari commented on CLOUDSTACK-4322:
----------------------------------------------

I tried to delete a domain with force option:
1) The domain gets deleted successfully when the accounts under that domain 
does not need cleanup.
2) The domain does not get deleted, when the accounts under that domain needs 
cleanup. It throws an exception saying "Failed to clean up domain resources and 
sub domains, delete failed on domain".

I traversed through the code and the flow of the code is such that when a 
request is sent to delete a domain it first changes the state of domain to 
"Inactive", cleanup the accounts under those domain and then delete the domain. 
But if the resources of those accounts are referenced elsewhere, then the 
accounts and domain are not deleted and the domain is reverted back to Active 
state.

> Delete domain with force option is not returning failed as response incase of 
> accounts under that domain needs cleanup.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4322
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4322
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API
>    Affects Versions: 4.1.0, 4.2.0
>            Reporter: Sanjay Tripathi
>             Fix For: Future
>
>
> deleteDomain with cleanup = true, CS is not allowing deletion of domain if 
> there is any account under that domain needs clean up; though these accounts 
> are removed and admin can't see them in the listaccounts call. 
> From the end user perspective, CS should return success in case of force 
> delete domain and handle the cleanup of sub-domains/accounts internally.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to