You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by go...@apache.org on 2016/03/16 21:58:05 UTC
[14/50] incubator-slider git commit: SLIDER-1065 kdiag test failing
on host without default realm
SLIDER-1065 kdiag test failing on host without default realm
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e1c802aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e1c802aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e1c802aa
Branch: refs/heads/feature/SLIDER-906_docker_support
Commit: e1c802aab21eda940540f219eeef176355665f0e
Parents: 05a1cc4
Author: Steve Loughran <st...@apache.org>
Authored: Mon Jan 18 22:28:13 2016 -0800
Committer: Steve Loughran <st...@apache.org>
Committed: Mon Jan 18 22:28:13 2016 -0800
----------------------------------------------------------------------
.../main/java/org/apache/hadoop/security/KerberosDiags.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e1c802aa/slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java b/slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java
index d43b966..6587550 100644
--- a/slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java
+++ b/slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java
@@ -257,15 +257,14 @@ public class KerberosDiags implements Closeable {
throw new KerberosDiagsFailure(CAT_JVM, e,
"Failed to invoke krb5.Config.getDefaultRealm: %s", e);
} catch (InvocationTargetException e) {
- if (e.toString().contains(NO_DEFAULT_REALM)) {
+ Throwable cause = e.getCause() != null ? e.getCause() : e;
+ if (cause.toString().contains(NO_DEFAULT_REALM)) {
// exception raised if there is no default realm. This is not
// always a problem, so downgrade to a message.
println("Host has no default realm");
- LOG.debug(e.toString(), e);
+ LOG.debug(cause.toString(), cause);
} else {
- Throwable cause = e.getCause() != null ? e.getCause() : e;
- throw new KerberosDiagsFailure(CAT_JVM, cause,
- "Failed get default realm: %s", cause);
+ LOG.warn("Kerberos.getDefaultRealm() failed: {}", cause, cause);
}
}
}