kvm: fix router.aggregation.command.each.timeout is reset to 600 when update other kvm configs (#4496)

* kvm: fix router.aggregation.command.each.timeout is reset to 600 when update other kvm configs

* remove _params
This commit is contained in:
Wei Zhou 2020-11-30 11:52:16 +01:00 committed by GitHub
parent e8ee8e9fbe
commit e82813b509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -87,7 +87,6 @@ public class VirtualRoutingResource {
private int _retry;
private int _port;
private Duration _eachTimeout;
private Map<String, Object> _params;
private String _cfgVersion = "1.0";
@ -397,7 +396,7 @@ 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.parseLong(value, 600));
if (s_logger.isDebugEnabled()){
@ -410,7 +409,6 @@ public class VirtualRoutingResource {
public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
_name = name;
_params = params;
String value = (String)params.get("ssh.sleep");
_sleep = NumbersUtil.parseInt(value, 10) * 1000;