kiranchavala opened a new issue, #13612:
URL: https://github.com/apache/cloudstack/issues/13612

   ### problem
   
   Unable to clean up template when domain is deleted 
   
   ### versions
   
   ACS 4.22.1
   
   ### The steps to reproduce the bug
   
   1. Create a domain ( d1) 
   2. Create a account under the domain  ( u1d1 )  
   3. Register a template under the account 
   4. Global setting "account.cleanup.interval" is set to default value of 86400
   Db entries 
   
   ```
   select * from domain where id=2
   *************************** 2. row ***************************
               id: 2
           parent: 1
             name: d1
             uuid: 96cf32d0-09e1-4931-8162-c334184254f5
            owner: 2
             path: /d1/
            level: 1
      child_count: 0
   next_child_seq: 1
          created: 2026-06-29 11:09:47
          removed: NULL
            state: Active
   network_domain: NULL
             type: Normal
   
   mysql> select * from account  where id=10 \G;
   *************************** 1. row ***************************
                id: 10
      account_name: u1d1
              uuid: c05ab2d9-4364-469a-9b0e-8d4463c873f7
              type: 0
           role_id: 4
         domain_id: 2
             state: enabled
           created: 2026-07-14 09:43:29
           removed: NULL
    cleanup_needed: 0
    network_domain: NULL
   default_zone_id: NULL
           default: 0
    api_key_access: NULL
   1 row in set (0.00 sec)
   
   mysql> select * from vm_template where account_id=10 \G;
   *************************** 1. row ***************************
                      id: 214
             unique_name: 214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0
                    name: u1d1-template
                    uuid: 29a548f3-ca4d-42ae-acee-2afd73b72c94
                  public: 0
                featured: 0
                    type: USER
                     hvm: 1
                    bits: 64
                     url: 
http://192.168.55.204/ubuntu24-cloud-image-root-password-with-tools.qcow2
                  format: QCOW2
                 created: 2026-07-14 09:44:56
                 removed: NULL
              account_id: 10
                checksum: 
{SHA-512}f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be
            display_text: u1d1-template
         enable_password: 0
           enable_sshkey: 0
             guest_os_id: 360
                bootable: 1
             prepopulate: 0
             cross_zones: 0
             extractable: 0
         hypervisor_type: KVM
      source_template_id: NULL
            template_tag: NULL
                sort_key: 0
                    size: 3758096384
                   state: Active
            update_count: 0
                 updated: NULL
    dynamically_scalable: 0
      parent_template_id: NULL
         direct_download: 0
            deploy_as_is: 0
            user_data_id: NULL
   user_data_link_policy: NULL
                    arch: x86_64
                 for_cks: 0
            extension_id: NULL
   1 row in set (0.00 sec)
   
   ```
   
   4. Delete the domain > Exception 
   
   <img width="1583" height="402" alt="Image" 
src="https://github.com/user-attachments/assets/cf386867-0629-48ed-ac52-7f7c1b438795";
 />
   
   5. Check the logs 
   
   ```
   2026-07-14 10:11:33,314 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Access granted to Account 
[{"accountName":"admin","id":2,"uuid":"887ba2b9-6648-11f1-afab-bc2411acabdc"}] 
to Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 by AffinityGroupAccessChecker
   2026-07-14 10:11:33,314 WARN  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Failed to delete template Template 
{"format":"QCOW2","id":214,"name":"u1d1-template","uniqueName":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","uuid":"29a548f3-ca4d-42ae-acee-2afd73b72c94"}
 while removing account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
due to: com.cloud.exception.InvalidParameterValueException: Unable to find 
account 10
        at 
com.cloud.resourcelimit.ResourceLimitManagerImpl.recalculateResourceCount(ResourceLimitManagerImpl.java:1152)
        at 
com.cloud.resourcelimit.ResourceLimitManagerImpl.recalculateResourceCount(ResourceLimitManagerImpl.java:1187)
        at 
com.cloud.template.HypervisorTemplateAdapter.delete(HypervisorTemplateAdapter.java:580)
   
   ```
   
   6. Check the db entries 
   
   account is removed. 
   
   ```
   
   mysql> select * from account  where id=10 \G;
   *************************** 1. row ***************************
                id: 10
      account_name: u1d1
              uuid: c05ab2d9-4364-469a-9b0e-8d4463c873f7
              type: 0
           role_id: 4
         domain_id: 2
             state: removed
           created: 2026-07-14 09:43:29
           removed: 2026-07-14 10:11:33
    cleanup_needed: 1
    network_domain: NULL
   default_zone_id: NULL
           default: 0
    api_key_access: NULL
   1 row in set (0.00 sec)
   
   Tempalte is set to inactive and removed date is populated 
   
   mysql> select * from vm_template where account_id=10 \G;
   *************************** 1. row ***************************
                      id: 214
             unique_name: 214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0
                    name: u1d1-template
                    uuid: 29a548f3-ca4d-42ae-acee-2afd73b72c94
                  public: 0
                featured: 0
                    type: USER
                     hvm: 1
                    bits: 64
                     url: 
http://192.168.55.204/ubuntu24-cloud-image-root-password-with-tools.qcow2
                  format: QCOW2
                 created: 2026-07-14 09:44:56
                 removed: 2026-07-14 10:11:33
              account_id: 10
                checksum: 
{SHA-512}f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be
            display_text: u1d1-template
         enable_password: 0
           enable_sshkey: 0
             guest_os_id: 360
                bootable: 1
             prepopulate: 0
             cross_zones: 0
             extractable: 0
         hypervisor_type: KVM
      source_template_id: NULL
            template_tag: NULL
                sort_key: 0
                    size: 3758096384
                   state: Inactive
            update_count: 0
                 updated: NULL
    dynamically_scalable: 0
      parent_template_id: NULL
         direct_download: 0
            deploy_as_is: 0
            user_data_id: NULL
   user_data_link_policy: NULL
                    arch: x86_64
                 for_cks: 0
            extension_id: NULL
   1 row in set (0.00 sec)
   
   
   ```
   
   
   Complete log
   
   ```
   root@Cloudstack-422:/home/ubuntu# cat  
/var/log/cloudstack/management/management-server.log |grep -i "logid:1f365b3f"
   2026-07-14 10:11:33,045 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl$5] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Executing 
AsyncJob 
{"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.domain.DeleteDomainCmd","cmdInfo":"{\"cleanup\":\"true\",\"response\":\"json\",\"ctxUserId\":\"2\",\"sessionkey\":\"lxysX_vE4u7C6FaeNg0e9DZzMrs\",\"httpmethod\":\"POST\",\"ctxStartEventId\":\"26007\",\"id\":\"96cf32d0-09e1-4931-8162-c334184254f5\",\"ctxDetails\":\"{\\\"interface
 
com.cloud.domain.Domain\\\":\\\"96cf32d0-09e1-4931-8162-c334184254f5\\\"}\",\"ctxAccountId\":\"2\",\"uuid\":\"96cf32d0-09e1-4931-8162-c334184254f5\",\"cmdEventType\":\"DOMAIN.DELETE\"}","cmdVersion":0,"completeMsid":null,"created":null,"id":1134,"initMsid":206863101373404,"instanceId":2,"instanceType":"Domain","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"1f365b3f-c422-4d54-9633-2e0475241902"}
   2026-07-14 10:11:33,058 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Access granted to Account 
[{"accountName":"admin","id":2,"uuid":"887ba2b9-6648-11f1-afab-bc2411acabdc"}] 
to Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 by AffinityGroupAccessChecker
   2026-07-14 10:11:33,059 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Marking domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 as Inactive before actually deleting it
   2026-07-14 10:11:33,068 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Cleaning up domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
   2026-07-14 10:11:33,069 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Deleting account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
as a part of domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 cleanup
   2026-07-14 10:11:33,093 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Removed account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,105 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Successfully deleted snapshots directories for all volumes under account 
Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
across all zones
   2026-07-14 10:11:33,117 INFO  [c.c.t.HypervisorTemplateAdapter] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Delete template: Template 
{"format":"QCOW2","id":214,"name":"u1d1-template","uniqueName":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","uuid":"29a548f3-ca4d-42ae-acee-2afd73b72c94"}
 from image store: ImageStore 
{"id":2,"name":"sec1","uuid":"35d1d1de-d3cc-4522-b8e9-dc5eaf5d5a17"}
   2026-07-14 10:11:33,117 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
template Template 
{"format":"QCOW2","id":214,"name":"u1d1-template","uniqueName":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","uuid":"29a548f3-ca4d-42ae-acee-2afd73b72c94"}
 with id 214 is already in store:ImageStore 
{"id":2,"name":"sec1","uuid":"35d1d1de-d3cc-4522-b8e9-dc5eaf5d5a17"}, type: 
Image
   2026-07-14 10:11:33,130 DEBUG [c.c.h.XenServerGuru] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) We 
are returning the default host to execute commands because the command is not 
of Copy type.
   2026-07-14 10:11:33,131 DEBUG [c.c.a.m.ClusteredAgentManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Wait time setting on org.apache.cloudstack.storage.command.DeleteCommand is 
1800 seconds
   2026-07-14 10:11:33,132 DEBUG [c.c.a.m.ClusteredAgentAttache] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Seq 4-7106117262037221705: Routed from 206863101373404
   2026-07-14 10:11:33,133 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Seq 5-7106117262037221705: Sending  { Cmd , MgmtId: 206863101373404, via: 
5(s-7-VM), Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/10/214/db9cf2b0-c6d2-3e89-8715-d2e42ca8976e.qcow2","origUrl":"http://192.168.55.204/ubuntu24-cloud-image-root-password-with-tools.qcow2","uuid":"29a548f3-ca4d-42ae-acee-2afd73b72c94","id":"214","format":"QCOW2","accountId":"10","checksum":"{SHA-512}f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be","hvm":"true","displayText":"u1d1-template","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://192.168.55.204/export/secondary","_role":"Image"}},"name":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","size":";(3.50
 GB) 3758096384","
 
hypervisorType":"KVM","bootable":"false","uniqueName":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"wait":"0","bypassHostMaintenance":"false"}}]
 }
   2026-07-14 10:11:33,262 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Seq 5-7106117262037221705: Received:  { Ans: , MgmtId: 206863101373404, via: 
5(s-7-VM), Ver: v1, Flags: 10, { Answer } }
   2026-07-14 10:11:33,304 DEBUG [c.c.r.ResourceLimitManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Updating resource Type = template count for Account with id = 10 Operation = 
decreasing Amount = 1
   2026-07-14 10:11:33,314 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Access granted to Account 
[{"accountName":"admin","id":2,"uuid":"887ba2b9-6648-11f1-afab-bc2411acabdc"}] 
to Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 by AffinityGroupAccessChecker
   2026-07-14 10:11:33,314 WARN  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Failed to delete template Template 
{"format":"QCOW2","id":214,"name":"u1d1-template","uniqueName":"214-10-48abb1e2-30e5-3db6-8dc3-ba1947b956f0","uuid":"29a548f3-ca4d-42ae-acee-2afd73b72c94"}
 while removing account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
due to: com.cloud.exception.InvalidParameterValueException: Unable to find 
account 10
   2026-07-14 10:11:33,315 WARN  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Failed to delete Templates while removing Account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,318 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Expunging # of Instances (Account=Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]):
 0
   2026-07-14 10:11:33,327 INFO  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
deleteAccount: Deleted 1 network groups for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,328 INFO  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
deleteAccount: Deleted 0 affinity groups for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,328 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Deleting networks for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,328 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Deleting vpcs for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,330 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Deleting site-to-site VPN customer gateways for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,334 DEBUG [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Account specific Virtual IP ranges are successfully released as a part of 
account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
cleanup.
   2026-07-14 10:11:33,339 INFO  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
deleteAccount: Released 0 dedicated guest vlan ranges from account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}]
   2026-07-14 10:11:33,340 DEBUG [c.c.r.ResourceLimitManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Updating resource Type = secondary_storage count for Account with id = 10 
Operation = decreasing Amount = (3.50 GB) 3758096384
   2026-07-14 10:11:33,360 INFO  [c.c.u.AccountManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Cleanup for account Account 
[{"accountName":"u1d1","id":10,"uuid":"c05ab2d9-4364-469a-9b0e-8d4463c873f7"}] 
is needed.
   2026-07-14 10:11:33,367 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Deleting networks for domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
   2026-07-14 10:11:33,368 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Can't delete the domain yet because it has 1accounts that need a cleanup
   2026-07-14 10:11:33,369 ERROR [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Exception deleting domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 com.cloud.utils.exception.CloudRuntimeException: Failed to clean up domain 
resources and sub domains, delete failed on domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
   2026-07-14 10:11:33,369 DEBUG [c.c.u.DomainManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134, ctx-b3bb3ec7]) (logid:1f365b3f) 
Changing domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
 state back to Active because it can't be removed due to resources referencing 
to it
   2026-07-14 10:11:33,393 ERROR [c.c.a.ApiAsyncJobDispatcher] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Unexpected 
exception while executing 
org.apache.cloudstack.api.command.admin.domain.DeleteDomainCmd 
com.cloud.utils.exception.CloudRuntimeException: Failed to clean up domain 
resources and sub domains, delete failed on domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}
   2026-07-14 10:11:33,393 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Complete async 
job-1134, jobStatus: FAILED, resultCode: 530, result: 
org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530","errortext":"Failed
 to clean up domain resources and sub domains, delete failed on domain Domain 
{"id":2,"name":"d1","path":"\/d1\/","uuid":"96cf32d0-09e1-4931-8162-c334184254f5"}"}
   2026-07-14 10:11:33,394 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Publish async 
job-1134 complete on message bus
   2026-07-14 10:11:33,394 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Wake up jobs 
related to job-1134
   2026-07-14 10:11:33,394 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Update db status 
for job-1134
   2026-07-14 10:11:33,394 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Wake up jobs 
joined with job-1134 and disjoin all subjobs created from job- 1134
   2026-07-14 10:11:33,403 DEBUG [c.c.a.ApiServer] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Retrieved 
cmdEventType from job info: DOMAIN.DELETE
   2026-07-14 10:11:33,404 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl$5] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Done executing 
org.apache.cloudstack.api.command.admin.domain.DeleteDomainCmd for job-1134
   2026-07-14 10:11:33,404 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-8:[ctx-805a98fa, job-1134]) (logid:1f365b3f) Remove job-1134 
from job monitoring
   root@Cloudstack-422:/home/ubuntu#
   
   ````
   
   
   ### What to do about it?
   
   Workaround  is to reduce the global setting value of 
"account.cleanup.interval" and then delete the domain again 


-- 
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