-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support vm dynamic scaling with kvm #4878
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
Support vm dynamic scaling with kvm #4878
Conversation
|
¿@wido @weizhouapache @ravening @GabrielBrascher , can you guys look at this please? |
|
In this PR: #4341 The functionality was added that the rootDiskSize can be configured in an Offering. When we scale the VM we should also scale the rootdisk's size if that is bigger in the new offering. This PR does not seem to do that. We probably want that added as well. I really like this PR though. Very much welcome! |
|
@wido We already have the API This API |
After reading the code and comments from @GabrielBrascher I understand this code only works with custom service offerings, correct? If so, please disregard my comments. Otherwise, with PR #4341 merged we now have the option to make the root disk size a condition of the service offering. Thus when changing the offering one needs to make sure that the root disk is also resized according to the new offering. |
utils/src/main/java/org/apache/cloudstack/utils/bytescale/ByteScaleUtils.java
Outdated
Show resolved
Hide resolved
3006d61 to
a087de9
Compare
a087de9 to
3ac82ba
Compare
|
Can anyone review this? |
As every variable declared in interfaces are already final, this moving will be needed to mock tests in nexts commits
The values are according to service offering or global configs
Improve libvirt def
|
@blueorangutan package |
|
@DaanHoogland 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 838 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1601)
|
e5ab57c to
4cde5e3
Compare
GabrielBrascher
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.
@GutoVeronezi overall it looks good. I've raised a few points to change in regards to the Source code header to meet the Apache license for Apache's projects.
| @@ -0,0 +1,43 @@ | |||
| /* | |||
| * Copyright 2021 The Apache Software Foundation. | |||
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.
Please check the Copyright
| @@ -0,0 +1,246 @@ | |||
| /* | |||
| * Copyright 2021 The Apache Software Foundation. | |||
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.
Please check the Copyright
| @@ -0,0 +1,105 @@ | |||
| /* | |||
| * Copyright 2021 The Apache Software Foundation. | |||
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.
Please check the Copyright
| @@ -0,0 +1,45 @@ | |||
| /* | |||
| * Copyright 2021 The Apache Software Foundation. | |||
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.
@GutoVeronezi I think that these source code headers need to be updated removing Copyright as we discussed in another PR (sorry but I forgot which one xD)
|
Manual tests LGTM. |
|
@GabrielBrascher done, thanks. |
GabrielBrascher
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.
Thanks for the PR, @GutoVeronezi.
LGTM, based on manual tests and code review.
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 952 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1736)
|
Description
ACS has an API to scale VMs
scaleVirtualMachine, however dynamic scale of VMs is limited toXenServerandVMWare.This PR intends suport live scale for VMs on
KVM.When we are using a custom service offerings, KVM's XML only receives the boot memory, but with this changes it will receive the max values defined in the service offerings. If it is a unconstrainced service offering, max values will be the
vm.serviceoffering.cpu.cores.maxandvm.serviceoffering.ram.size.maxvalues . If they are0, max values will be host or last host capacities.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
I created unit tests for the code that is being introduced here. Moreover, it has been tested locally in a test lab. I created multiples VMs with multiples definitions and tested API with they: