ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [05/11] ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)
Date Tue, 11 Oct 2016 00:38:31 GMT
AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a61db56
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a61db56
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a61db56

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 0a61db5666f3ee8b82cdab0d50a1c8450b177ae7
Parents: 34c5686
Author: Robert Levas <rlevas@hortonworks.com>
Authored: Mon Oct 10 11:16:01 2016 -0400
Committer: Robert Levas <rlevas@hortonworks.com>
Committed: Mon Oct 10 11:16:01 2016 -0400

----------------------------------------------------------------------
 .../apache/ambari/server/controller/KerberosHelperImpl.java    | 6 +++---
 .../org/apache/ambari/server/serveraction/ServerAction.java    | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
----------------------------------------------------------------------
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 cd4a0b5..e15965b 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
@@ -2890,7 +2890,7 @@ public class KerberosHelperImpl implements KerberosHelper {
           event,
           commandParameters,
           "Create Principals",
-          configuration.getDefaultServerTaskTimeout());
+          Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout()));
 
       RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
       roleGraph.build(stage);
@@ -2913,7 +2913,7 @@ public class KerberosHelperImpl implements KerberosHelper {
           event,
           commandParameters,
           "Destroy Principals",
-          configuration.getDefaultServerTaskTimeout());
+          Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout()));
 
       RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
       roleGraph.build(stage);
@@ -2959,7 +2959,7 @@ public class KerberosHelperImpl implements KerberosHelper {
           event,
           commandParameters,
           "Create Keytabs",
-          configuration.getDefaultServerTaskTimeout());
+          Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout()));
 
       RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
       roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
index b9bf5ce..7c69f52 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
@@ -33,6 +33,12 @@ public interface ServerAction {
   public static final String ACTION_NAME      = "ACTION_NAME";
   public static final String ACTION_USER_NAME = "ACTION_USER_NAME";
 
+  /**
+   * The default timeout (in seconds) to use for potentially long running tasks such as creating
+   * Kerberos principals and generating Kerberos keytab files
+   */
+  int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000;
+
 
   /**
    * Gets the ExecutionCommand property of this ServerAction.


Mime
View raw message