[ 
https://issues.apache.org/jira/browse/KAFKA-5691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468885#comment-16468885
 ] 

ASF GitHub Bot commented on KAFKA-5691:
---------------------------------------

rnpridgeon closed pull request #3608: KAFKA-5691- handle NOAUTH in 
zkUtils.CreateRecursive
URL: https://github.com/apache/kafka/pull/3608
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/scala/kafka/utils/ZkUtils.scala 
b/core/src/main/scala/kafka/utils/ZkUtils.scala
index 6953507c0c9..11db852e5d8 100644
--- a/core/src/main/scala/kafka/utils/ZkUtils.scala
+++ b/core/src/main/scala/kafka/utils/ZkUtils.scala
@@ -1111,6 +1111,10 @@ class ZKCheckedEphemeral(path: String,
                             case Code.INVALIDACL =>
                               error("Invalid ACL")
                               setResult(Code.INVALIDACL)
+                            case Code.NOAUTH =>
+                              // Allows old consumer to register with secure ZK
+                              error("NOAUTH raised on path %s (AUTH may not be 
needed to create children)".format(path))
+                              createRecursive(path, suffix)
                             case _ =>
                               warn("ZooKeeper event while creating 
registration node: %s %s".format(path, Code.get(rc)))
                               setResult(Code.get(rc))


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> ZKUtils.CreateRecursive should handle NOAUTH
> --------------------------------------------
>
>                 Key: KAFKA-5691
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5691
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ryan P
>            Assignee: Ryan P
>            Priority: Major
>
> Old consumers are unable to register themselves with secured ZK installations 
> because a NOATH code is returned when attempting to create `/consumers'. 
> Rather than failing Kafka should log the error and continue down the path 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to