-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: allows compute offering with or without constraints #3245
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
server: allows compute offering with or without constraints #3245
Conversation
Changes allow admin to create compute offerings with unconstrained CPU, Memory or constrained range CPU, memory which can be later set by user while deploying VM. Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2663 |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
VM deployed using constrained service offering won't be having CPU speed in the details therefore CPU speed for such VMs need to be retrieved from offering itself. This change adds check for the same. Signed-off-by: Abhishek Kumar <[email protected]>
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2675 |
aa2ba3e to
2b89dfc
Compare
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
borisstoyanov
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.
LGMT. tested it manually, checked the constrained and unconstrained compute offering with different parameters, it's working as expected.
|
Trillian test result (tid-3468)
|
|
@blueorangutan package |
|
@PaulAngus a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2689 |
typo
PaulAngus
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.
tested manually, created a service offering with max 2 cores and max 512MB RAM.
logged in as a user and created a VM with 3 cores 128MB RAM and a VM with 1core and 1GB RAM.
(i did this by typing into the box next to the slider - i think typing in the box is ok BTW)
both VMs deployed OK - API should have not allowed this.
Arguably there should also be verification on UI before proceeding.
ui/l10n/en.js
Outdated
| "label.compute.offering":"Compute offering", | ||
| "label.compute.offering.type":"Compute offering type", | ||
| "label.compute.offering.custom.constrained":"Custom Constrained", | ||
| "label.compute.offering.custom.unconstrained":"Custom Unsconstrained", |
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.
| "label.compute.offering.custom.unconstrained":"Custom Unsconstrained", | |
| "label.compute.offering.custom.unconstrained":"Custom Unconstrained", |
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.
Good hack. Simply the ui typing field could be grey out but that won't solve the api call. This need a service layer check imho.
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2692 |
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2702 |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
borisstoyanov
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 on your latest changes @shwstppr
|
Trillian test result (tid-3498)
|
|
@blueorangutan package |
|
@PaulAngus a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2726 |
|
retested UI and API. LGTM. |
|
Merging based on reviews from Paul and Bobby, and the smoketests. |
For customer constrained offering, the cpu speed is fixed. Therefore the 'CpuSpeed' field should be hidden for customer constrained offering when change vm offering on UI. It is visible only for unconstrained offering. This is regression issue of #3245
Description
Problem: Custom compute offering does not allow setting min and max values for CPU and VRAM for custom VMs.
Root Cause: Custom compute offerings cannot be created with a given range of CPU number and memory instead it allows only fixed values.
Solution: createServiceOffering API has been modified to allow setting a defined range for CPU number and memory. Also, UI form for compute offering creation is provided with a new field named 'compute offering type’ with values - Fixed, Custom Constrained, Custom Constrained. It will allow the creation of compute offerings either with a fixed CPU speed and memory for fixed compute offering, or with a range of CPU number and memory for custom constrained compute offering or without predefined CPU number, CPU speed and memory for custom unconstrained compute offering.
To allow the user to set CPU number, CPU speed and memory during VM deployment, UI form for VM deployment has been modified to provide controls to change these values. These controls are depicted in screenshots below for custom constrained and custom unconstrained compute offering types.
Sample API calls using cmk to create a constrained service offering and deploying a VM using it,
create serviceoffering name=Constrained displaytext=Constrained customized=true mincpunumber=2 maxcpunumber=4 cpuspeed=400 minmemory=256 maxmemory=1024deploy virtualmachine displayname=ConstrainedVM serviceofferingid=60f3e500-6559-40b2-9a61-2192891c2bd6 templateid=8e0f4a3e-601b-11e9-9df4-a0afbd4a2d60 zoneid=9612a0c6-ed28-4fae-9a48-6eb207af29e3 details[0].cpuNumber=3 details[0].memory=800Types of changes
Screenshots (if appropriate):
Create compute offering form



VM deployment form


How Has This Been Tested?