mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch '4.19' into 4.20
This commit is contained in:
commit
bf1ff10a90
@ -400,10 +400,13 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
|
||||
}
|
||||
String[] cidrs = _allowedInternalSites.split(",");
|
||||
for (String cidr : cidrs) {
|
||||
if (NetUtils.isValidIp4Cidr(cidr) || NetUtils.isValidIp4(cidr) || !cidr.startsWith("0.0.0.0")) {
|
||||
if (NetUtils.getCleanIp4Cidr(cidr).equals(cidr)) {
|
||||
logger.warn(String.format("Invalid CIDR %s in %s", cidr, SecStorageAllowedInternalDownloadSites.key()));
|
||||
if (NetUtils.isValidIp4Cidr(cidr) && !cidr.startsWith("0.0.0.0")) {
|
||||
if (! NetUtils.getCleanIp4Cidr(cidr).equals(cidr)) {
|
||||
logger.warn("Invalid CIDR {} in {}", cidr, SecStorageAllowedInternalDownloadSites.key());
|
||||
}
|
||||
allowedCidrs.add(NetUtils.getCleanIp4Cidr(cidr));
|
||||
} else if (NetUtils.isValidIp4(cidr) && !cidr.startsWith("0.0.0.0")) {
|
||||
logger.warn("Ip address is not a valid CIDR; {} consider using {}/32", cidr, cidr);
|
||||
allowedCidrs.add(cidr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3167,9 +3167,12 @@ public class VirtualMachineMO extends BaseMO {
|
||||
|
||||
int deviceCount = 0;
|
||||
int ideDeviceUnitNumber = -1;
|
||||
if (devices != null && devices.size() > 0) {
|
||||
if (devices != null) {
|
||||
for (VirtualDevice device : devices) {
|
||||
if (device instanceof VirtualDisk && (controllerKey == device.getControllerKey())) {
|
||||
if (device.getControllerKey() == null || device.getControllerKey() != controllerKey) {
|
||||
continue;
|
||||
}
|
||||
if (device instanceof VirtualDisk || device instanceof VirtualCdrom) {
|
||||
deviceCount++;
|
||||
ideDeviceUnitNumber = device.getUnitNumber();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user