apache / cloudstack

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

All templates from different zones and hypervisors are availible for reinstall VM #7560

Closed top-secrett closed 1 year ago

top-secrett commented 1 year ago
ISSUE TYPE
CLOUDSTACK VERSION
4.18.0.0
CONFIGURATION

Two anvanced zones:

SUMMARY

We have two zones with different hypervisors, but templates from all zones are available for each other when reinstall VM image image image image

kiranchavala commented 1 year ago

@DaanHoogland this looks like a bug as the listTemplates api call is not passing the zone id when a user tries to restore a vm (https://cloudstack.apache.org/api/apidocs-4.18/apis/restoreVirtualMachine.html)

I think we should list only templates that are active in the zone and also based on the vm zone id

I have tried this with a normal user account and it lists all the templates

https://cloudstack.apache.org/api/apidocs-4.18/apis/listTemplates.html

http://<>:8080/client/api/?listall=true&templatefilter=executable&showicon=true&command=listTemplates&response=json

DaanHoogland commented 1 year ago

@top-secrett if you can please test #7739?

top-secrett commented 1 year ago

@DaanHoogland sorry, but I don't know how to test it

DaanHoogland commented 1 year ago

@DaanHoogland sorry, but I don't know how to test it

ok, we'll have to wait till someone else does then

zap51 commented 1 year ago

@DaanHoogland I tested, LGTM. Templates present in different zones are no longer shown during reinstall.

DaanHoogland commented 1 year ago

fixed in #7739