Skip to content

Commit f383656

Browse files
committed
Fix problems found in local test when JVM assertion is turned on
1 parent 249e2e8 commit f383656

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public List<VlanVO> listVlansByPhysicalNetworkId(long physicalNetworkId) {
347347
@Override
348348
public List<VlanVO> listZoneWideNonDedicatedVlans(long zoneId) {
349349
SearchCriteria<VlanVO> sc = ZoneWideNonDedicatedVlanSearch.create();
350-
sc.setParameters("ZoneWideNonDedicatedVlanSearch", "zoneId", zoneId);
350+
sc.setParameters("zoneId", zoneId);
351351
return listBy(sc);
352352
}
353353

‎server/src/com/cloud/network/NetworkManagerImpl.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,17 @@ public boolean configure(final String name, final Map<String, Object> params) th
576576
AssignIpAddressFromPodVlanSearch = _ipAddressDao.createSearchBuilder();
577577
AssignIpAddressFromPodVlanSearch.and("dc", AssignIpAddressFromPodVlanSearch.entity().getDataCenterId(), Op.EQ);
578578
AssignIpAddressFromPodVlanSearch.and("allocated", AssignIpAddressFromPodVlanSearch.entity().getAllocatedTime(), Op.NULL);
579+
AssignIpAddressFromPodVlanSearch.and("vlanId", AssignIpAddressFromPodVlanSearch.entity().getVlanId(), Op.IN);
580+
579581
SearchBuilder<VlanVO> podVlanSearch = _vlanDao.createSearchBuilder();
580582
podVlanSearch.and("type", podVlanSearch.entity().getVlanType(), Op.EQ);
581583
podVlanSearch.and("networkId", podVlanSearch.entity().getNetworkId(), Op.EQ);
582584
SearchBuilder<PodVlanMapVO> podVlanMapSB = _podVlanMapDao.createSearchBuilder();
583585
podVlanMapSB.and("podId", podVlanMapSB.entity().getPodId(), Op.EQ);
584586
AssignIpAddressFromPodVlanSearch.join("podVlanMapSB", podVlanMapSB, podVlanMapSB.entity().getVlanDbId(), AssignIpAddressFromPodVlanSearch.entity().getVlanId(), JoinType.INNER);
585587
AssignIpAddressFromPodVlanSearch.join("vlan", podVlanSearch, podVlanSearch.entity().getId(), AssignIpAddressFromPodVlanSearch.entity().getVlanId(), JoinType.INNER);
588+
589+
586590
AssignIpAddressFromPodVlanSearch.done();
587591

588592
_executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("Network-Scavenger"));

0 commit comments

Comments
 (0)