[
https://issues.apache.org/jira/browse/YARN-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222670#comment-16222670
]
Haibo Chen commented on YARN-7353:
----------------------------------
[~vvasudev] [~eyang]
I ran the native tests in the hadoop-dev docker container, got the error which
I believe is broken by this patch.
<testcase name="test_check_mount_permitted" status="run" time="0.001"
classname="TestDockerUtil">
<failure
message="/home/haibochen/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/utils/test_docker_util.cc:444

Expected: itr->second; Which is: 1; To be equal to: ret

Which is: 0
for inp
ut /usr/bin/touch"
type=""><![CDATA[/home/haibochen/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/utils/test_docker_util.cc:444
Expected: itr->second
Which is: 1
To be equal to: ret
Which is: 0
for input /usr/bin/touch]]></failure>
</testcase>
<testcase name="test_normalize_mounts" status="run" time="0"
classname="TestDockerUtil">
<failure
message="/home/haibochen/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/utils/test_docker_util.cc:462

Expected: expected[i]
 Which is:
"/usr/bin/touch"
To be equal to: ptr[i]

Which is: "/bin/touch""
type=""><![CDATA[/home/haibochen/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/test/utils/test_docker_util.cc:462
Expected: expected[i]
Which is: "/usr/bin/touch"
To be equal to: ptr[i]
Which is: "/bin/touch"]]></failure>
</testcase>
Can you guys take a look ?
> Docker permitted volumes don't properly check for directories
> -------------------------------------------------------------
>
> Key: YARN-7353
> URL: https://issues.apache.org/jira/browse/YARN-7353
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: yarn
> Reporter: Eric Badger
> Assignee: Eric Badger
> Fix For: 2.9.0, 3.0.0
>
> Attachments: YARN-7353.001.patch, YARN-7353.002.patch,
> YARN-7353.003.patch
>
>
> {noformat:title=docker-util.c:check_mount_permitted()}
> // directory check
> permitted_mount_len = strlen(permitted_mounts[i]);
> if (permitted_mount_len > 0
> && permitted_mounts[i][permitted_mount_len - 1] == '/') {
> if (strncmp(normalized_path, permitted_mounts[i], permitted_mount_len)
> == 0) {
> ret = 1;
> break;
> }
> }
> {noformat}
> This code will treat "/home/" as a directory, but not "/home"
> {noformat}
> [ FAILED ] 3 tests, listed below:
> [ FAILED ] TestDockerUtil.test_check_mount_permitted
> [ FAILED ] TestDockerUtil.test_normalize_mounts
> [ FAILED ] TestDockerUtil.test_add_rw_mounts
> {noformat}
> Additionally, YARN-6623 introduced new test failures in the C++
> container-executor test "cetest"
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]