-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add global configuration for max cpu/ram in service offerings #4379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add global configuration for max cpu/ram in service offerings #4379
Conversation
…iceoffering.ram.size.max
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?