Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3676

handleSaslConnection failure doesn't try to renew the correct UGI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0-alpha
    • None
    • None
    • None

    Description

      Client.java has this code:

          private synchronized void handleSaslConnectionFailure(
              final int currRetries, final int maxRetries, final Exception ex,
              final Random rand, final UserGroupInformation ugi) throws IOException,
              InterruptedException {
            ugi.doAs(new PrivilegedExceptionAction<Object>() {
              public Object run() throws IOException, InterruptedException {
                final short MAX_BACKOFF = 5000;
                closeConnection();
                disposeSasl();
                if (shouldAuthenticateOverKrb()) {
                  if (currRetries < maxRetries) {
                    if(LOG.isDebugEnabled()) {
                      LOG.debug("Exception encountered while connecting to "
                          + "the server : " + ex);
                    }
                    // try re-login
                    if (UserGroupInformation.isLoginKeytabBased()) {
                      UserGroupInformation.getLoginUser().reloginFromKeytab();
                    } else {
                      UserGroupInformation.getLoginUser().reloginFromTicketCache();
                    }
      

      It's not renewing the UGI that had the problem, it's renewing the loginUser.

      Attachments

        Issue Links

          Activity

            People

              cmccabe Colin McCabe
              cmccabe Colin McCabe
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: