mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5112
[Baremetal]Make IPMI retry times configurable Conflicts: server/src/com/cloud/configuration/Config.java setup/db/db/schema-420to421.sql
This commit is contained in:
parent
48a4391568
commit
d3bff27ef9
|
|
@ -116,6 +116,8 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource
|
|||
protected Script2 _bootOrRebootCommand;
|
||||
protected String _vmName;
|
||||
protected VMInstanceDao vmDao;
|
||||
protected int ipmiRetryTimes = 5;
|
||||
|
||||
|
||||
private void changeVmState(String vmName, VirtualMachine.State state) {
|
||||
synchronized (_vms) {
|
||||
|
|
@ -183,14 +185,20 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource
|
|||
_isEchoScAgent = Boolean.valueOf(echoScAgent);
|
||||
}
|
||||
|
||||
ConfigurationDao configDao = ComponentContext.getComponent(ConfigurationDao.class);
|
||||
String ipmiIface = "default";
|
||||
try {
|
||||
ConfigurationDao configDao = ComponentContext.getComponent(ConfigurationDao.class);
|
||||
ipmiIface = configDao.getValue(Config.BaremetalIpmiLanInterface.key());
|
||||
} catch (Exception e) {
|
||||
s_logger.debug(e.getMessage(), e);
|
||||
}
|
||||
|
||||
try {
|
||||
ipmiRetryTimes = Integer.valueOf(configDao.getValue(Config.BaremetalIpmiRetryTimes.key()));
|
||||
} catch (Exception e) {
|
||||
s_logger.debug(e.getMessage(), e);
|
||||
}
|
||||
|
||||
String injectScript = "scripts/util/ipmi.py";
|
||||
String scriptPath = Script.findScript("", injectScript);
|
||||
if (scriptPath == null) {
|
||||
|
|
@ -286,7 +294,7 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource
|
|||
}
|
||||
|
||||
protected boolean doScript(Script cmd, OutputInterpreter interpreter) {
|
||||
return doScript(cmd, interpreter, 5);
|
||||
return doScript(cmd, interpreter, ipmiRetryTimes);
|
||||
}
|
||||
|
||||
protected boolean doScript(Script cmd, OutputInterpreter interpreter, int retry) {
|
||||
|
|
|
|||
|
|
@ -192,6 +192,14 @@ public enum Config {
|
|||
AlertPurgeInterval("Advanced", ManagementServer.class, Integer.class, "alert.purge.interval", "86400", "The interval (in seconds) to wait before running the alert purge thread", null),
|
||||
AlertPurgeDelay("Advanced", ManagementServer.class, Integer.class, "alert.purge.delay", "0", "Alerts older than specified number days will be purged. Set this value to 0 to never delete alerts", null),
|
||||
HostReservationReleasePeriod("Advanced", ManagementServer.class, Integer.class, "host.reservation.release.period", "300000", "The interval in milliseconds between host reservation release checks", null),
|
||||
UseSystemPublicIps("Advanced", ManagementServer.class, Boolean.class, "use.system.public.ips", "true",
|
||||
"If true, when account has dedicated public ip range(s), once the ips dedicated to the account have been" +
|
||||
" consumed ips will be acquired from the system pool",
|
||||
null, ConfigurationParameterScope.account.toString()),
|
||||
UseSystemGuestVlans("Advanced", ManagementServer.class, Boolean.class, "use.system.guest.vlans", "true",
|
||||
"If true, when account has dedicated guest vlan range(s), once the vlans dedicated to the account have been" +
|
||||
" consumed vlans will be allocated from the system pool",
|
||||
null, ConfigurationParameterScope.account.toString()),
|
||||
// LB HealthCheck Interval.
|
||||
LBHealthCheck("Advanced", ManagementServer.class, String.class, "healthcheck.update.interval", "600",
|
||||
"Time Interval to fetch the LB health check states (in sec)", null),
|
||||
|
|
@ -379,6 +387,7 @@ public enum Config {
|
|||
IntervalToEchoBaremetalSecurityGroupAgent("Advanced", ManagementServer.class, Integer.class, "interval.baremetal.securitygroup.agent.echo", "10", "Interval to echo baremetal security group agent, in seconds", null),
|
||||
TimeoutToEchoBaremetalSecurityGroupAgent("Advanced", ManagementServer.class, Integer.class, "timeout.baremetal.securitygroup.agent.echo", "3600", "Timeout to echo baremetal security group agent, in seconds, the provisioning process will be treated as a failure", null),
|
||||
BaremetalIpmiLanInterface("Advanced", ManagementServer.class, String.class, "baremetal.ipmi.lan.interface", "default", "option specified in -I option of impitool. candidates are: open/bmc/lipmi/lan/lanplus/free/imb, see ipmitool man page for details. default valule 'default' means using default option of ipmitool", null),
|
||||
BaremetalIpmiRetryTimes("Advanced", ManagementServer.class, String.class, "baremetal.ipmi.fail.retry", "5", "ipmi interface will be temporary out of order after power opertions(e.g. cycle, on), it leads following commands fail immediately. The value specifies retry times before accounting it as real failure", null),
|
||||
|
||||
ApiLimitEnabled("Advanced", ManagementServer.class, Boolean.class, "api.throttling.enabled", "false", "Enable/disable Api rate limit", null),
|
||||
ApiLimitInterval("Advanced", ManagementServer.class, Integer.class, "api.throttling.interval", "1", "Time interval (in seconds) to reset API count", null),
|
||||
|
|
|
|||
|
|
@ -225,4 +225,4 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag
|
|||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'baremetal.ipmi.fail.retry', 'default', "ipmi interface will be temporary out of order after power opertions(e.g. cycle, on), it leads following commands fail immediately. The value specifies retry times before accounting it as real failure");
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vmware.hung.wokervm.timeout', '7200', 'Worker VM timeout in seconds');
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 'management-server', "alert.smtp.connectiontimeout", "30000", "Socket connection timeout value in milliseconds. -1 for infinite timeout.");
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 'management-server', "alert.smtp.timeout", "30000", "Socket I/O timeout value in milliseconds. -1 for infinite timeout.");
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 'management-server', "alert.smtp.timeout", "30000", "Socket I/O timeout value in milliseconds. -1 for infinite timeout.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue