ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-9593. Kerberos: configs should include note and represent user.(vbrodetskyi)
Date Thu, 12 Feb 2015 12:17:37 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b3ea5116a -> 1cd12ce36


AMBARI-9593. Kerberos: configs should include note and represent user.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 1cd12ce362c7baee9d0657297ab2618bc8eb59e3
Parents: b3ea511
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Thu Feb 12 14:16:34 2015 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Thu Feb 12 14:16:47 2015 +0200

----------------------------------------------------------------------
 .../kerberos/UpdateKerberosConfigsServerAction.java         | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1cd12ce3/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
index 00886db..728865f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
@@ -29,6 +29,7 @@ import org.apache.ambari.server.serveraction.AbstractServerAction;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.SecurityType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -230,9 +231,11 @@ public class UpdateKerberosConfigsServerAction extends AbstractServerAction
{
 
           Config baseConfig = cluster.getConfig(cr.getType(), cr.getVersionTag());
           if (baseConfig != null) {
-            String authName = "kerberization";
-
-            if (cluster.addDesiredConfig(authName, Collections.singleton(baseConfig)) !=
null) {
+            String authName = controller.getAuthName();
+            String configNote = null;
+            configNote = cluster.getSecurityType() == SecurityType.KERBEROS ?
+                    "Enabling Kerberos on Cluster" : "Disabling Kerberos on Cluster";
+            if (cluster.addDesiredConfig(authName, Collections.singleton(baseConfig), configNote)
!= null) {
               String oldConfigString = (oldConfig != null) ? " from='" + oldConfig.getTag()
+ "'" : "";
               message = "cluster '" + cluster.getClusterName() + "' "
                   + "changed by: '" + authName + "'; "


Mime
View raw message