You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Daryn Sharp (Created) (JIRA)" <ji...@apache.org> on 2012/01/12 17:07:39 UTC

[jira] [Created] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Fix host-based token incompatibilities in DFSUtil
-------------------------------------------------

                 Key: HDFS-2786
                 URL: https://issues.apache.org/jira/browse/HDFS-2786
             Project: Hadoop HDFS
          Issue Type: Sub-task
          Components: name-node, security
    Affects Versions: 0.24.0, 0.23.1
            Reporter: Daryn Sharp


DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
* DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
* DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189381#comment-13189381 ] 

Kihwal Lee commented on HDFS-2786:
----------------------------------

There is a dependency between this issue and HDFS-2784. It can go either way depending on to which patch some of the changes go. Since the patch for HDFS-2784 was created first, that will block this issue.
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203552#comment-13203552 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Hdfs-0.23-Build #163 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/163/])
    Merged r1241766 from trunk for HDFS-2786.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241768
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kihwal Lee reassigned HDFS-2786:
--------------------------------

    Assignee: Kihwal Lee
    
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203251#comment-13203251 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Common-trunk-Commit #1692 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1692/])
    HDFS-2786. Fix host-based token incompatibilities in DFSUtil. Contributed by Kihwal Lee.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241766
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190169#comment-13190169 ] 

Kihwal Lee commented on HDFS-2786:
----------------------------------

The attached patch is for testing and review. The actual patch will have some of the changes removed from JspHelper.java since they will conflict with HDFS-2784. 
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203270#comment-13203270 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #1703 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1703/])
    HDFS-2786. Fix host-based token incompatibilities in DFSUtil. Contributed by Kihwal Lee.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241766
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200263#comment-13200263 ] 

Hadoop QA commented on HDFS-2786:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12513216/hdfs-2786.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed unit tests in .

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1840//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1840//console

This message is automatically generated.
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203281#comment-13203281 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Mapreduce-0.23-Commit #524 (See [https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/524/])
    Merged r1241766 from trunk for HDFS-2786.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241768
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203257#comment-13203257 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Hdfs-0.23-Commit #509 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/509/])
    Merged r1241766 from trunk for HDFS-2786.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241768
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kihwal Lee updated HDFS-2786:
-----------------------------

    Target Version/s: 0.24.0, 0.23.1  (was: 0.23.1, 0.24.0)
              Status: Patch Available  (was: Open)
    
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203532#comment-13203532 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Hdfs-trunk #950 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/950/])
    HDFS-2786. Fix host-based token incompatibilities in DFSUtil. Contributed by Kihwal Lee.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241766
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Daryn Sharp (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198848#comment-13198848 ] 

Daryn Sharp commented on HDFS-2786:
-----------------------------------

That chunk of code actually appears multiple time in the file.  It should probably be a method to ensure the url is generated consistently.
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203250#comment-13203250 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #1767 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1767/])
    HDFS-2786. Fix host-based token incompatibilities in DFSUtil. Contributed by Kihwal Lee.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241766
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Jitendra Nath Pandey (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jitendra Nath Pandey updated HDFS-2786:
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 0.23.1
                      0.24.0
    Target Version/s: 0.24.0, 0.23.1  (was: 0.23.1, 0.24.0)
        Hadoop Flags: Reviewed
              Status: Resolved  (was: Patch Available)

Committed. Thanks to Kihwal.
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190194#comment-13190194 ] 

Hadoop QA commented on HDFS-2786:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12511325/hdfs-2786.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 javadoc.  The javadoc tool appears to have generated 21 warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed these unit tests:
                  org.apache.hadoop.hdfs.server.blockmanagement.TestReplicationPolicy

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1792//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1792//artifact/trunk/hadoop-hdfs-project/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1792//console

This message is automatically generated.
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203602#comment-13203602 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Mapreduce-trunk #983 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/983/])
    HDFS-2786. Fix host-based token incompatibilities in DFSUtil. Contributed by Kihwal Lee.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241766
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203261#comment-13203261 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Common-0.23-Commit #520 (See [https://builds.apache.org/job/Hadoop-Common-0.23-Commit/520/])
    Merged r1241766 from trunk for HDFS-2786.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241768
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Jitendra Nath Pandey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203241#comment-13203241 ] 

Jitendra Nath Pandey commented on HDFS-2786:
--------------------------------------------

+1. lgtm
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Jitendra Nath Pandey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198543#comment-13198543 ] 

Jitendra Nath Pandey commented on HDFS-2786:
--------------------------------------------

{code}
-    String namenodeHost = namenodeAddress.getHostName();
+    String namenodeHost = NetUtils.createSocketAddr(nnAddr).getHostName();
     out.print("<br><a href=\"http://"
         + InetAddress.getByName(namenodeHost).getCanonicalHostName() + ":"
         + namenodeInfoPort + "/dfshealth.jsp\">Go back to DFS home</a>");
{code}

The namenodeHost is used only to obtain the InetAddress. We could just get it as in following
NetUtils.createSocketAddr(nnAddr).getAddress().getCanonicalHostName().
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kihwal Lee updated HDFS-2786:
-----------------------------

    Attachment: hdfs-2786.patch
    
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kihwal Lee updated HDFS-2786:
-----------------------------

    Attachment: hdfs-2786.patch

I've added a method for converting name to canonical host name. It does what Vinod suggested.

Also moved a couple of the conversions out of the loop to avoid doing it unnecessarily inside the loop. 
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203576#comment-13203576 ] 

Hudson commented on HDFS-2786:
------------------------------

Integrated in Hadoop-Mapreduce-0.23-Build #185 (See [https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/185/])
    Merged r1241766 from trunk for HDFS-2786.

jitendra : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241768
Files : 
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java

                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "Kihwal Lee (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200468#comment-13200468 ] 

Kihwal Lee commented on HDFS-2786:
----------------------------------

No new test is added since there is no change in behavior or semantics. 
                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch, hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2786) Fix host-based token incompatibilities in DFSUtil

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190171#comment-13190171 ] 

jiraposter@reviews.apache.org commented on HDFS-2786:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3575/
-----------------------------------------------------------

Review request for Daryn Sharp.


Summary
-------

Remove DFSUtil.getSocketAddress(), which can be misused and break tokens.
This applies to trunk now but there will be conflicts after HDFS-2784.


This addresses bug HDFS-2786.
    https://issues.apache.org/jira/browse/HDFS-2786


Diffs
-----

  /trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java 1233408 
  /trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java 1233408 
  /trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DatanodeJspHelper.java 1233408 
  /trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java 1233408 

Diff: https://reviews.apache.org/r/3575/diff


Testing
-------


Thanks,

Kihwal


                
> Fix host-based token incompatibilities in DFSUtil
> -------------------------------------------------
>
>                 Key: HDFS-2786
>                 URL: https://issues.apache.org/jira/browse/HDFS-2786
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node, security
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>         Attachments: hdfs-2786.patch
>
>
> DFSUtil introduces new static methods that duplicate functionality in NetUtils.  These new methods lack the logic necessary for host-based tokens to work.  After speaking with Suresh, the approach being taken is:
> * DFSUtil.getSocketAddress will be removed.  Callers will be reverted to using the NetUtils version.
> * DFSUtil.getDFSClient will changed to take accept a uri/host:port string instead of an InetSocketAddress.  The method will internal call NetUtils.createSocketAddr. This alleviates the callers from being required to call NetUtils.createSocketAddr and reduce the opportunity for error that will break host-based tokens.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira