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

   ### Description
   
   This PR fixes a memory leak issue observed when attaching more than 10 
volumes on a stopped VM and try to start it.
   
   Could be reproduced by:
   - Create a VM without starting it
   - Create 14 data disks and attach them to the VM
   - Start VM
   
   <img width="776" alt="Screenshot 2023-01-24 at 11 18 44" 
src="https://user-images.githubusercontent.com/5295080/214828525-f4f74da9-e412-4b7f-9598-a1132acf82c1.png";>
   
   ````
   {
     "accountid": "cdd3f51c-9862-11ed-8965-1e00dc0000f6",
     "cmd": "org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin",
     "completed": "2023-01-24T15:19:50+0000",
     "created": "2023-01-24T15:19:47+0000",
     "jobid": "da7e88d1-a8c4-4d44-91b3-21cef885769f",
     "jobinstanceid": "d4fed850-c112-489a-84dd-8bb875ba0e10",
     "jobinstancetype": "VirtualMachine",
     "jobprocstatus": 0,
     "jobresult": {
       "errorcode": 530,
       "errortext": "Java heap space"
     },
     "jobresultcode": 530,
     "jobresulttype": "object",
     "jobstatus": 2,
     "userid": "cdd4db33-9862-11ed-8965-1e00dc0000f6"
   }
   🙈 Error: async API failed for job da7e88d1-a8c4-4d44-91b3-21cef885769f
   ````
   
   This was caused by extra logging on the deployment planner. An example on a 
VM deployment with 1 datadisk:
   
   Before fix:
   ````
   2023-01-25 10:24:30,203 DEBUG [c.c.d.DeploymentPlanningManagerImpl] 
(API-Job-Executor-31:ctx-7c14f8a1 job-228 ctx-bd96ad97) (logid:b91e0e7d) 
Returning Deployment Destination: 
Dest[Zone(Id)-Pod(Id)-Cluster(Id)-Host(Id)-Storage(Volume(Id|Type-->Pool(Id))] 
: 
Dest[Zone(1)-Pod(1)-Cluster(1)-Host(2)-Storage(Volume(82|ROOT-->Pool(2)Volume(82|ROOT-->Pool(2),
 Volume(82|ROOT-->Pool(2)Volume(82|ROOT-->Pool(2), 
Volume(83|DATADISK-->Pool(1))]
   ````
   
   After fix:
   ````
   2023-01-25 11:18:09,612 DEBUG [c.c.d.DeploymentPlanningManagerImpl] 
(API-Job-Executor-1:ctx-9f7540cf job-234 ctx-9db31cfd) (logid:50df4eb2) 
Returning Deployment Destination: 
Dest[Zone(Id)-Pod(Id)-Cluster(Id)-Host(Id)-Storage(Volume(Id|Type-->Pool(Id))] 
: 
Dest[Zone(1)-Pod(1)-Cluster(1)-Host(2)-Storage(Volume(84|ROOT-->Pool(2)Volume(85|DATADISK-->Pool(1))]
   ````
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [x] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   


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