CLOUDSTACK-8022: [Automation] Deletion of Domain with Cleanup set to "true" fails

Changes:

-  This is a race condition between the deleteDomain thread and AccountChecker thread. DeleteDomain thread marks the domain as inactive and proceeds for cleanup, AccountChecker thread that runs at the same time cleans up any domains marked as inactive.
-  When the DeleteDomain thread finds that domain is already removed, it need not error out since the domain deletion has already happened
This commit is contained in:
Prachi Damle 2014-12-16 16:26:16 -08:00
parent 01ae7120ac
commit 1c5e8ebb31

View File

@ -154,8 +154,8 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
DomainVO domain = findById(id);
if (domain == null) {
s_logger.error("Unable to remove domain as domain " + id + " no longer exists");
return false;
s_logger.info("Unable to remove domain as domain " + id + " no longer exists");
return true;
}
if (domain.getParent() == null) {