apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.98k stars 1.09k forks source link

CloudStack Template UI add crosszone selection #7348

Open damonb123 opened 1 year ago

damonb123 commented 1 year ago
ISSUE TYPE
COMPONENT NAME
API, UI
CLOUDSTACK VERSION
4.17.2.0
SUMMARY

CloudStack UI for Templates does not allow ability to mark template crosszones. If new zones are added, the end user must know to return and add template to new zone.

kiranchavala commented 1 year ago

@damonb123

You can try the api call https://cloudstack.apache.org/api/apidocs-4.17/apis/registerTemplate.html

and use the parameter "zoneids" to register a cross zone template

DaanHoogland commented 1 year ago

@kiranchavala if I understand @damonb123 correctly, he already did that and it worked. but when after registration of the template a new zone is added the template is not automatically added to the new zone. For this to work we would need to have a mark similar as for systemvm/internal templates.

shwstppr commented 1 year ago

@damonb123 cc @DaanHoogland I see there is already some code that allows associating existing cross-zone templates to new zone when a host is added. https://github.com/apache/cloudstack/blob/4.18/server/src/main/java/com/cloud/storage/download/DownloadListener.java#L276-L286 There could be some issue but looks fine to me. @damonb123 can you please provide logs or details of your env and steps followed?

shwstppr commented 3 months ago

@damonb123 cc @DaanHoogland any update on the logs or steps to reproduce? If template is registered without zoneids it is always marked cross zone and in the code I can see that cross zone templates are automatically copied to new zones when added