kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: [mini-kdc] /dev/stderr instead of STDERR for kdc logs
Date Mon, 10 Apr 2017 23:00:15 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 9d03677e4 -> 1767eba47


[mini-kdc] /dev/stderr instead of STDERR for kdc logs

This is a workaround for kdc5krb trying to open STDERR in read-write
mode "a+" (krb5/src/lib/kadm5/logger.c) in versions prior to 1.13.

Since mini-kdc is run via the SubProcess utility, its STDERR is piped
via write end of the pipe and cannot be opened in read mode.  That leads
to error messages like:

  krb5kdc: cannot parse <STDERR>
  krb5kdc: warning - logging entry syntax error

Specifiying 'FILE:/dev/stderr' allows for using the same destination
for the error output, but not opening the standard error in read mode.

NOTE: the issue in logger.c has been addressed by changelist a8592307
      in Kerberos repository and the fix is included in krb5 starting
      version 1.13.

Change-Id: I212e2cceb80acbe88040b16d9055cf01ac8a761b
Reviewed-on: http://gerrit.cloudera.org:8080/6602
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <danburkert@apache.org>


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

Branch: refs/heads/master
Commit: 1767eba471b5177a4198e73ddb60484e5fcce7cd
Parents: 9d03677
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Mon Apr 10 12:21:27 2017 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Mon Apr 10 22:59:16 2017 +0000

----------------------------------------------------------------------
 java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java | 2 +-
 src/kudu/security/test/mini_kdc.cc                                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/1767eba4/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java b/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java
index b36e344..e58ebc1 100644
--- a/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java
+++ b/java/kudu-client/src/test/java/org/apache/kudu/client/MiniKdc.java
@@ -229,7 +229,7 @@ public class MiniKdc implements Closeable {
   private void createKrb5Conf() throws IOException {
     List<String> contents = ImmutableList.of(
         "[logging]",
-        "   kdc = STDERR",
+        "   kdc = FILE:/dev/stderr",
 
         "[libdefaults]",
         "   default_realm = " + options.realm,

http://git-wip-us.apache.org/repos/asf/kudu/blob/1767eba4/src/kudu/security/test/mini_kdc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/test/mini_kdc.cc b/src/kudu/security/test/mini_kdc.cc
index fac0767..1df96ac 100644
--- a/src/kudu/security/test/mini_kdc.cc
+++ b/src/kudu/security/test/mini_kdc.cc
@@ -224,7 +224,7 @@ $1 = {
 Status MiniKdc::CreateKrb5Conf() const {
   static const string kFileTemplate = R"(
 [logging]
-    kdc = STDERR
+    kdc = FILE:/dev/stderr
 
 [libdefaults]
     default_realm = $1


Mime
View raw message