mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.13'
This commit is contained in:
commit
d0e3c577c0
@ -397,9 +397,12 @@ public class VirtualRoutingResource {
|
||||
}
|
||||
|
||||
public boolean configureHostParams(final Map<String, String> params) {
|
||||
if (_params.get("router.aggregation.command.each.timeout") == null) {
|
||||
if (_params.get("router.aggregation.command.each.timeout") != null) {
|
||||
String value = (String)params.get("router.aggregation.command.each.timeout");
|
||||
_eachTimeout = Duration.standardSeconds(NumbersUtil.parseInt(value, 10));
|
||||
_eachTimeout = Duration.standardSeconds(NumbersUtil.parseLong(value, 600));
|
||||
if (s_logger.isDebugEnabled()){
|
||||
s_logger.debug("The router.aggregation.command.each.timeout in seconds is set to " + _eachTimeout.getStandardSeconds());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
// under the License.
|
||||
package com.cloud.agent;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
|
||||
import com.cloud.agent.api.Answer;
|
||||
@ -153,5 +155,5 @@ public interface AgentManager {
|
||||
|
||||
void notifyMonitorsOfRemovedHost(long hostId, long clusterId);
|
||||
|
||||
void propagateChangeToAgents();
|
||||
void propagateChangeToAgents(Map<String, String> params);
|
||||
}
|
||||
|
||||
@ -1824,11 +1824,11 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propagateChangeToAgents() {
|
||||
s_logger.debug("Propagating changes on host parameters to the agents");
|
||||
Map<Long, List<Long>> hostsPerZone = getHostsPerZone();
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("router.aggregation.command.each.timeout", _configDao.getValue("router.aggregation.command.each.timeout"));
|
||||
sendCommandToAgents(hostsPerZone, params);
|
||||
public void propagateChangeToAgents(Map<String, String> params) {
|
||||
if (params != null && ! params.isEmpty()) {
|
||||
s_logger.debug("Propagating changes on host parameters to the agents");
|
||||
Map<Long, List<Long>> hostsPerZone = getHostsPerZone();
|
||||
sendCommandToAgents(hostsPerZone, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1116,8 +1116,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
storage.configure("Storage", new HashMap<String, Object>());
|
||||
if (params.get("router.aggregation.command.each.timeout") != null) {
|
||||
String value = (String)params.get("router.aggregation.command.each.timeout");
|
||||
Integer intValue = NumbersUtil.parseInt(value, 600);
|
||||
storage.persist("router.aggregation.command.each.timeout", String.valueOf(intValue));
|
||||
Long longValue = NumbersUtil.parseLong(value, 600);
|
||||
storage.persist("router.aggregation.command.each.timeout", String.valueOf(longValue));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -486,7 +486,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
globalSettingUpdated.equals(IndirectAgentLBServiceImpl.IndirectAgentLBAlgorithm.key())) {
|
||||
_indirectAgentLB.propagateMSListToAgents();
|
||||
} else if (globalSettingUpdated.equals(Config.RouterAggregationCommandEachTimeout.toString())) {
|
||||
_agentManager.propagateChangeToAgents();
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put(Config.RouterAggregationCommandEachTimeout.toString(), _configDao.getValue(Config.RouterAggregationCommandEachTimeout.toString()));
|
||||
_agentManager.propagateChangeToAgents(params);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user