kiranchavala opened a new issue, #12601: URL: https://github.com/apache/cloudstack/issues/12601
### problem Unable to delete account if the project is removed ### versions ACS 4.22 ### The steps to reproduce the bug 1. Create a project <img width="1447" height="598" alt="Image" src="https://github.com/user-attachments/assets/e7f92d84-7540-4739-b2a6-01410024759b" /> 2. Create a account/user with User role <img width="611" height="844" alt="Image" src="https://github.com/user-attachments/assets/d09268f8-2a0f-4da4-a319-34c39a6606e7" /> 3. Add User to the project, Select the project role as Admin <img width="670" height="720" alt="Image" src="https://github.com/user-attachments/assets/16dfe995-2636-4125-ae68-33930b9c88d7" /> 5. Delete the project with clean up option <img width="1096" height="536" alt="Image" src="https://github.com/user-attachments/assets/dbac95b1-ba41-4269-a3d7-7c00bff3f66c" /> 6. Delete the user <img width="1346" height="559" alt="Image" src="https://github.com/user-attachments/assets/4fe3a51e-df83-4d29-b84d-d221143f0ffb" /> 7. Disable the account and Delete the account >> Exception observed <img width="1628" height="521" alt="Image" src="https://github.com/user-attachments/assets/a3c5c43c-a969-44c4-be6e-4766a2a06bcc" /> ``` 2026-02-06 05:19:09,201 DEBUG [c.c.a.ApiServer] (qtp1390913202-23:[ctx-52b15b57, ctx-b39021de]) (logid:c0aa78bd) Retrieved cmdEventType from job info: ACCOUNT.DELETE 2026-02-06 05:19:09,203 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-22:[ctx-54696ea9, job-166]) (logid:92e3ffb4) Add job-166 into job monitoring 2026-02-06 05:19:09,204 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp1390913202-23:[ctx-52b15b57, ctx-b39021de]) (logid:c0aa78bd) submit async job-166, details: AsyncJob {"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","cmdInfo":"{\"response\":\"json\",\"ctxUserId\":\"2\",\"sessionkey\":\"nDTziuDnO4qxnRScKDVyKQTZukU\",\"httpmethod\":\"POST\",\"ctxStartEventId\":\"623\",\"id\":\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\",\"ctxDetails\":\"{\\\"interface com.cloud.user.Account\\\":\\\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\\\"}\",\"ctxAccountId\":\"2\",\"uuid\":\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\",\"cmdEventType\":\"ACCOUNT.DELETE\"}","cmdVersion":0,"completeMsid":null,"created":null,"id":166,"initMsid":32988016411316,"instanceId":12,"instanceType":"Account","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"1ba7a022-f715-4df5-a771-99e59e80e38f"} 2026-02-06 05:19:09,204 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl$5] (API-Job-Executor-22:[ctx-54696ea9, job-166]) (logid:1ba7a022) Executing AsyncJob {"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","cmdInfo":"{\"response\":\"json\",\"ctxUserId\":\"2\",\"sessionkey\":\"nDTziuDnO4qxnRScKDVyKQTZukU\",\"httpmethod\":\"POST\",\"ctxStartEventId\":\"623\",\"id\":\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\",\"ctxDetails\":\"{\\\"interface com.cloud.user.Account\\\":\\\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\\\"}\",\"ctxAccountId\":\"2\",\"uuid\":\"f004ffb3-f8d0-4297-8951-fc83bdd10fad\",\"cmdEventType\":\"ACCOUNT.DELETE\"}","cmdVersion":0,"completeMsid":null,"created":null,"id":166,"initMsid":32988016411316,"instanceId":12,"instanceType":"Account","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"1ba7a022-f715-4df5-a771-99e59e80e38f"} 2026-02-06 05:19:09,205 DEBUG [c.c.a.ApiServlet] (qtp1390913202-23:[ctx-52b15b57, ctx-b39021de]) (logid:c0aa78bd) ===END=== 10.0.3.251 -- POST command=deleteAccount response=json id=f004ffb3-f8d0-4297-8951-fc83bdd10fad sessionkey=nDTziuDnO4qxnRScKDVyKQTZukU 2026-02-06 05:19:09,207 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-22:[ctx-54696ea9, job-166, ctx-32d73b76]) (logid:1ba7a022) Account [Account [{"accountName":"admin","id":2,"uuid":"ef7f35bc-fffc-11f0-8d07-1e009f0002b4"}]] has access to resource. 2026-02-06 05:19:09,223 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-22:[ctx-54696ea9, job-166]) (logid:1ba7a022) Complete async job-166, jobStatus: FAILED, resultCode: 431, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"431","errortext":"Unable to delete account [12], because it manages the following project(s): [4]. Please, remove the account from these projects or demote it to a regular project role first."} ``` ### What to do about it? Account should get deleted -- 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]
