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

Shaneal Manek commented on HBASE-5780:
--------------------------------------

Reply to Ted: Yes, it's safe (i.e., the worst possible outcome is a 
NoAuthExceptio being thrown later in the start() method - not some sort of 
inconsistent internal state).

The two obvious alternatives to logging the interruption and continuing are to 
retry waiting for auth to finish (which I very much dislike), or to throw an 
exception immediately. 

However, even if the Thread has been interrupted before authentication has 
completed, it's entirely possible everything else will go fine (for example the 
Master and ROOT znodes are world readable - so, in those cases, it will work 
with or without auth). And, if I needed the auth, I'll get a ZK NoAuthException 
anyways, so no real harm by not bailing out early.

If you'd like me to change it to throw an exception immediately, I'd be happy 
to do so though.
                
> Fix race in HBase regionserver startup vs ZK SASL authentication
> ----------------------------------------------------------------
>
>                 Key: HBASE-5780
>                 URL: https://issues.apache.org/jira/browse/HBASE-5780
>             Project: HBase
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 0.92.1, 0.94.0
>            Reporter: Shaneal Manek
>            Assignee: Shaneal Manek
>         Attachments: HBASE-5780.patch
>
>
> Secure RegionServers sometimes fail to start with the following backtrace:
> 2012-03-22 17:20:16,737 FATAL 
> org.apache.hadoop.hbase.regionserver.HRegionServer: ABORTING region server 
> centos60-20.ent.cloudera.com,60020,1332462015929: Unexpected exception during 
> initialization, aborting
> org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = 
> NoAuth for /hbase/shutdown
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:113)
> at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
> at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1131)
> at 
> org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.getData(RecoverableZooKeeper.java:295)
> at org.apache.hadoop.hbase.zookeeper.ZKUtil.getDataInternal(ZKUtil.java:518)
> at org.apache.hadoop.hbase.zookeeper.ZKUtil.getDataAndWatch(ZKUtil.java:494)
> at 
> org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:77)
> at 
> org.apache.hadoop.hbase.regionserver.HRegionServer.initializeZooKeeper(HRegionServer.java:569)
> at 
> org.apache.hadoop.hbase.regionserver.HRegionServer.preRegistrationInitialization(HRegionServer.java:532)
> at 
> org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:634)
> at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to