Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN-10901. Permission checking error on an existing directory in LogAggregationFileController#verifyAndCreateRemoteLogDir #3355

Merged
merged 2 commits into from
Sep 8, 2021

Conversation

tomicooler
Copy link
Contributor

… LogAggregationFileController.

Create a temporary file with proper ownership to see if the underlying
file system supports chmod.

When the log directory was already created, but with a different user,
there was an exception in the log:

org.apache.hadoop.security.AccessControlException: Permission denied.
user=yarn is not the owner of inode=/tmp/logs

because the setPermission checked the ownership of the given path.

Change-Id: I7c7908b7ec815501337daaf7a2253a11d79afc8c

Description of PR

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

… LogAggregationFileController.

Create a temporary file with proper ownership to see if the underlying
file system supports chmod.

When the log directory was already created, but with a different user,
there was an exception in the log:

  org.apache.hadoop.security.AccessControlException: Permission denied.
  user=yarn is not the owner of inode=/tmp/logs

because the setPermission checked the ownership of the given path.

Change-Id: I7c7908b7ec815501337daaf7a2253a11d79afc8c
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 32m 37s trunk passed
+1 💚 compile 0m 54s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 0m 46s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 0m 38s trunk passed
+1 💚 mvnsite 0m 51s trunk passed
+1 💚 javadoc 0m 51s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 48s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 47s trunk passed
+1 💚 shadedclient 15m 22s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 40s the patch passed
+1 💚 compile 0m 43s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 0m 43s the patch passed
+1 💚 compile 0m 37s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 0m 37s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 27s /results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common: The patch generated 2 new + 13 unchanged - 0 fixed = 15 total (was 13)
+1 💚 mvnsite 0m 40s the patch passed
+1 💚 javadoc 0m 40s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 39s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 50s the patch passed
+1 💚 shadedclient 15m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 4m 56s hadoop-yarn-common in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
82m 28s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/1/artifact/out/Dockerfile
GITHUB PR #3355
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux fb07c4e23e3b 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5a980a4
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/1/testReport/
Max. process+thread count 550 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@brumi1024
Copy link
Member

Thanks @tomicooler for working on this. The commit LGTM, +1 from my side, once you fix the checkstyle issues. :)

…tory in LogAggregationFileController.

Change-Id: Id48d073d036b939236f73b2755c2e4e8c3c4227a
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 55s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 34m 9s trunk passed
+1 💚 compile 0m 50s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 0m 41s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 0m 33s trunk passed
+1 💚 mvnsite 0m 49s trunk passed
+1 💚 javadoc 0m 48s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 43s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 51s trunk passed
+1 💚 shadedclient 16m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 40s the patch passed
+1 💚 compile 0m 43s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 0m 43s the patch passed
+1 💚 compile 0m 41s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 0m 41s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 25s the patch passed
+1 💚 mvnsite 0m 41s the patch passed
+1 💚 javadoc 0m 40s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 43s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 53s the patch passed
+1 💚 shadedclient 15m 34s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 4m 54s hadoop-yarn-common in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
85m 11s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/2/artifact/out/Dockerfile
GITHUB PR #3355
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux fe0354c23be5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 7bdfbd5
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/2/testReport/
Max. process+thread count 628 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3355/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@brumi1024 brumi1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the checkstyle fixes, +1.

Copy link
Contributor

@szilard-nemeth szilard-nemeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomicooler Thanks for working on this.
Latest patch LGTM, committed to trunk.
Thanks @brumi1024 for the review.

@szilard-nemeth szilard-nemeth changed the title YARN-10901. Fix permission checking error on an existing directory in… YARN-10901. Permission checking error on an existing directory in LogAggregationFileController#verifyAndCreateRemoteLogDir Sep 8, 2021
@szilard-nemeth szilard-nemeth merged commit 5e16689 into apache:trunk Sep 8, 2021
tomicooler added a commit to tomicooler/hadoop that referenced this pull request Sep 9, 2021
…AggregationFileController#verifyAndCreateRemoteLogDir (apache#3355)

Co-authored-by: Tamas Domok <tdomok@cloudera.com>
tomicooler added a commit to tomicooler/hadoop that referenced this pull request Sep 9, 2021
…AggregationFileController#verifyAndCreateRemoteLogDir (apache#3355)

Co-authored-by: Tamas Domok <tdomok@cloudera.com>
Change-Id: I9584b319cbffa3b0bafccddb6d53c05e92ea0d2c
kiran-maturi pushed a commit to kiran-maturi/hadoop that referenced this pull request Nov 24, 2021
…AggregationFileController#verifyAndCreateRemoteLogDir (apache#3355)

Co-authored-by: Tamas Domok <tdomok@cloudera.com>
jojochuang pushed a commit to jojochuang/hadoop that referenced this pull request May 23, 2023
…ctory in LogAggregationFileController#verifyAndCreateRemoteLogDir (apache#3355)

Co-authored-by: Tamas Domok <tdomok@cloudera.com>
(cherry picked from commit 5e16689)
Change-Id: I128d2f9a0bbb103146560dc8c13107e62a783641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants