Bug 996297 - Gluster hadoop shim reports wrong error message when fails on access rights
Gluster hadoop shim reports wrong error message when fails on access rights
Status: CLOSED EOL
Product: GlusterFS
Classification: Community
Component: gluster-hadoop (Show other bugs)
mainline
x86_64 Linux
low Severity unspecified
: ---
: ---
Assigned To: Bradley Childs
hcfs-gluster-bugs
: Triaged
: 969195 (view as bug list)
Depends On:
Blocks: 969223
  Show dependency treegraph
 
Reported: 2013-08-12 17:07 EDT by Martin Bukatovic
Modified: 2015-10-22 11:46 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-22 11:46:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Bukatovic 2013-08-12 17:07:34 EDT
Description of problem
======================

Gluster hadoop shim reports misleading error message when fails because of insufficient access rights.

Version-Release number of selected component (if applicable)
============================================================

gluster hadoop shim: 2.1

How reproducible
================

always

Steps to Reproduce
==================

1. configure hadoop cluster to use gluster volume via gluster hadoop plugin
2. make sure that gluster volume contains just one empty file (eg. foo)
3. check that gluster hadoop shim works:
   ~~~
   # /usr/lib/hadoop/bin/hadoop fs -ls /
   13/08/12 22:58:49 INFO glusterfs.GlusterFileSystemCRC: Initializing gluster volume..
   13/08/12 22:58:49 INFO glusterfs.GlusterFileSystem: Configuring GlusterFS
   13/08/12 22:58:49 INFO glusterfs.GlusterFileSystem: Initializing GlusterFS,  CRC disabled.
   13/08/12 22:58:49 INFO glusterfs.GlusterFileSystem: Configuring GlusterFS
   13/08/12 22:58:49 INFO glusterfs.GlusterFileSystemCRC: Initializing gluster volume..
   Found 1 items
   -rw-r--r--   1 root root          0 2013-08-12 23:00 /foo
   ~~~
   (now, listing should contain just one file - as noted in step #2)
3. cd into gluster volume
4. change access rights of root directory inside gluster volume so that user
   (under which hadoop shim will be executed) can't create new files, eg:

   ~~~
   chmod 555 /mnt/hadoop-volume
   ~~~
5. try to create new file via gluster plugin under non root user:
   ~~~
   su ${HDFS_USER} -c "/usr/lib/hadoop/bin/hadoop dfs -mkdir /mapred"
   ~~~

Actual results
==============

Plugin reports misleading error:

~~~
# su ${HDFS_USER} -c "/usr/lib/hadoop/bin/hadoop dfs -mkdir /mapred"
13/08/12 23:01:44 INFO glusterfs.GlusterFileSystemCRC: Initializing gluster volume..
13/08/12 23:01:44 INFO glusterfs.GlusterFileSystem: Configuring GlusterFS
13/08/12 23:01:44 INFO glusterfs.GlusterFileSystem: Initializing GlusterFS,  CRC disabled.
13/08/12 23:01:44 INFO glusterfs.GlusterFileSystem: Configuring GlusterFS
13/08/12 23:01:44 INFO glusterfs.GlusterFileSystemCRC: Initializing gluster volume..
13/08/12 23:01:44 INFO util.NativeCodeLoader: Loaded the native-hadoop library
mkdir: No such file or directory
~~~

Expected results
================

Plugin reports real reason for the fail: Permission denied
Comment 2 Daniel Horák 2013-08-16 08:14:18 EDT
Similar misleading error message appears, when owner/permissions of /user directory (inside HCFS) is unwritable for ${MAPRED_USER} and ${MAPRED_USER} will try to create directory /user/mapred/ (when running some job).

# ll -d /mnt/glusterfs/user/
  drwxr-xr-x. 3 root root 34 Aug 16 14:04 /mnt/glusterfs/user/

# su ${MAPRED_USER} -c "/usr/lib/hadoop/bin/hadoop jar /usr/lib/hadoop/hadoop-examples.jar pi 10 10"
  Number of Maps  = 10
  Samples per Map = 10
  13/08/16 14:11:53 INFO glusterfs.GlusterFileSystem: initializing gluster volume..
  13/08/16 14:11:53 INFO glusterfs.GlusterFileSystem: Initializing GlusterFS
  13/08/16 14:11:53 INFO glusterfs.GlusterFileSystem: Initializing GlusterFS
  13/08/16 14:11:53 INFO glusterfs.GlusterFileSystem: initializing gluster volume..
  13/08/16 14:11:53 INFO util.NativeCodeLoader: Loaded the native-hadoop library
  Wrote input for Map #0
    <<< truncated >>>
  Wrote input for Map #9
  Starting Job
  13/08/16 14:11:54 ERROR security.UserGroupInformation: PriviledgedActionException as:mapred cause:ENOENT: No such file or directory
  ENOENT: No such file or directory
    <<< truncated >>>
Comment 3 Bradley Childs 2013-08-20 12:07:48 EDT
*** Bug 969195 has been marked as a duplicate of this bug. ***
Comment 4 Bradley Childs 2013-08-20 12:08:45 EDT
similar to:
https://bugzilla.redhat.com/show_bug.cgi?id=969195
Comment 6 Ondřej Komárek 2014-06-25 09:22:13 EDT
Similarly not verbose error appears when trying to delete file with insufficient rights. Here is command:

su mapred -c "/usr/lib/hadoop/bin/hadoop fs -rmr -skipTrash /tmp/test_shim_access_error/foo"

Here is error:

rmr: `/tmp/test_shim_access_error/foo': Input/output error
Comment 7 Kaleb KEITHLEY 2015-10-22 11:46:38 EDT
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.

Note You need to log in before you can comment on or make changes to this bug.