Add global configuration for max cpu/ram in service offerings#4379
Add global configuration for max cpu/ram in service offerings#4379yadvr merged 1 commit intoapache:masterfrom
Conversation
…iceoffering.ram.size.max
DaanHoogland
left a comment
There was a problem hiding this comment.
code looks good, will need some testing
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2129 |
Pearl1594
left a comment
There was a problem hiding this comment.
LGTM
Verified the fix:
-
Set "vm.serviceoffering.cpu.cores.max" to 2 and attempted to create a compute offering with CPU cores set to 4 - Failed (as expected)

-
Set "vm.serviceoffering.ram.size.max" to 200 and attempted to create a service offering with memory of 500 MB - Failed (as expected)

-
Created a service offering within the defined limits of vm.serviceoffering.cpu.cores.max = 2 and vm.serviceoffering.ram.size.max = 200 - Passed (as expected)
|
@blueorangutan test |
|
@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
thanks @Pearl1594 ! |
|
@ustcweizhou Custom Constrained and Custom Unconstrained service offerings do not adhere to the set global settings, and get created successfully despite having the the min and/or max cpu cores and memory values set above configured threshold - which is what is expected (I reckon). However, with Custom Constrained Compute offering type - when the min cpu cores / min memory is set above its max values - it still successfully creates the offering - shouldn't this ideally fail? |
@Pearl1594 yes, you are right. |
|
Trillian test result (tid-2900)
|
|
Thanks @ustcweizhou , the check does happen when the offering is consumed during VM deployment. |

…
Description
vm.serviceoffering.cpu.cores.max and vm.serviceoffering.ram.size.max
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?