mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch '4.19' of https://github.com/apache/cloudstack into 4.20
This commit is contained in:
commit
0427abf855
@ -38,6 +38,7 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class KVMInvestigator extends AdapterBase implements Investigator {
|
||||
@ -81,7 +82,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
|
||||
return haManager.getHostStatus(agent);
|
||||
}
|
||||
|
||||
List<StoragePoolVO> clusterPools = _storagePoolDao.listPoolsByCluster(agent.getClusterId());
|
||||
List<StoragePoolVO> clusterPools = _storagePoolDao.findPoolsInClusters(Arrays.asList(agent.getClusterId()), null);
|
||||
boolean storageSupportHA = storageSupportHa(clusterPools);
|
||||
if (!storageSupportHA) {
|
||||
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());
|
||||
@ -89,7 +90,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
|
||||
}
|
||||
if (!storageSupportHA) {
|
||||
logger.warn("Agent investigation was requested on host {}, but host does not support investigation because it has no NFS storage. Skipping investigation.", agent);
|
||||
return Status.Disconnected;
|
||||
return null;
|
||||
}
|
||||
|
||||
Status hostStatus = null;
|
||||
|
||||
@ -1779,7 +1779,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
}
|
||||
|
||||
Pair<Integer, Integer> interfaceMTUs = validateMtuConfig(publicMtu, privateMtu, zone.getId());
|
||||
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu, privateMtu);
|
||||
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu);
|
||||
|
||||
Network associatedNetwork = null;
|
||||
if (associatedNetworkId != null) {
|
||||
@ -2067,7 +2067,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
return ntwkOff;
|
||||
}
|
||||
|
||||
protected void mtuCheckForVpcNetwork(Long vpcId, Pair<Integer, Integer> interfaceMTUs, Integer publicMtu, Integer privateMtu) {
|
||||
protected void mtuCheckForVpcNetwork(Long vpcId, Pair<Integer, Integer> interfaceMTUs, Integer publicMtu) {
|
||||
if (vpcId != null && publicMtu != null) {
|
||||
VpcVO vpc = _vpcDao.findById(vpcId);
|
||||
if (vpc == null) {
|
||||
@ -2075,7 +2075,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
}
|
||||
logger.warn(String.format("VPC public MTU already set at VPC creation phase to: %s. Ignoring public MTU " +
|
||||
"passed during VPC network tier creation ", vpc.getPublicMtu()));
|
||||
interfaceMTUs.set(vpc.getPublicMtu(), privateMtu);
|
||||
interfaceMTUs.set(vpc.getPublicMtu(), interfaceMTUs.second());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -555,7 +555,7 @@ public class NetworkServiceImplTest {
|
||||
Mockito.when(vpcVO.getPublicMtu()).thenReturn(vpcMtu);
|
||||
|
||||
Pair<Integer, Integer> updatedMtus = service.validateMtuConfig(publicMtu, privateMtu, zoneId);
|
||||
service.mtuCheckForVpcNetwork(vpcId, updatedMtus, publicMtu, privateMtu);
|
||||
service.mtuCheckForVpcNetwork(vpcId, updatedMtus, publicMtu);
|
||||
Assert.assertEquals(vpcMtu, updatedMtus.first());
|
||||
Assert.assertEquals(privateMtu, updatedMtus.second());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user