Skip to content

Commit a6a54a2

Browse files
author
frank
committed
Bug 14189 - multiple physical nw - SSVM fail to download guest templates from storage server which is in isolated network only accessible by host's bridge
if storage network is present, don't set route through private ip when adding internal download site status 14189: resovled fixed
1 parent 8071f51 commit a6a54a2

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,12 @@ public String allowOutgoingOnPrivate(String destCidr) {
797797
s_logger.warn("Error in allowing outgoing to " + destCidr + ", err=" + result );
798798
return "Error in allowing outgoing to " + destCidr + ", err=" + result;
799799
}
800-
addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, destCidr);
800+
801+
if (_storageIp == null) {
802+
/* only set route when no storage network present */
803+
addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, destCidr);
804+
}
805+
801806
return null;
802807
}
803808

‎server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,6 @@ public boolean generateVMSetupCommand(Long ssAHostId) {
374374
}
375375
}
376376
List<? extends Nic> nics = _networkMgr.getNicsForTraffic(secStorageVm.getId(), TrafficType.Management);
377-
Nic privateNic = nics.get(0);
378-
String privateCidr = NetUtils.ipAndNetMaskToCidr(privateNic.getIp4Address(), privateNic.getNetmask());
379-
String publicCidr = NetUtils.ipAndNetMaskToCidr(secStorageVm.getPublicIpAddress(), secStorageVm.getPublicNetmask());
380377
setupCmd.setAllowedInternalSites(allowedCidrs.toArray(new String[allowedCidrs.size()]));
381378
}
382379
String copyPasswd = _configDao.getValue("secstorage.copy.password");

0 commit comments

Comments
 (0)