flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8562) Fix YARNSessionFIFOSecuredITCase
Date Wed, 21 Mar 2018 19:46:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408480#comment-16408480
] 

ASF GitHub Bot commented on FLINK-8562:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5416#discussion_r176215020
  
    --- Diff: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnTestBase.java ---
    @@ -465,27 +514,23 @@ private static void start(YarnConfiguration conf, String principal,
String keyta
     
     			File flinkConfDirPath = findFile(flinkDistRootDir, new ContainsName(new String[]{"flink-conf.yaml"}));
     			Assert.assertNotNull(flinkConfDirPath);
    +			org.apache.flink.configuration.Configuration flinkCfg =
    +					new org.apache.flink.configuration.Configuration();
     
     			if (!StringUtils.isBlank(principal) && !StringUtils.isBlank(keytab)) {
    +
     				//copy conf dir to test temporary workspace location
     				tempConfPathForSecureRun = tmp.newFolder("conf");
     
     				String confDirPath = flinkConfDirPath.getParentFile().getAbsolutePath();
     				FileUtils.copyDirectory(new File(confDirPath), tempConfPathForSecureRun);
     
    -				try (FileWriter fw = new FileWriter(new File(tempConfPathForSecureRun, "flink-conf.yaml"),
true);
    -					BufferedWriter bw = new BufferedWriter(fw);
    -					PrintWriter out = new PrintWriter(bw)) {
    -
    -					LOG.info("writing keytab: " + keytab + " and principal: " + principal + " to config
file");
    -					out.println("");
    -					out.println("#Security Configurations Auto Populated ");
    -					out.println(SecurityOptions.KERBEROS_LOGIN_KEYTAB.key() + ": " + keytab);
    -					out.println(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL.key() + ": " + principal);
    -					out.println("");
    -				} catch (IOException e) {
    -					throw new RuntimeException("Exception occured while trying to append the security
configurations.", e);
    -				}
    +				flinkCfg.setString(SecurityOptions.KERBEROS_LOGIN_KEYTAB.key(), keytab);
    +				flinkCfg.setString(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL.key(), principal);
    +				flinkCfg.setString(CoreOptions.MODE.key(), OLD_MODE);
    --- End diff --
    
    Then let's store `flinkCfg` as a static variable and use it to create a new one
    `flinkConfiguration = new Configuration(flinkCfg)`


> Fix YARNSessionFIFOSecuredITCase
> --------------------------------
>
>                 Key: FLINK-8562
>                 URL: https://issues.apache.org/jira/browse/FLINK-8562
>             Project: Flink
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 1.5.0, 1.6.0
>            Reporter: Shuyi Chen
>            Assignee: Shuyi Chen
>            Priority: Blocker
>             Fix For: 1.5.0
>
>
> Currently, YARNSessionFIFOSecuredITCase will not fail even if the current Flink YARN
Kerberos integration is failing in production. Please see FLINK-8275.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message