ConfX created HDFS-17101:
----------------------------
Summary: HostsFileWriter throws a mysterious AssertionError after
permission misconfiguration
Key: HDFS-17101
URL: https://issues.apache.org/jira/browse/HDFS-17101
Project: Hadoop HDFS
Issue Type: Bug
Reporter: ConfX
Attachments: reproduce.sh
h2. What happened:
Got a mysterious {{AssertionError}} when running
{{TestDecommissioningStatusWithBackoffMonitor#testDecommissionDeadDN}} with
{{fs.permissions.umask-mode}} set to {{{}612{}}}.
h2. Where's the bug:
In line 156 of {{HostsFileWriter }}, the writer asserts that the directory is
successfully created
{noformat}
assertTrue(localFileSys.mkdirs(this.fullDir));{noformat}
However, if the directory fails to be created, this line would only throw an
{{AssertionError}} indicating neither the reason of the assertion error nor the
reason why the dir fails to be created.
h2. How to reproduce:
(1) Set {{fs.permissions.umask-mode}} to {{612}}
(2) Run test:
{{org.apache.hadoop.hdfs.server.namenode.TestDecommissioningStatusWithBackoffMonitor#testDecommissionDeadDN}}
h2. Stacktrace:
{noformat}
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at
org.apache.hadoop.hdfs.util.HostsFileWriter.initialize(HostsFileWriter.java:58)
at
org.apache.hadoop.hdfs.server.namenode.TestDecommissioningStatus.setupConfig(TestDecommissioningStatus.java:106)
at
org.apache.hadoop.hdfs.server.namenode.TestDecommissioningStatusWithBackoffMonitor.setUp(TestDecommissioningStatusWithBackoffMonitor.java:64){noformat}
For an easy reproduction, run the reproduce.sh in the attachment.
We are happy to provide a patch if this issue is confirmed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]