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


   ### Description
   
   The 'platform' setting is retrieved after a VM is stopped with the platform 
parameters obtained from Xen/XCP for a certain VM. If a user added the setting 
'cpu.corespersocket', it was ignored and the setting was never applied as it 
was mutually exclusive with the platform 'setting'.
   
   This PR fixes the previous behavior, in the following way:
   - If 'cpu.corespersocket'=X AND the 'platform' setting does not contain 
'cores-per-socket' -> 'cores-per-socket:X' parameter is added to the 'platform' 
setting which is sent to Xen/XCP
   - If 'cpu.corespersocket'=X AND the 'platform' setting contains 
'cores-per-socket:Y' -> The 'platform' setting is updated, containing: 
'cores-per-socket:X'
   - If 'cpu.corespersocket' is not set, nothing changes
   
   Fixes: #5695 
   
   ### 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
   
   - [ ] Major
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   - Deploy a VM using an offering with 2 CPUs (use >=2 CPUs for tests)
   - Stop VM -> Settings -> Check the 'platform' setting is visible and does 
not contain the 'cores-per-socket' parameter
   - Add the setting 'cpu.corespersocket' = 2 (CPU number must be a multiple of 
cores per socket)
   - Start VM -> Stop VM -> Check the 'platform' setting contains the parameter 
'cores-per-socket:2'
   - Edit the setting 'cpu.corespersocket' = 1 (CPU number must be a multiple 
of cores per socket)
   - Start VM -> Stop VM -> Check the 'platform' setting contains the parameter 
'cores-per-socket:1'


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