Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-3457

An error from RangerSubprocessMain isn't propagated to system catalog (master)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 1.17.0
    • None
    • master, ranger
    • None

    Description

      It seems that exceptions thrown from within RangerSubprocessMain.main() isn't propagated to SubprocessServer. For example, when ranger-related flags are specified, but --keytab_file and/or --principal flags are missing, SubprocessServer::Init() still returns Status::OK(), while the following message is printed into the stderr:

      Exception in thread "main" org.apache.kudu.subprocess.KuduSubprocessException: Kudu principal and Keytab file must be provided when Kerberos is enabled in Ranger
              at org.apache.kudu.subprocess.ranger.authorization.RangerKuduAuthorizer.init(RangerKuduAuthorizer.java:78)
              at org.apache.kudu.subprocess.ranger.RangerProtocolHandler.<init>(RangerProtocolHandler.java:45)
              at org.apache.kudu.subprocess.ranger.RangerSubprocessMain.main(RangerSubprocessMain.java:39)
      

      Apparently, SubprocessServer::StartSubprocessThread() takes care only of starting the process, but it doesn't check whether SubprocessExecutor has successfully started RangerProtocolHandler, so it's able to process at least a single message. In the particular error scenario described above, the sub-process exited immediately with non-OK status, but that wasn't detected.

      It's necessary to detect early stage errors like that, so SubprocessServer::Init() would return non-OK status in case if RangerProtocolHandler hasn't started or isn't able to process a single message right after the start.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aserbin Alexey Serbin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: