You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2013/04/24 23:47:17 UTC

[jira] [Updated] (HADOOP-9502) chmod does not return error exit codes for some exceptions

     [ https://issues.apache.org/jira/browse/HADOOP-9502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-9502:
-------------------------------------------

    Description: 
When some dfs operations fail due to SnapshotAccessControlException, valid exit codes are not returned.

E.g:
{noformat}
-bash-4.1$  hadoop dfs -chmod -R 755 /user/foo/hdfs-snapshots/test0/.snapshot/s0
chmod: changing permissions of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed

-bash-4.1$ echo $?
0

-bash-4.1$  hadoop dfs -chown -R hdfs:users /user/foo/hdfs-snapshots/test0/.snapshot/s0
chown: changing ownership of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed

-bash-4.1$ echo $?
0
{noformat}

Similar problems exist for some other exceptions such as SafeModeException.

  was:
When some dfs operations fail due to SnapshotAccessControlException, valid exit codes are not returned.

E.g:
-bash-4.1$  hadoop dfs -chmod -R 755 /user/foo/hdfs-snapshots/test0/.snapshot/s0
chmod: changing permissions of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed

-bash-4.1$ echo $?
0

-bash-4.1$  hadoop dfs -chown -R hdfs:users /user/foo/hdfs-snapshots/test0/.snapshot/s0
chown: changing ownership of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed

-bash-4.1$ echo $?
0



    
> chmod does not return error exit codes for some exceptions
> ----------------------------------------------------------
>
>                 Key: HADOOP-9502
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9502
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Ramya Sunil
>            Assignee: Tsz Wo (Nicholas), SZE
>            Priority: Minor
>
> When some dfs operations fail due to SnapshotAccessControlException, valid exit codes are not returned.
> E.g:
> {noformat}
> -bash-4.1$  hadoop dfs -chmod -R 755 /user/foo/hdfs-snapshots/test0/.snapshot/s0
> chmod: changing permissions of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed
> -bash-4.1$ echo $?
> 0
> -bash-4.1$  hadoop dfs -chown -R hdfs:users /user/foo/hdfs-snapshots/test0/.snapshot/s0
> chown: changing ownership of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed
> -bash-4.1$ echo $?
> 0
> {noformat}
> Similar problems exist for some other exceptions such as SafeModeException.

--
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