mirror of https://github.com/apache/cloudstack.git
Explicitly specify CPU speed for all system VMs, speed of 0 no longer works for VMware
This commit is contained in:
parent
2428b7a083
commit
cfcc5afa92
|
|
@ -87,6 +87,7 @@ public enum Config {
|
|||
ConsoleProxyUrlDomain("Console Proxy", AgentManager.class, String.class, "consoleproxy.url.domain", "realhostip.com", "Console proxy url domain", null),
|
||||
ConsoleProxyLoadscanInterval("Console Proxy", AgentManager.class, String.class, "consoleproxy.loadscan.interval", "10000", "The time interval(in milliseconds) to scan console proxy working-load info", null),
|
||||
ConsoleProxyRamSize("Console Proxy", AgentManager.class, Integer.class, "consoleproxy.ram.size", "1024", "RAM size (in MB) used to create new console proxy VMs", null),
|
||||
ConsoleProxyCpuMHz("Console Proxy", AgentManager.class, Integer.class, "consoleproxy.cpu.mhz", "512", "CPU speed (in MHz) used to create new console proxy VMs", null),
|
||||
ConsoleProxySessionMax("Console Proxy", AgentManager.class, Integer.class, "consoleproxy.session.max", "50", "The max number of viewer sessions console proxy is configured to serve for", null),
|
||||
ConsoleProxySessionTimeout("Console Proxy", AgentManager.class, Integer.class, "consoleproxy.session.timeout", "300000", "Timeout(in milliseconds) that console proxy tries to maintain a viewer session before it times out the session for no activity", null),
|
||||
ConsoleProxyDisableRpFilter("Console Proxy", AgentManager.class, Integer.class, "consoleproxy.disable.rpfilter", "true", "disable rp_filter on console proxy VM public interface", null),
|
||||
|
|
@ -120,6 +121,7 @@ public enum Config {
|
|||
PingTimeout("Advanced", AgentManager.class, Float.class, "ping.timeout", "2.5", "Multiplier to ping.interval before announcing an agent has timed out", null),
|
||||
Port("Advanced", AgentManager.class, Integer.class, "port", "8250", "Port to listen on for agent connection.", null),
|
||||
RouterRamSize("Advanced", NetworkManager.class, Integer.class, "router.ram.size", "128", "Default RAM for router VM in MB.", null),
|
||||
RouterCpuMHz("Advanced", NetworkManager.class, Integer.class, "router.cpu.mhz", "500", "Default CPU speed (MHz) for router VM.", null),
|
||||
RestartRetryInterval("Advanced", HighAvailabilityManager.class, Integer.class, "restart.retry.interval", "600", "Time in seconds between retries to restart a vm", null),
|
||||
RouterCleanupInterval("Advanced", ManagementServer.class, Integer.class, "router.cleanup.interval", "3600", "Time in seconds identifies when to stop router when there are no user vms associated with it", null),
|
||||
RouterStatsInterval("Advanced", NetworkManager.class, Integer.class, "router.stats.interval", "300", "Interval to report router statistics.", null),
|
||||
|
|
@ -143,6 +145,7 @@ public enum Config {
|
|||
EventPurgeDelay("Advanced", ManagementServer.class, Integer.class, "event.purge.delay", "0", "Events older than specified number days will be purged", 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", null, "RAM size (in MB) used to create new secondary storage vms", null),
|
||||
SecStorageVmCpuMHz("Advanced", AgentManager.class, Integer.class, "secstorage.vm.cpu.mhz", null, "CPU speed (in MHz) used to create new secondary storage vms", null),
|
||||
MaxTemplateAndIsoSize("Advanced", ManagementServer.class, Long.class, "max.template.iso.size", "50", "The maximum size for a downloaded template or ISO (in GB).", null),
|
||||
SecStorageAllowedInternalDownloadSites("Advanced", ManagementServer.class, String.class, "secstorage.allowed.internal.sites", null, "Comma separated list of cidrs internal to the datacenter that can host template download servers", null),
|
||||
SecStorageEncryptCopy("Advanced", ManagementServer.class, Boolean.class, "secstorage.encrypt.copy", "false", "Use SSL method used to encrypt copy traffic between zones", "true,false"),
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ public interface ConsoleProxyManager extends Manager {
|
|||
public static final int DEFAULT_PROXY_CAPACITY = 50;
|
||||
public static final int DEFAULT_STANDBY_CAPACITY = 10;
|
||||
public static final int DEFAULT_PROXY_VM_RAMSIZE = 1024; // 1G
|
||||
public static final int DEFAULT_PROXY_VM_CPUMHZ = 500; // 500 MHz
|
||||
|
||||
public static final int DEFAULT_PROXY_CMD_PORT = 8001;
|
||||
public static final int DEFAULT_PROXY_VNC_PORT = 0;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
|
|||
import com.cloud.vm.ConsoleProxyVO;
|
||||
import com.cloud.vm.NicProfile;
|
||||
import com.cloud.vm.ReservationContext;
|
||||
import com.cloud.vm.SecondaryStorageVmVO;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachine.State;
|
||||
|
|
@ -196,6 +195,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
|||
private int _standbyCapacity = ConsoleProxyManager.DEFAULT_STANDBY_CAPACITY;
|
||||
|
||||
private int _proxyRamSize;
|
||||
private int _proxyCpuMHz;
|
||||
private boolean _use_lvm;
|
||||
private boolean _use_storage_vm;
|
||||
private boolean _disable_rp_filter = false;
|
||||
|
|
@ -1270,15 +1270,16 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
|||
|
||||
Map<String, String> configs = configDao.getConfiguration("management-server", params);
|
||||
|
||||
_proxyRamSize = NumbersUtil.parseInt(configs.get("consoleproxy.ram.size"), DEFAULT_PROXY_VM_RAMSIZE);
|
||||
|
||||
String value = configs.get("consoleproxy.cmd.port");
|
||||
_proxyRamSize = NumbersUtil.parseInt(configs.get(Config.ConsoleProxyRamSize.key()), DEFAULT_PROXY_VM_RAMSIZE);
|
||||
_proxyCpuMHz = NumbersUtil.parseInt(configs.get(Config.ConsoleProxyCpuMHz.key()), DEFAULT_PROXY_VM_CPUMHZ);
|
||||
|
||||
String value = configs.get(Config.ConsoleProxyCmdPort.key());
|
||||
value = configs.get("consoleproxy.sslEnabled");
|
||||
if (value != null && value.equalsIgnoreCase("true")) {
|
||||
_sslEnabled = true;
|
||||
}
|
||||
|
||||
value = configs.get("consoleproxy.capacityscan.interval");
|
||||
value = configs.get(Config.ConsoleProxyCapacityScanInterval.key());
|
||||
_capacityScanInterval = NumbersUtil.parseLong(value, DEFAULT_CAPACITY_SCAN_INTERVAL);
|
||||
|
||||
_capacityPerProxy = NumbersUtil.parseInt(configs.get("consoleproxy.session.max"), DEFAULT_PROXY_CAPACITY);
|
||||
|
|
@ -1295,7 +1296,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
|||
_disable_rp_filter = true;
|
||||
}
|
||||
|
||||
value = configs.get("system.vm.use.local.storage");
|
||||
value = configs.get(Config.SystemVMUseLocalStorage.key());
|
||||
if (value != null && value.equalsIgnoreCase("true")) {
|
||||
_use_lvm = true;
|
||||
}
|
||||
|
|
@ -1335,7 +1336,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
|||
_itMgr.registerGuru(VirtualMachine.Type.ConsoleProxy, this);
|
||||
|
||||
boolean useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Console Proxy", 1, _proxyRamSize, 0, 0, 0, true, null, Network.GuestIpType.Virtual,
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Console Proxy", 1, _proxyRamSize, _proxyCpuMHz, 0, 0, true, null, Network.GuestIpType.Virtual,
|
||||
useLocalStorage, true, null, true);
|
||||
_serviceOffering.setUniqueName("Cloud.com-ConsoleProxy");
|
||||
_serviceOffering = _offeringDao.persistSystemServiceOffering(_serviceOffering);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import com.cloud.vm.VirtualMachineProfile;
|
|||
*/
|
||||
public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkApplianceService{
|
||||
public static final int DEFAULT_ROUTER_VM_RAMSIZE = 128; // 128M
|
||||
public static final int DEFAULT_ROUTER_CPU_MHZ = 500; // 500 MHz
|
||||
public static final boolean USE_POD_VLAN = false;
|
||||
/**
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
NicDao _nicDao;
|
||||
|
||||
int _routerRamSize;
|
||||
int _routerCpuMHz;
|
||||
int _retry = 2;
|
||||
String _instance;
|
||||
String _mgmt_host;
|
||||
|
|
@ -542,8 +543,8 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
final Map<String, String> configs = _configDao.getConfiguration("AgentManager", params);
|
||||
|
||||
_mgmt_host = configs.get("host");
|
||||
_routerRamSize = NumbersUtil.parseInt(configs.get(Config.RouterRamSize.key()), DEFAULT_ROUTER_VM_RAMSIZE);
|
||||
|
||||
_routerRamSize = NumbersUtil.parseInt(configs.get("router.ram.size"), DEFAULT_ROUTER_VM_RAMSIZE);
|
||||
_routerCpuMHz = NumbersUtil.parseInt(configs.get("router.cpu.mhz"), DEFAULT_ROUTER_CPU_MHZ);
|
||||
String value = configs.get("start.retry");
|
||||
_retry = NumbersUtil.parseInt(value, 2);
|
||||
|
||||
|
|
@ -569,7 +570,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
_itMgr.registerGuru(VirtualMachine.Type.DomainRouter, this);
|
||||
|
||||
boolean useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_offering = new ServiceOfferingVO("System Offering For Software Router", 1, _routerRamSize, 0, 0, 0, true, null,
|
||||
_offering = new ServiceOfferingVO("System Offering For Software Router", 1, _routerRamSize, _routerCpuMHz, 0, 0, true, null,
|
||||
Network.GuestIpType.Virtual, useLocalStorage, true, null, true);
|
||||
_offering.setUniqueName("Cloud.Com-SoftwareRouter");
|
||||
_offering = _serviceOfferingDao.persistSystemServiceOffering(_offering);
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
|||
private long _capacityScanInterval = DEFAULT_CAPACITY_SCAN_INTERVAL;
|
||||
|
||||
private int _secStorageVmRamSize;
|
||||
private int _secStorageVmCpuMHz;
|
||||
|
||||
private String _instance;
|
||||
private boolean _useLocalStorage;
|
||||
|
|
@ -742,6 +743,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
|||
Map<String, String> configs = configDao.getConfiguration("management-server", params);
|
||||
|
||||
_secStorageVmRamSize = NumbersUtil.parseInt(configs.get("secstorage.vm.ram.size"), DEFAULT_SS_VM_RAMSIZE);
|
||||
_secStorageVmCpuMHz = NumbersUtil.parseInt(configs.get("secstorage.vm.cpu.mhz"), DEFAULT_SS_VM_CPUMHZ);
|
||||
String useServiceVM = configDao.getValue("secondary.storage.vm");
|
||||
boolean _useServiceVM = false;
|
||||
if ("true".equalsIgnoreCase(useServiceVM)) {
|
||||
|
|
@ -778,7 +780,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
|||
_itMgr.registerGuru(VirtualMachine.Type.SecondaryStorageVm, this);
|
||||
|
||||
_useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Secondary Storage VM", 1, _secStorageVmRamSize, 0, 0, 0, true, null,
|
||||
_serviceOffering = new ServiceOfferingVO("System Offering For Secondary Storage VM", 1, _secStorageVmRamSize, _secStorageVmCpuMHz, 0, 0, true, null,
|
||||
Network.GuestIpType.Virtual, _useLocalStorage, true, null, true);
|
||||
_serviceOffering.setUniqueName("Cloud.com-SecondaryStorage");
|
||||
_serviceOffering = _offeringDao.persistSystemServiceOffering(_serviceOffering);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import com.cloud.vm.SecondaryStorageVmVO;
|
|||
public interface SecondaryStorageVmManager extends Manager {
|
||||
|
||||
public static final int DEFAULT_SS_VM_RAMSIZE = 256; // 256M
|
||||
|
||||
public static final int DEFAULT_SS_VM_CPUMHZ = 500; // 500 MHz
|
||||
|
||||
public static final String ALERT_SUBJECT = "secondarystoragevm-alert";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue