mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-4455:object_store - Template sync results in private
templates being synced to all the secondary stores.
This commit is contained in:
parent
2611ac75c1
commit
0fdaef8e3d
@ -74,6 +74,7 @@ import com.cloud.exception.ResourceAllocationException;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.storage.DataStoreRole;
|
import com.cloud.storage.DataStoreRole;
|
||||||
import com.cloud.storage.StoragePool;
|
import com.cloud.storage.StoragePool;
|
||||||
|
import com.cloud.storage.Storage.TemplateType;
|
||||||
import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
|
import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
|
||||||
import com.cloud.storage.VMTemplateVO;
|
import com.cloud.storage.VMTemplateVO;
|
||||||
import com.cloud.storage.VMTemplateZoneVO;
|
import com.cloud.storage.VMTemplateZoneVO;
|
||||||
@ -405,6 +406,11 @@ public class TemplateServiceImpl implements TemplateService {
|
|||||||
s_logger.info("Skip downloading template " + tmplt.getUniqueName() + " since no url is specified.");
|
s_logger.info("Skip downloading template " + tmplt.getUniqueName() + " since no url is specified.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// if this is private template, skip sync to a new image store
|
||||||
|
if (!tmplt.isPublicTemplate() && !tmplt.isFeatured() && tmplt.getTemplateType() != TemplateType.SYSTEM) {
|
||||||
|
s_logger.info("Skip sync downloading private template " + tmplt.getUniqueName() + " to a new image store");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (availHypers.contains(tmplt.getHypervisorType())) {
|
if (availHypers.contains(tmplt.getHypervisorType())) {
|
||||||
s_logger.info("Downloading template " + tmplt.getUniqueName() + " to image store "
|
s_logger.info("Downloading template " + tmplt.getUniqueName() + " to image store "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user