Repository: ambari
Updated Branches:
  refs/heads/trunk a52eb51d1 -> adbfa0933


AMBARI-11481. Kerberos Descriptor removal failure during cleanup should not be 
critical (Emil Anca via rlevas)


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

Branch: refs/heads/trunk
Commit: adbfa0933cf3ec854ea7274ad165353c4071ea9a
Parents: a52eb51
Author: Emil Anca <ea...@hortonworks.com>
Authored: Thu May 28 11:22:25 2015 -0400
Committer: Robert Levas <rle...@hortonworks.com>
Committed: Thu May 28 11:22:30 2015 -0400

----------------------------------------------------------------------
 .../server/serveraction/kerberos/CleanupServerAction.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/adbfa093/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
index 64ebe0f..b6c2f12 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
@@ -77,8 +77,6 @@ public class CleanupServerAction extends KerberosServerAction 
{
     Cluster cluster = getCluster();
     if (cluster.getSecurityType().equals(SecurityType.NONE)) { // double check 
this is done in a non secure environment
       removeKerberosArtifact(cluster);
-      LOG.info("Kerberos descriptor removed successfully.");
-      actionLog.writeStdOut("Kerberos descriptor removed successfully.");
     }
 
     return createCommandReport(0, HostRoleStatus.COMPLETED, "{}", 
actionLog.getStdOut(), actionLog.getStdErr());
@@ -104,8 +102,11 @@ public class CleanupServerAction extends 
KerberosServerAction {
 
     try {
       artifactProvider.deleteResources(predicate);
+      LOG.info("Kerberos descriptor removed successfully.");
+      actionLog.writeStdOut("Kerberos descriptor removed successfully.");
     } catch (NoSuchResourceException e) {
-      throw new AmbariException("Could not find the Kerberos descriptor to 
delete", e);
+      LOG.warn("The Kerberos descriptor was not found in the database while 
attempting to remove.");
+      actionLog.writeStdOut("The Kerberos descriptor was not found in the 
database while attempting to remove.");
     } catch (Exception e) {
       throw new AmbariException("An unknown error occurred while trying to 
delete the cluster Kerberos descriptor", e);
     }

Reply via email to