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 org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class KVMInvestigator extends AdapterBase implements Investigator {
|
public class KVMInvestigator extends AdapterBase implements Investigator {
|
||||||
@ -81,7 +82,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
|
|||||||
return haManager.getHostStatus(agent);
|
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);
|
boolean storageSupportHA = storageSupportHa(clusterPools);
|
||||||
if (!storageSupportHA) {
|
if (!storageSupportHA) {
|
||||||
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());
|
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());
|
||||||
@ -89,7 +90,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
|
|||||||
}
|
}
|
||||||
if (!storageSupportHA) {
|
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);
|
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;
|
Status hostStatus = null;
|
||||||
|
|||||||
@ -1779,7 +1779,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
Pair<Integer, Integer> interfaceMTUs = validateMtuConfig(publicMtu, privateMtu, zone.getId());
|
Pair<Integer, Integer> interfaceMTUs = validateMtuConfig(publicMtu, privateMtu, zone.getId());
|
||||||
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu, privateMtu);
|
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu);
|
||||||
|
|
||||||
Network associatedNetwork = null;
|
Network associatedNetwork = null;
|
||||||
if (associatedNetworkId != null) {
|
if (associatedNetworkId != null) {
|
||||||
@ -2067,7 +2067,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
|||||||
return ntwkOff;
|
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) {
|
if (vpcId != null && publicMtu != null) {
|
||||||
VpcVO vpc = _vpcDao.findById(vpcId);
|
VpcVO vpc = _vpcDao.findById(vpcId);
|
||||||
if (vpc == null) {
|
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 " +
|
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()));
|
"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);
|
Mockito.when(vpcVO.getPublicMtu()).thenReturn(vpcMtu);
|
||||||
|
|
||||||
Pair<Integer, Integer> updatedMtus = service.validateMtuConfig(publicMtu, privateMtu, zoneId);
|
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(vpcMtu, updatedMtus.first());
|
||||||
Assert.assertEquals(privateMtu, updatedMtus.second());
|
Assert.assertEquals(privateMtu, updatedMtus.second());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user