aljoscha commented on a change in pull request #7702:
[FLINK-11088][Security][YARN] Allow YARN to discover pre-installed keytab files
URL: https://github.com/apache/flink/pull/7702#discussion_r390328116
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -887,20 +887,28 @@ private ApplicationReport startAppMaster(
}
}
- // setup security tokens
Path remotePathKeytab = null;
+ String localizedKeytabPath = null;
String keytab =
configuration.getString(SecurityOptions.KERBEROS_LOGIN_KEYTAB);
if (keytab != null) {
- LOG.info("Adding keytab {} to the AM container local
resource bucket", keytab);
- remotePathKeytab = setupSingleLocalResource(
- Utils.KEYTAB_FILE_NAME,
+ boolean requireLocalizedKeytab =
flinkConfiguration.getBoolean(YarnConfigOptions.SHIP_LOCAL_KEYTAB);
+ localizedKeytabPath =
flinkConfiguration.getString(YarnConfigOptions.LOCALIZED_KEYTAB_PATH);
+ if (requireLocalizedKeytab) {
+ // Localize the keytab to YARN containers via
local resource.
+ LOG.info("Adding keytab {} to the AM container
local resource bucket", keytab);
+ remotePathKeytab = setupSingleLocalResource(
+ localizedKeytabPath,
fs,
appId,
new Path(keytab),
localResources,
homeDir,
"",
fileReplication);
+ } else {
Review comment:
Aren't we doing duplicate work here? If we don't have a local keytab and we
don't ship it, won't the configuration be already in place and the cluster
entrypoint can use it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services