This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch 4.19 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push: new 0c422aca767 server: fix additional zones cannot be removed (#9261) 0c422aca767 is described below commit 0c422aca76740b40fc2006e6fe33412c00f669a7 Author: Wei Zhou <weiz...@apache.org> AuthorDate: Fri Jun 21 12:14:30 2024 +0200 server: fix additional zones cannot be removed (#9261) Got an exception when delete a zone ``` com.cloud.utils.exception.CloudRuntimeException: The zone cannot be deleted because there are Secondary storages in this zone ``` --- .../org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java b/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java index 21c5dc76d96..84b88c215ca 100644 --- a/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java +++ b/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java @@ -130,7 +130,7 @@ public class ImageStoreDaoImpl extends GenericDaoBase<ImageStoreVO, Long> implem } if (scope.getScopeId() != null) { SearchCriteria<ImageStoreVO> scc = createSearchCriteria(); - scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.ZONE); + scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.REGION); scc.addOr("dcId", SearchCriteria.Op.EQ, scope.getScopeId()); sc.addAnd("scope", SearchCriteria.Op.SC, scc); }