Conversation
ram and cpu reservation have not relation to ram and cpu hot add
| if (cpuSpeedMHz != cpuReservedMhz) { | ||
| vmConfig.setCpuHotAddEnabled(true); | ||
| } | ||
| if (memoryMB != memoryReserveMB) { | ||
| vmConfig.setMemoryHotAddEnabled(true); | ||
| } |
There was a problem hiding this comment.
thsi removal does not seem relevant to your feature description. can you explain @DK101010 ?
There was a problem hiding this comment.
@DaanHoogland sorry for my late answer. In my opinion I think yes and no.
Hot add memory and cpu will be enabled when reserved memory and cpu is in use. But this is not correct. Both features are independent, therefore I thought it is good to remove it in this PR. But if you want I can create a separate PR for this commit.
There was a problem hiding this comment.
not sure if that is needed and/or suffices; How about when people want to hot-add and don't care about reservation?
There was a problem hiding this comment.
@DaanHoogland hot add and reservation are two different features and they are independent of each other. I talked with my team and test it in my environment to get sure and in my env it works. In my point of view this code lines makes no sense.
There was a problem hiding this comment.
ok @DK101010 , if that's verified I'm fine with the code.
There was a problem hiding this comment.
I have not much experience with the codebase for VMware to comment on this piece of code. Good that it has been verified. I will rely on the contributor tests.
There was a problem hiding this comment.
I've my doubts on these changes, pinged vmware experts @harikrishna-patnala @nvazquez @sureshanaparti
There was a problem hiding this comment.
@DK101010 I think removing these lines will cause a regression on cpu and memory overcommit, have you tested those cases?
There was a problem hiding this comment.
Hi @nvazquez not sure what do you mean with regression.
Reservation and hot add are two different things. I can use reservation in it doesn't matter if hot add enabled/disbaled and it makes for me not sense to enable this when I'm reserve memory .
Also you can't more reserve as you have for the current vm.
I may be missing something, but currently I don't see a problem here.
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✔centos8 ✖debian. JID-2687 |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2702 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-3537)
|
...ns/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
Outdated
Show resolved
Hide resolved
…vmware/resource/VmwareResource.java Co-authored-by: dahn <daan.hoogland@gmail.com>
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 550 |
|
Trillian test result (tid-638)
|
|
@GabrielBrascher @sureshanaparti @nvazquez (not sure who else to bother), can you guys look at this? |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Added a small suggestion.
| if (cpuSpeedMHz != cpuReservedMhz) { | ||
| vmConfig.setCpuHotAddEnabled(true); | ||
| } | ||
| if (memoryMB != memoryReserveMB) { | ||
| vmConfig.setMemoryHotAddEnabled(true); | ||
| } |
There was a problem hiding this comment.
I have not much experience with the codebase for VMware to comment on this piece of code. Good that it has been verified. I will rely on the contributor tests.
| } | ||
| } | ||
| if(StringUtils.isEmpty(details.get(VmDetailConstants.RAM_RESERVATION))){ | ||
| details.put(VmDetailConstants.RAM_RESERVATION, "0.0"); |
There was a problem hiding this comment.
There are two occurrences of the "0.0" String.
What do you think of replacing these "0.0" with NumberUtils.DOUBLE_ZERO? The NumberUtils will return a Double object of 0.0d and, therefore, it has a toString() that returns the String "0.0".
Other option would be to create a constant with a self-describing name.
There was a problem hiding this comment.
Hi @GabrielBrascher, sorry for my late answer, I must have missed the notification. I think there are no benefits regards reusable of this code, but I agree it's better to use parameter instead of strings. I'm prefer your first suggestion and will adapt it.
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 214 |
|
Trillian test result (tid-937)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
clgtm, test failure is does not seem related
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
...ns/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
Show resolved
Hide resolved
|
Trillian test result (tid-1417)
|
…vmware/resource/VmwareResource.java Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
|
@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 711 |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1432)
|
nvazquez
left a comment
There was a problem hiding this comment.
Only one concern, besides it it looks good
|
|
||
| cpuInfo.setReservation((long)cpuReservedMhz); | ||
| vmConfig.setCpuAllocation(cpuInfo); | ||
| if (cpuSpeedMHz != cpuReservedMhz) { |
There was a problem hiding this comment.
@DK101010 I think removing these lines will cause a regression on cpu and memory overcommit, have you tested those cases?
There was a problem hiding this comment.
Hi @nvazquez not sure what do you mean with regression.
Reservation and hot add are two different things. I can use reservation in it doesn't matter if hot add enabled/disbaled and it makes for me not sense to enable this when I'm reserve memory .
Also you can't more reserve as you have for the current vm.
I may be missing something, but currently I don't see a problem here.
There was a problem hiding this comment.
@DK101010 I have examined the setBasicVmConfig(..) method is used on:
VmwareResource.execute(StartCommand cmd)-> the values set on these removed lines are not relevant, are overridden later (https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java#L1995-L2005)HypervisorHostHelper.createBlankVm(..)-> possible regression at this point: blank VMs are always created withcpuHotAdd = falseandmemHotAdd = false. I'm not sure how/if this would affect deployments, any thoughts?
cc. @sureshanaparti @rhtyd @DaanHoogland
There was a problem hiding this comment.
@nvazquez Hot-adding cpu & memory are set / overridden based on guest OS support. Also, the reservation and hot add are different things. So, I think, the hot add config here seems not relevant now.
|
@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 843 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
@blueorangutan test centos7 vmware-67u3 |
1 similar comment
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
@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 ✔️ suse15. SL-JID 987 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1759)
|
Description
WIth this PR user can manuelly modify the ram reservation for a specific vm in vmware context. User set it via vm settings as a float value between 0 and 1
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
tested in own vmware environment