Bug 996297 - Gluster hadoop shim reports wrong error message when fails on access rights
Summary: Gluster hadoop shim reports wrong error message when fails on access rights
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: gluster-hadoop
Version: mainline
Hardware: x86_64
OS: Linux
low
unspecified
Target Milestone: ---
Assignee: Bradley Childs
QA Contact: hcfs-gluster-bugs
URL:
Whiteboard:
: 969195 (view as bug list)
Depends On:
Blocks: 969223
TreeView+ depends on / blocked
 
Reported: 2013-08-12 21:07 UTC by Martin Bukatovic
Modified: 2015-10-22 15:46 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-22 15:46:38 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1140588 0 unspecified CLOSED Incorrect errno used for permission denied errors 2021-02-22 00:41:40 UTC

Internal Links: 1140588

Description Martin Bukatovic 2013-08-12 21:07:34 UTC
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 12:14:18 UTC
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 16:07:48 UTC
*** Bug 969195 has been marked as a duplicate of this bug. ***

Comment 4 Bradley Childs 2013-08-20 16:08:45 UTC
similar to:
https://bugzilla.redhat.com/show_bug.cgi?id=969195

Comment 6 Ondřej Komárek 2014-06-25 13:22:13 UTC
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 15:46:38 UTC
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.