Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9502

chmod does not return error exit codes for some exceptions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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
      

      Similar problems exist for some other exceptions such as SafeModeException.

        Attachments

        1. c9502_20130424.patch
          3 kB
          Tsz Wo Nicholas Sze

          Issue Links

            Activity

              People

              • Assignee:
                szetszwo Tsz Wo Nicholas Sze
                Reporter:
                rramya Ramya Sunil
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: