mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10640: Update redundant virtual router allocation algorithm
Try to put routers to two different primary storages with two hosts, not the same host.
This commit is contained in:
parent
1761024fda
commit
5f31d5008e
@ -977,12 +977,13 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||||||
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();
|
||||||
avoids[2].addHost(routerToBeAvoid.getHostId());
|
|
||||||
avoids[3] = new ExcludeList();
|
|
||||||
List<VolumeVO> volumes = _volumeDao.findByInstanceAndType(routerToBeAvoid.getId(), Type.ROOT);
|
List<VolumeVO> volumes = _volumeDao.findByInstanceAndType(routerToBeAvoid.getId(), Type.ROOT);
|
||||||
if (volumes != null && volumes.size() != 0) {
|
if (volumes != null && volumes.size() != 0) {
|
||||||
avoids[3].addPool(volumes.get(0).getPoolId());
|
avoids[2].addPool(volumes.get(0).getPoolId());
|
||||||
}
|
}
|
||||||
|
avoids[2].addHost(routerToBeAvoid.getHostId());
|
||||||
|
avoids[3] = new ExcludeList();
|
||||||
|
avoids[3].addHost(routerToBeAvoid.getHostId());
|
||||||
avoids[4] = new ExcludeList();
|
avoids[4] = new ExcludeList();
|
||||||
|
|
||||||
for (int i = 0; i < retryIndex; i++) {
|
for (int i = 0; i < retryIndex; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user