Bug 1109910

Summary: required users created by setup_cluster.sh do not have same uid across cluster
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rachana Patel <racpatel>
Component: rhs-hadoop-installAssignee: Jeff Vance <jvance>
Status: CLOSED ERRATA QA Contact: amainkar
Severity: low Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: bchilds, dahorak, eboyd, matt, mbukatov, mkudlej, nlevinki, okomarek
Target Milestone: Release CandidateKeywords: UpcomingRelease, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.34-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-24 11:54:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1159155    

Description Rachana Patel 2014-06-16 15:28:57 UTC
Description of problem:
=======================
used rhs-hadoop-install - setup_cluster.sh for hadoop set up without creating required user first. Scripts has created users but hose users do not have same uid always.

Version-Release number of selected component (if applicable):
=============================================================
gluster - 3.6.0.12-1.el6.x86_64
rhs-hadoop-install-1_18-1.el6rhs.noarch
rhs-hadoop-2.3.2-2.noarch


How reproducible:
=================
2/4


Steps to Reproduce:
1. (do not add required user before starting setup)
from management server create  2x2 dist-rep volume using two server as below

 ./setup_cluster.sh --verbose rhs-gp-srv7.lab.eng.blr.redhat.com:/brick1:/dev/vg_new/thin_vol1 rhs-gp-srv4.lab.eng.blr.redhat.com:/brick1:/dev/vg_new/thin_vol1  rhs-gp-srv7.lab.eng.blr.redhat.com:/brick2:/dev/vg_new/thin_vol2 rhs-gp-srv4.lab.eng.blr.redhat.com:/brick2:/dev/vg_new/thin_vol2

2. it erroed out with uid mismatch error


Actual results:
found following output

<snippet>

iptables configured and saved
group hadoop added with GID=492
1 new Hadoop groups added
user mapred added with UID=495
user yarn added with UID=494
user hbase added with UID=493
user hcat added with UID=492
user hive added with UID=491
5 new Hadoop users added
...
...

group hadoop added with GID=497
1 new Hadoop groups added
user mapred added with UID=498
user yarn added with UID=497
user hbase added with UID=496
user hcat added with UID=495
user hive added with UID=494

</snippet>


log has following message:-
[22:27:07] DEBUG: check_uids: "mapred" user has inconsistent UID across supplied nodes.
 UIDs: 495 498
       rhs-gp-srv4.lab.eng.blr.redhat.com   has mapred UID: 495
       rhs-gp-srv7.lab.eng.blr.redhat.com   has mapred UID: 495
       rhs-client18.lab.eng.blr.redhat.com   has mapred UID: 498
"yarn" user has inconsistent UID across supplied nodes.
 UIDs: 494 497
       rhs-gp-srv4.lab.eng.blr.redhat.com   has yarn UID: 494
       rhs-gp-srv7.lab.eng.blr.redhat.com   has yarn UID: 494
       rhs-client18.lab.eng.blr.redhat.com   has yarn UID: 497
"hbase" user has inconsistent UID across supplied nodes.
 UIDs: 493 496
       rhs-gp-srv4.lab.eng.blr.redhat.com   has hbase UID: 493
       rhs-gp-srv7.lab.eng.blr.redhat.com   has hbase UID: 493
       rhs-client18.lab.eng.blr.redhat.com   has hbase UID: 496
"hcat" user has inconsistent UID across supplied nodes.
 UIDs: 492 495
       rhs-gp-srv4.lab.eng.blr.redhat.com   has hcat UID: 492
       rhs-gp-srv7.lab.eng.blr.redhat.com   has hcat UID: 492
       rhs-client18.lab.eng.blr.redhat.com   has hcat UID: 495
"hive" user has inconsistent UID across supplied nodes.


Expected results:
User should have same gid and uid across cluster

Additional info:

Comment 3 Jeff Vance 2014-06-25 14:48:32 UTC
Code in setup_cluster.sh related to creating users (via useradd and via ldap/ipa) has been removed.

Comment 4 Martin Bukatovic 2014-07-28 14:01:57 UTC
Checking rhs-hadoop-install-1_32-1.el6rhs.noarch

Scripts automating non-ldap user setup:

/usr/share/rhs-hadoop-install/bin/add_users.sh
/usr/share/rhs-hadoop-install/bin/add_groups.sh

are still shipped in the package. This contradicts the statement
in comment 3 and our current documentation.

Note: this is the same kind of problem as with BZ 1105149: it's
not a good idea to ship unused code to the customers.

Comment 5 Jeff Vance 2014-07-28 17:09:25 UTC
I forgot about add_users.sh and add_groups.sh -- good find! I've moved these to scripts to the archive github folder.

I want to preserve the "user adding/ldap-ipa" code in setup_cluster. What is recommend practice here? I've commented out the call to the related functions and added a comment in these function that they are not used in Denali. But, I'd still like the code to be available if we decide, post-Denali, to automate some aspects of Hadoop user creation.

Comment 7 Jeff Vance 2014-07-29 03:42:23 UTC
I have deleted all code related to creating the hadoop users. Fixed in version 1.34.

Comment 8 Ondřej Komárek 2014-07-30 13:37:36 UTC
Tested with:
rhs-hadoop-install-1_34-1.el6rhs.src.rpm (https://brewweb.devel.redhat.com/buildinfo?buildID=371877)
comparing with older rhs-hadoop-install-1_33-1.el6rhs.src.rpm (https://brewweb.devel.redhat.com/buildinfo?buildID=371149)

In file setup_cluster.sh was previously present "setup_users" function, flags SETUP_LDAP and SETUP_USERS and other stuff related to this. This function is now completely gone and flags used in it too. Arguments --deploy-ldap-srv and --local-auth which setted up mentioned flags are not accepted anymore. Files add_users.sh and add_groups.sh are not there and there is no reference to them.

This issue is fixed -> VERIFIED.

Comment 10 errata-xmlrpc 2014-11-24 11:54:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2014-1275.html