Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c4e522983 -> eb9c6b431


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/eb9c6b43
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb9c6b43
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb9c6b43

Branch: refs/heads/branch-2.4
Commit: eb9c6b4313dfabe19e433ebd9f8d3c330bfb3f47
Parents: c4e5229
Author: Robert Levas <[email protected]>
Authored: Mon Oct 10 11:33:34 2016 -0400
Committer: Robert Levas <[email protected]>
Committed: Mon Oct 10 11:33:34 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/eb9c6b43/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 70b991a..c5fbf66 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
@@ -2758,7 +2758,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);
@@ -2781,7 +2781,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);
@@ -2827,7 +2827,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/eb9c6b43/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.

Reply via email to