You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Alexey Serbin (Jira)" <ji...@apache.org> on 2023/03/09 06:14:00 UTC

[jira] [Created] (KUDU-3457) An error from RangerSubprocessMain isn't propagated to system catalog (master)

Alexey Serbin created KUDU-3457:
-----------------------------------

             Summary: An error from RangerSubprocessMain isn't propagated to system catalog (master)
                 Key: KUDU-3457
                 URL: https://issues.apache.org/jira/browse/KUDU-3457
             Project: Kudu
          Issue Type: Bug
          Components: master, ranger
    Affects Versions: 1.16.0, 1.15.0, 1.14.0, 1.13.0, 1.12.0, 1.17.0
            Reporter: Alexey Serbin


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:

{noformat}
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)
{noformat}

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 that particular error scenarios 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}} isn't started or isn't able to process a single message right after the start.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)