This is an automated email from the ASF dual-hosted git repository. wuzhiguo pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new df1e7503bd AMBARI-25311: FinalizeKerberosServerAction timeout has to be configurable (#3404) df1e7503bd is described below commit df1e7503bd38938e1179cfd7864bae691b79bc4d Author: Zhiguo Wu <wuzhi...@apache.org> AuthorDate: Tue Oct 25 10:07:35 2022 +0800 AMBARI-25311: FinalizeKerberosServerAction timeout has to be configurable (#3404) --- ambari-server/docs/configuration/index.md | 11 ++++++----- .../ambari/server/configuration/Configuration.java | 17 +++++++++++++++++ .../ambari/server/controller/KerberosHelperImpl.java | 4 ++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md index 24419504c4..4229a3db77 100644 --- a/ambari-server/docs/configuration/index.md +++ b/ambari-server/docs/configuration/index.md @@ -228,18 +228,19 @@ The following are the properties which can be used to configure Ambari. | server.jdbc.rca.user.passwd | The password for the user when connecting to the database which stores RCA information. |`mapred` | | server.jdbc.user.name | The user name used to login to the database. |`ambari` | | server.jdbc.user.passwd | The password for the user when logging into the database. |`bigdata` | +| server.kerberos.finalize.timeout | The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands. |`600` | | server.locks.profiling | Enable the profiling of internal locks. |`false` | | server.metrics.retrieval-service.thread.priority | The priority of threads used by the service which retrieves JMX and REST metrics directly from their respective endpoints. |`5` | -| server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`16` | -| server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`32` | -| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`320` | +| server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`4` | +| server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`8` | +| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`80` | | server.operations.retry-attempts | The number of retry attempts for failed API and blueprint operations. |`0` | | server.os_family | The operating system family for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.<br/><br/>The following are examples of valid values:<ul><li>`redhat`<li>`ubuntu`</ul> | | | server.os_type | The operating system version for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.<br/><br/>The following are examples of valid values:<ul><li>`6`<li>`7`</ul> | | | server.persistence.type | The type of database connection being used. Unless using an embedded PostgresSQL server, then this should be `remote`.<br/><br/>The following are examples of valid values:<ul><li>`local`<li>`remote`</ul> |`local` | | server.property-provider.threadpool.completion.timeout | The maximum time, in milliseconds, that federated requests for data can execute before being terminated. Increasing this value could result in degraded performanc from the REST APIs. |`5000` | -| server.property-provider.threadpool.size.core | The core number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`16` | -| server.property-provider.threadpool.size.max | The maximum number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`32` | +| server.property-provider.threadpool.size.core | The core number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`4` | +| server.property-provider.threadpool.size.max | The maximum number of threads that will be used to retrieve data from federated datasources, such as remote JMX endpoints. |`8` | | server.property-provider.threadpool.worker.size | The maximum size of pending federated datasource requests, such as those to JMX endpoints, which can be queued before rejecting new requests. |`2147483647` | | server.requestlogs.namepattern | The pattern of request log file name |`ambari-access-yyyy_mm_dd.log` | | server.requestlogs.path | The location on the Ambari Server where request logs can be created. | | diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 54b33a364f..e7dc5a62de 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2606,6 +2606,13 @@ public class Configuration { public static final ConfigurationProperty<Integer> DEFAULT_MAX_DEGREE_OF_PARALLELISM_FOR_UPGRADES = new ConfigurationProperty<>( "stack.upgrade.default.parallelism", 100); + /** + * The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands. + */ + @Markdown(description = "The timeout, in seconds, when finalizing Kerberos enable/disable/regenerate commands.") + public static final ConfigurationProperty<Integer> KERBEROS_SERVER_ACTION_FINALIZE_SECONDS = new ConfigurationProperty<>( + "server.kerberos.finalize.timeout", 600); + /** * Fully qualified class name of the strategy used to form host groups for add service request layout recommendation. */ @@ -5555,6 +5562,16 @@ public class Configuration { return Integer.parseInt(getProperty(DEFAULT_MAX_DEGREE_OF_PARALLELISM_FOR_UPGRADES)); } + /** + * Get the timeout, in seconds, when finalizing Kerberos + * enable/disable/regenerate commands. + * + * @return the timeout, in seconds, defaulting to 600. + */ + public int getKerberosServerActionFinalizeTimeout() { + return Integer.parseInt(getProperty(KERBEROS_SERVER_ACTION_FINALIZE_SECONDS)); + } + /** * @return The class of the host group strategy for add service requests. * @throws ClassNotFoundException if the specified class is not found diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java index 064c05ddf1..9473344222 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java @@ -3711,7 +3711,7 @@ public class KerberosHelperImpl implements KerberosHelper { if (dataDirectory != null) { commandParameters.put(KerberosServerAction.DATA_DIRECTORY, dataDirectory.getAbsolutePath()); } - + int timeout = configuration.getKerberosServerActionFinalizeTimeout(); Stage stage = createServerActionStage(requestStageContainer.getLastStageId(), cluster, requestStageContainer.getId(), @@ -3721,7 +3721,7 @@ public class KerberosHelperImpl implements KerberosHelper { FinalizeKerberosServerAction.class, event, commandParameters, - "Finalize Operations", 300); + "Finalize Operations", timeout); RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder); roleGraph.build(stage); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@ambari.apache.org For additional commands, e-mail: commits-h...@ambari.apache.org