Chinmay048 opened a new pull request, #13614:
URL: https://github.com/apache/cloudstack/pull/13614

   ### Description
   
   This PR fixes an issue where templates belonging to child accounts within a 
domain were not properly tracked during automated account and domain cleanup, 
causing domain deletion to fail due to orphaned storage resources.
   
   **Functional Changes:**
   * Updated `AccountManagerImpl.cleanupAccount` to explicitly check the 
boolean return value of `_tmpltMgr.delete(...)`.
   * Prevented the `allTemplatesDeleted` tracking flag from being overwritten 
on subsequent loop iterations if an earlier template deletion fails.
   * Ensured that any failed template deletion correctly sets 
`accountCleanupNeeded = true`, preventing premature domain teardowns when child 
resources remain active in secondary storage.
   
   ### Types of changes
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   
   ### Checklist:
   - [x] My code follows the code style of this project.
   - [x] I have read the **CONTRIBUTING** document.
   - [x] My changes generate no new warnings or checkstyle errors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to