Repository navigation
CLOUDSTACK-9975: Allow customizing system VM templates for SSVM and Console Proxy - #2275
GabrielBrascher wants to merge 1 commit into
Conversation
f3bef93 to
501354b
Compare
|
Very nice and interesting! It might even be that in the future we should leverage this even more. This SSVM template is now difficult to manage since it has to be able to handle 3 different scenarios. |
|
Interesting PR, I'll ping couple of colleagues who may have more operational insights -- @PaulAngus @DagSontebo and others. |
501354b to
03e0641
Compare
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1572 |
|
@GabrielBrascher can you rebase and fix conflicts? |
|
Sorry by the delay @rafaelweingartner, I will do it soon. Thanks! |
|
@GabrielBrascher can you fix the conflicts please? |
|
This PR may be closed, the global setting names may be confusing but the |
|
@rhtyd are you sure? Take a look at the code that deploys SSVM for instance [1] . Can you check line 645? |
Currently, it is only possible to change the template used by virtual routers, but other system VMs do not have the same feature. The virtual router template is configured according to the respective global settings parameters: router.template.hyperv, router.template.kvm, router.template.lxc, router.template.xenserver, router.template.ovm, router.template.vmware. This commit allows users to configure templates for storage system VMs (SSVMs) and console proxy system VMs with parameters similar with the virtual router template configuration: ssvm.template.<virtualization-tool> and consoleproxy.template.<virtualization-tool> If a parameter is null then it keeps the current flow for that scenario (systemvm/virtualization tool). This feature was useful in a practical scenario where it was necessary to perform some changes for the console proxy system VM template.
03e0641 to
7c24f04
Compare
|
Hi @rhtyd, sorry for the delay on this one. Unfortunately, that parameter (router.xxx) changes only router templates. At least that is what happened when I tested last time. Also, I looked at the code, and right now that parameter is not used to select SSVMs and console proxy templates. |
|
functionally this is good. I definately would want a marvin test for this that at least proves the success case so we can track regressions if we merge it. |
|
@GabrielBrascher thanks for replying. When we do update new systemvmtemplate with every release, it does get used for all systemvms and not just only routers so I disagree what you share. We can test of course, see this upgrade path for example where only the new template's name is updated for the |
|
I verified that changing systemvmtemplate by following the changes that the upgrade path does, indeed changes the systemvmtemplate for all vrs and systemvms (cpvm/ssvm). This may be closed @GabrielBrascher. If you'd prefer, please perform a test yourself, thanks. |
|
Thanks, @rhtyd. I used that code in CloudStack 4.9.3.0 when it was requested to edit system VM template but without that code, it was updated only templates for virtual routers. After that, I created a PR for the master. I will review all and perform a test here as well to make sure. |
|
@GabrielBrascher perhaps you can explore refactoring of the systemvmtemplate upgrade code we've as part of the upgrade path, as an service layer API that may also be used via registerTemplate to make it easier to register/use a new systemvmtemplate. |
|
Hi @GabrielBrascher, @rhtyd, what's the status of this? The feature looks interesting. Would be nice to specify different templates. Also I have the feeling you both misunderstood each other. Rhtyd talked about changing the SystemVM-template which leaves CS no other option as to deploy the new template when a systemvm needs to be deployed. Gabriel talked about the possibility to specify another template to use as CP or SSVM i think. I think that are two different things. |
|
That is indeed the main goal, @DennisKonrad. Thanks for pointing that! |
|
@rhtyd What do you think? Maybe you could clarify on what you disagree with in this request or where/why you want to see changes to this? |
|
@DennisKonrad I'm told by our guys that the router global setting in fact DOES change the temple for the ssvm and cpvm. Which would unfortunately make this redundant. |
|
@PaulAngus I think so too. But the feature here allows for different templates instead of having the same template for router, ssvm and console proxy. Feel free to correct me on this :) |
|
@PaulAngus @rhtyd this PR allows to have different templates for Virtual Router (VR), Console Proxy VM (CPVM), and Storage System VM (SSVM); thus, a feature that we all know it is not yet implemented for CloudStack. I do not see any technical reason for blocking this PR. Cases where this can be useful:
I created this PR at 2017 because it was a critical feature for a data center in Brazil. For sure this would help multiple CloudStack's users, @DennisKonrad is one of them. Additionally, I experienced (more than once) a case where it was not possible to configure all system VMs with the same template (VR with template A, SSVM template A, CP template A). I will explain myself. The method findSystemVMReadyTemplate is called during the creation of SSVM and CPVM. Thus, SSVMs and CPs templates are selected by descending order of id from table vm_template where the template type is of 'SYSTEM', the state is as 'Active', type of 'Routing', zone id as zoneId, has been downloaded and the hypervisor of the hypervisorType. In some cases more than one templates fit the select (multiple templates of 'SYSTEM', 'Active', 'Routing', same zone Id, same hypervisor), thus it returns the template that has the bigger Id, not the one that is configured for the router. Furthermore, if a root admin registers a new template for the system VM this template will not be owned by the system (type is of 'ROUTING', not 'SYSTEM'). Only during upgrades, the templates that are marked as 'ROUTING' are converted to 'SYSTEM'. Note that for the VR the template is selected as follows. This DOES NOT happen for SSVM and CPVM: In conclusion, I am not seeing any technical reason to block this PR. What do you think guys? @DaanHoogland @dhlaluku @nvazquez @dagsonstebo @wido |
|
thanks @DennisKonrad OK, now that I understand why you're doing this, I can see what you're trying to achieve. for instance (off the top of my head): |
|
That is a good point @PaulAngus. What I have in mind is to keep system VM upgrade as it is on current documentation, adding just one point regarding the fact that the user should set the upgraded template for all system VMs, or update his customized templates based on the new template. Note that for upgrading all templates, one could set the VR, SSVMs and CPVMs templates with the upgraded template, or set SSVM and CPVM as null and the VR template with the upgraded template. |
|
@PaulAngus I agree with @GabrielBrascher that the default way of upgrading should stay the same. If no 'personalized' templates are set, the vr router template should be used. The "required update" idea seems more of an enhancement to me that would be great regardles of this pr here ;) If a user does not upgrade his svm's according to the documentation that might not be a problem (if lucky). |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-1030 |
|
@blueorangutan test |
|
@GabrielBrascher can you triage this yourself? |
|
@DaanHoogland thanks for the ping. I think that it is more a matter of working with the systemvm upgrade process. Considering that it was not a top priority and 4.13.1/4.14.0 were on tigh schedule I did not invevst much time on this one. I will take another look on it as soon as 4.14 is released and we faced the python3 migration :) |
Description
Currently, it is possible to change the template used by virtual routers, but other system VMs do not have the same feature. The virtual router template is configured according to the respective global settings parameters: router.template.hyperv, router.template.kvm, router.template.lxc, router.template.xenserver, router.template.ovm, router.template.vmware.
This PR allows users to configure templates for storage system VMs (SSVMs) and console proxy system VMs with parameters similar with the virtual router template configuration: ssvm.template. and consoleproxy.template.
If a parameter is null then we use the default system VM.
This feature was useful in a practical scenario where the console proxy system VM template was customized.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?