From 141a71b518f2a051917e287683013b97785f360f Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Tue, 16 Dec 2014 16:26:16 -0800 Subject: [PATCH] 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 --- engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java b/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java index e02daf16667..4c4fe86e3c8 100644 --- a/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java +++ b/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java @@ -154,8 +154,8 @@ public class DomainDaoImpl extends GenericDaoBase 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) {