Uh oh!
There was an error while loading. Please reload this page.
[4.16] systemvm: configurable root disk size based on new systemvm template definition - #3900
[4.16] systemvm: configurable root disk size based on new systemvm template definition#3900ustcweizhou wants to merge 2 commits into
Conversation
ustcweizhou
commented
Feb 20, 2020
@rhtyd this has some small conflicts with your PR #3797 |
weizhouapache
commented
Feb 20, 2020
@rhtyd |
DaanHoogland
commented
Feb 20, 2020
hm, I think you want milestone 4.14 for this one as well, right @weizhouapache ? |
weizhouapache
commented
Feb 20, 2020
@DaanHoogland I expect to add to 4.14. However, it require to build new systemvm template (and test it). |
yadvr
commented
Feb 21, 2020
Thanks per your comment assigned against 4.15 @weizhouapache |
yadvr
commented
Jun 12, 2020
@ustcweizhou do we want this for master/4.15+? Can you fix conflicts? |
PaulAngus
commented
Jul 10, 2020
bump @ustcweizhou - can you fix conflicts so we can progress into testing please. |
DaanHoogland
left a comment
There was a problem hiding this comment.
code looks good, we need this integration tested on the new release (which will happen automatically 🤞 )
weizhouapache
commented
Sep 26, 2020
@rhtyd @DaanHoogland any chance to get this into 4.15 ? |
| Long rootDiskSize = rootDiskOfferingInfo.getSize(); | ||
| if (vm.getType().isUsedBySystem() && SystemVmRootDiskSize.value() != null) { | ||
| rootDiskSize = SystemVmRootDiskSize.value(); |
| if which growpart > /dev/null; then | ||
| growpart /dev/vda 2 | ||
| growpart /dev/vda 6 | ||
| resize2fs /dev/vda6 |
There was a problem hiding this comment.
@ustcweizhou have you tested this for KVM, and non-KVM hypervisors? It's possible the partitions are not called (hard-coded) vda; instead of this can be find/use partitions by mount point names or other valid/static identifiers?
There was a problem hiding this comment.
@ustcweizhou have you tested this for KVM, and non-KVM hypervisors? It's possible the partitions are not called (hard-coded) vda; instead of this can be find/use partitions by mount point names or other valid/static identifiers?
@rhtyd good point. thanks for review
| echo "" > /root/.ssh/known_hosts | ||
| if which growpart > /dev/null; then | ||
| growpart /dev/vda 2 |
There was a problem hiding this comment.
I checked the 4.15 systemvmtemplate, growpart is not available but resize2fs is available. Can we use fdisk instead of growpart to resize partition instead, or some other alternative? This would save from creating a new systemvmtemplate as we get closer to the 4.15 release?
There was a problem hiding this comment.
@rhtyd root partition must be the last partition (it is linux swap for now), so this feature requires new systemvm template. let's move to 4.16.
I will work on other hypervisors except kvm.
yadvr
commented
Sep 29, 2020
@ustcweizhou I've left some review comments, please see. As we're getting closer to 4.15 release I would like to avoid anything that could add any regression, usually a systemvmtemplate change could potentially add regressions. A new Debian 10.6 was released over the weekend so if we build a systemvmtemplate now there may be several differences due to pkg/kernel changes against the one we've been testing for months - http://download.cloudstack.org/systemvm/4.15/ |
weizhouapache
commented
Sep 29, 2020
@rhtyd ok, then let's not merge this into 4.15 |
112c8ab to
45828e9Compare| Long rootDiskSize = rootDiskOfferingInfo.getSize(); | ||
| if (vm.getType().isUsedBySystem() && SystemVmRootDiskSize.value() != null) { | ||
| rootDiskSize = SystemVmRootDiskSize.value(); |
weizhouapache
commented
Jan 28, 2021
ignore my approval ... |
@weizhouapache I think @Pearl1594 has already included these changes in her #4329 PR |
weizhouapache
commented
Mar 23, 2021
@rhtyd good. I closed this ticket then. |



Description
The official systemvm template has very few free spaces, it would be better to make the disk size configuration.
Main changes in systemvm template
(1) remove /var and /tmp partitions
(2) move / partition to the last.
(3) install cloud-guest-utils to support "growpart"
(4) install haproxy 1.8 from stretch-backports instead of haproxy 1.7
other changes
(3) add global setting systemvm.root.disk.size
(4) when systemvm starts, allocate all free spaces on disk to the extend partition, root partition (/dev/vda6) and file system.
This applies on all systemvms (cpvm,ssvm,virtual routers, etc)
This fixes#3455
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
old VR
new VR