server: check server capacity when start/deploy a vm#5339
Conversation
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
the following checks are added when deploy/start a vm with specified id. not sure if users are happy with the checks. ps: (1) to (3) already exist in destination host check in vm migration. (4) is a new check in vm migration. =======UPDATE 2021-09-01=========== We have decided to only add capacity check. the other checks are not added. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 932 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1721)
|
nvazquez
left a comment
There was a problem hiding this comment.
Thanks @weizhouapache looks good. What about host tags checks against the offering? cc. @andrijapanicsb
sureshanaparti
left a comment
There was a problem hiding this comment.
clgtm, minor changes to code format required (check suggestions)
|
@nvazquez the process to deploy/start a vm without destination host is if destination host is specified, step 1 and 2 are skipped for now. but there is still a new check in step 3. current error |
thanks @sureshanaparti , changes have been committed. |
| deployOnGivenHost = true; | ||
| } | ||
| } catch (InvalidParameterValueException ex) { | ||
| s_logger.error("Cannot deploy the VM to specified host due to: " + ex.getMessage()); |
There was a problem hiding this comment.
We could pass the exception to the log.
| if (!AllowDeployVmIfGivenHostFails.value()) { | ||
| deployOnGivenHost = true; | ||
| try { | ||
| checkVmDestinationServerCapacity(vm, destinationHost); |
There was a problem hiding this comment.
Would it be simpler to use _capacityMgr.checkIfHostHasCpuCapabilityAndCapacity ?
|
@nvazquez @davidjumani updated this pr. |
|
@weizhouapache does this affect 4.15 too? If so, pl raise PR against 4.15 branch. |
0e47334 to
de39782
Compare
@rhtyd @nvazquez changed base branch to 4.15 |
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 1065 |
|
@blueorangutan test ubuntu18 kvm-ubuntu18 |
|
@nvazquez a Trillian-Jenkins test job (ubuntu18 mgmt + kvm-ubuntu18) has been kicked to run smoke tests |
|
Trillian test result (tid-1845)
|
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1869)
|
|
Lgtm, failures not related to this PR. |
|
Kicking a new round of tests while is being tested |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
vladimirpetrov
left a comment
There was a problem hiding this comment.
LGTM based on manual testing. Tested scenarios:
(1) cpu speed must be smaller than or equals to cpu mhz of physical host (this does not consider over provisioning)
(2) VM with more cores than available on the host and enough CPU speed and memory
(3) host must have enough cpu resource (vm cpu*speed)
(4) host must have enough memory
|
Trillian test result (tid-1943)
|




Description
This PR fixes the issue that server capacity check is skipped, when start or migrate a vm with specified hostid.
=======UPDATE 2021-09-01===========
We have decided to only add capacity check. the other checks (host state, affinity group, etc) are not added.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?