bug 8875: add new management cidr configuration for vmware: if there are multiple management servers, each of them may talk to domR, so that means domR needs to know the routing to all the mgt servers.

status 8875: resolved fixed
This commit is contained in:
Edison Su 2011-03-07 16:47:44 -05:00
parent ccab6c21c4
commit 670afd2331
2 changed files with 8 additions and 3 deletions

View File

@ -144,6 +144,7 @@ public enum Config {
LinkLocalIpNums("Advanced", ManagementServer.class, Integer.class, "linkLocalIp.nums", "10", "The number of link local ip that needed by domR(in power of 2)", null),
HypervisorList("Advanced", ManagementServer.class, String.class, "hypervisor.list", HypervisorType.KVM + "," + HypervisorType.XenServer + "," + HypervisorType.VMware, "The list of hypervisors that this deployment will use.", "hypervisorList"),
ManagementHostIPAdr("Advanced", ManagementServer.class, String.class, "host", "localhost", "The ip address of management server", null),
ManagementNetwork("Advanced", ManagementServer.class, String.class, "management.network.cidr", null, "The cidr of management server network", null),
EventPurgeDelay("Advanced", ManagementServer.class, Integer.class, "event.purge.delay", "15", "Events older than specified number days will be purged. Set this value to 0 to never delete events", null),
UseLocalStorage("Premium", ManagementServer.class, Boolean.class, "use.local.storage", "false", "Should we use the local storage if it's available?", null),
SecStorageVmRamSize("Advanced", AgentManager.class, Integer.class, "secstorage.vm.ram.size", String.valueOf(SecondaryStorageVmManager.DEFAULT_SS_VM_RAMSIZE), "RAM size (in MB) used to create new secondary storage vms", null),

View File

@ -282,6 +282,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
int _retry = 2;
String _instance;
String _mgmt_host;
String _mgmt_cidr;
int _routerStatsInterval = 300;
private ServiceOfferingVO _offering;
@ -901,9 +902,12 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
if(s_logger.isInfoEnabled()) {
s_logger.info("Add management server explicit route to DomR.");
}
buf.append(" mgmtcidr=").append(_mgmt_host);
buf.append(" localgw=").append(dest.getPod().getGateway());
_mgmt_cidr = _configDao.getValue(Config.ManagementNetwork.key());
if (NetUtils.isValidCIDR(_mgmt_cidr)) {
buf.append(" mgmtcidr=").append(_mgmt_cidr);
buf.append(" localgw=").append(dest.getPod().getGateway());
}
} else {
if(s_logger.isInfoEnabled()) {
s_logger.info("Management server host is at same subnet at pod private network, don't add explict route to DomR");