Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25788

Ambari server keeps generating keytabs even with KerberosServerAction#OperationType.CREATE_MISSING option.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.6
    • None
    • ambari-server
    • None
    • Ambari 2.7.6

    Description

      When regenerating keytabs, I found an issue that ambari server keeps generating new keytabs, not reusing already created keytabs even with "only regenerate keytabs for missing hosts and components" checkbox selected.
      With investigation, I found that `cached_keytab_path` has all NULL value in `kerberos_principal`.

      e.g.

      mysql> select * from kerberos_principal;
      +------------------------------------------------------------+------------+----------------------------------------------------------------------------------------------------+
      | principal_name                                             | is_service | cached_keytab_path
                                                                              |
      +------------------------------------------------------------+------------+----------------------------------------------------------------------------------------------------+
      | HTTP/host1.example.com@EXAMPLE.COM           |          1 | NULL |
      | HTTP/host2.example.com@EXAMPLE.COM           |          1 | NULL |
      | HTTP/host3.example.com@EXAMPLE.COM           |          1 | NULL |
      ...
      

      There is a bug in `CreateKeytabFilesServerAction#processIdentity`. It doesn't update `cached_keytab_path` if `previousCachedFilePath` is null.
      I will make a PR for this soon.

      Attachments

        Issue Links

          Activity

            People

              eub YUBI LEE
              eub YUBI LEE
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h