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

Zhijie Shen commented on YARN-1628:
-----------------------------------

+1. The patch should fix the failure. Will commit it.

Did some more investigation. In SecurityUtil,
{code}
  static {
    Configuration conf = new Configuration();
    boolean useIp = conf.getBoolean(
        CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP,
        CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP_DEFAULT);
    setTokenServiceUseIp(useIp);
  }
{code}
Getting "useIp" from a newly constructed Configuration prevents us from 
programmatically adding/editing HADOOP_SECURITY_TOKEN_SERVICE_USE_IP. This is 
why we cannot simply change conf in TestContainerManagerSecurity to fix the 
problem. Anyway, let's think about it separately.



> TestContainerManagerSecurity fails on trunk
> -------------------------------------------
>
>                 Key: YARN-1628
>                 URL: https://issues.apache.org/jira/browse/YARN-1628
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Mit Desai
>            Assignee: Vinod Kumar Vavilapalli
>         Attachments: YARN-1628.1.patch, YARN-1628.patch
>
>
> The Test fails with the following error
> {noformat}
> java.lang.IllegalArgumentException: java.net.UnknownHostException: InvalidHost
>       at 
> org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:377)
>       at 
> org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager.newInstance(BaseNMTokenSecretManager.java:145)
>       at 
> org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager.createNMToken(BaseNMTokenSecretManager.java:136)
>       at 
> org.apache.hadoop.yarn.server.TestContainerManagerSecurity.testNMTokens(TestContainerManagerSecurity.java:253)
>       at 
> org.apache.hadoop.yarn.server.TestContainerManagerSecurity.testContainerManager(TestContainerManagerSecurity.java:144)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to