Skip to content

Commit 2ed9b47

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-6853: Search for non-removed nics only when check if the running vm belongs to a certain network
1 parent 4b4fb1a commit 2ed9b47

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ public List<UserVmVO> listByNetworkIdAndStates(long networkId, State... states)
301301
if (UserVmSearch == null) {
302302
SearchBuilder<NicVO> nicSearch = _nicDao.createSearchBuilder();
303303
nicSearch.and("networkId", nicSearch.entity().getNetworkId(), SearchCriteria.Op.EQ);
304+
nicSearch.and("removed", nicSearch.entity().getRemoved(), SearchCriteria.Op.NULL);
304305
nicSearch.and().op("ip4Address", nicSearch.entity().getIp4Address(), SearchCriteria.Op.NNULL);
305306
nicSearch.or("ip6Address", nicSearch.entity().getIp6Address(), SearchCriteria.Op.NNULL);
306307
nicSearch.cp();

0 commit comments

Comments
 (0)