mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: fix npe during start vr edge case (#10366)
DeploymentPlanner.addPod takes long value while VmInstanceVO.getPodIdToDeployIn returns a Long value which can be null when the VM is never started. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
02d0dca24b
commit
89e6b1f8ea
@ -445,7 +445,9 @@ public class NetworkHelperImpl implements NetworkHelper {
|
|||||||
final int retryIndex = 5;
|
final int retryIndex = 5;
|
||||||
final ExcludeList[] avoids = new ExcludeList[5];
|
final ExcludeList[] avoids = new ExcludeList[5];
|
||||||
avoids[0] = new ExcludeList();
|
avoids[0] = new ExcludeList();
|
||||||
|
if (routerToBeAvoid.getPodIdToDeployIn() != null) {
|
||||||
avoids[0].addPod(routerToBeAvoid.getPodIdToDeployIn());
|
avoids[0].addPod(routerToBeAvoid.getPodIdToDeployIn());
|
||||||
|
}
|
||||||
avoids[1] = new ExcludeList();
|
avoids[1] = new ExcludeList();
|
||||||
avoids[1].addCluster(_hostDao.findById(routerToBeAvoid.getHostId()).getClusterId());
|
avoids[1].addCluster(_hostDao.findById(routerToBeAvoid.getHostId()).getClusterId());
|
||||||
avoids[2] = new ExcludeList();
|
avoids[2] = new ExcludeList();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user