Skip to content

Commit 3e9740c

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-3914: assignToLoadBalancer - return false, when empty vmIds list is passed in
1 parent 8126981 commit 3e9740c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,11 @@ public boolean assignToLoadBalancer(long loadBalancerId, List<Long> instanceIds)
964964
}
965965

966966
List<UserVm> vmsToAdd = new ArrayList<UserVm>();
967+
968+
if (instanceIds == null || instanceIds.isEmpty()) {
969+
s_logger.warn("List of vms to assign to the lb, is empty");
970+
return false;
971+
}
967972

968973
for (Long instanceId : instanceIds) {
969974
if (mappedInstanceIds.contains(instanceId)) {

0 commit comments

Comments
 (0)