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 "Jason Lowe (JIRA)" <ji...@apache.org> on 2013/06/21 17:16:21 UTC
[jira] [Updated] (HDFS-4205) fsck fails with symlinks
[ https://issues.apache.org/jira/browse/HDFS-4205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Lowe updated HDFS-4205:
-----------------------------
Attachment: HDFS-4205.patch
Ran into this again, seems high time to fix it.
Here's a patch that has fsck treating symlinks in a similar way to how they are presented in file listings -- as a file with zero blocks. This seems to be the smallest change to get it working.
Another approach could be much more aware of symlinks and report them separately from files and directories in the fsck output, but I'm not sure how many users are relying on the existing output format. My thinking is get it working first then extend the exposure of symlinks in fsck results in a later JIRA if desired.
> fsck fails with symlinks
> ------------------------
>
> Key: HDFS-4205
> URL: https://issues.apache.org/jira/browse/HDFS-4205
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 3.0.0, 2.0.2-alpha
> Reporter: Andy Isaacson
> Attachments: HDFS-4205.patch
>
>
> I created a symlink using
> {code}
> ...
> FileContext fc = FileContext.getFileContext(dst.fs.getUri());
> for (PathData src : srcs) {
> fc.createSymlink(src.path, dst.path, false);
> }
> {code}
> After doing this to create a symlink {{/foo/too.txt -> /foo/hello.txt}}, I tried to {{hdfs fsck}} and got the following:
> {code}
> [adi@host01 ~]$ hdfs fsck /
> Connecting to namenode via http://host01:21070
> FSCK started by adi (auth:SIMPLE) from /172.29.122.91 for path / at Fri Nov 16 15:59:18 PST 2012
> FSCK ended at Fri Nov 16 15:59:18 PST 2012 in 3 milliseconds
> hdfs://host01:21020/foo/hello.txt
> Fsck on path '/' FAILED
> {code}
> It's very surprising that an unprivileged user can run code which so easily causes a fundamental administration tool to fail.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira