Repository: ambari Updated Branches: refs/heads/branch-2.5 551958219 -> 367c2c95b
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/367c2c95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/367c2c95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/367c2c95 Branch: refs/heads/branch-2.5 Commit: 367c2c95b260fc41fc6708549efe9cbcb0b3bd95 Parents: 5519582 Author: Robert Levas <[email protected]> Authored: Mon Oct 10 11:17:07 2016 -0400 Committer: Robert Levas <[email protected]> Committed: Mon Oct 10 11:17:07 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/367c2c95/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 638af8c..7556a77 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 @@ -2889,7 +2889,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); @@ -2912,7 +2912,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); @@ -2958,7 +2958,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/367c2c95/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.
