HADOOP-10638. Updating hadoop-daemon.sh to work as expected when nfs is started as a privileged user. Contributed by Manikandan Narayanaswamy.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1598451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b3d7759c5e
commit
6809d583d7
|
@ -519,6 +519,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
HADOOP-10639. FileBasedKeyStoresFactory initialization is not using default
|
HADOOP-10639. FileBasedKeyStoresFactory initialization is not using default
|
||||||
for SSL_REQUIRE_CLIENT_CERT_KEY. (tucu)
|
for SSL_REQUIRE_CLIENT_CERT_KEY. (tucu)
|
||||||
|
|
||||||
|
HADOOP-10638. Updating hadoop-daemon.sh to work as expected when nfs is
|
||||||
|
started as a privileged user. (Manikandan Narayanaswamy via atm)
|
||||||
|
|
||||||
Release 2.4.1 - UNRELEASED
|
Release 2.4.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -87,6 +87,14 @@ if [ "$command" == "datanode" ] && [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_
|
||||||
starting_secure_dn="true"
|
starting_secure_dn="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Determine if we're starting a privileged NFS, if so, redefine the appropriate variables
|
||||||
|
if [ "$command" == "nfs3" ] && [ "$EUID" -eq 0 ] && [ -n "$HADOOP_PRIVILEGED_NFS_USER" ]; then
|
||||||
|
export HADOOP_PID_DIR=$HADOOP_PRIVILEGED_NFS_PID_DIR
|
||||||
|
export HADOOP_LOG_DIR=$HADOOP_PRIVILEGED_NFS_LOG_DIR
|
||||||
|
export HADOOP_IDENT_STRING=$HADOOP_PRIVILEGED_NFS_USER
|
||||||
|
starting_privileged_nfs="true"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$HADOOP_IDENT_STRING" = "" ]; then
|
if [ "$HADOOP_IDENT_STRING" = "" ]; then
|
||||||
export HADOOP_IDENT_STRING="$USER"
|
export HADOOP_IDENT_STRING="$USER"
|
||||||
fi
|
fi
|
||||||
|
@ -162,6 +170,9 @@ case $startStop in
|
||||||
echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log
|
echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log
|
||||||
# capture the ulimit info for the appropriate user
|
# capture the ulimit info for the appropriate user
|
||||||
su --shell=/bin/bash $HADOOP_SECURE_DN_USER -c 'ulimit -a' >> $log 2>&1
|
su --shell=/bin/bash $HADOOP_SECURE_DN_USER -c 'ulimit -a' >> $log 2>&1
|
||||||
|
elif [ "true" = "$starting_privileged_nfs" ]; then
|
||||||
|
echo "ulimit -a for privileged nfs user $HADOOP_PRIVILEGED_NFS_USER" >> $log
|
||||||
|
su --shell=/bin/bash $HADOOP_PRIVILEGED_NFS_USER -c 'ulimit -a' >> $log 2>&1
|
||||||
else
|
else
|
||||||
echo "ulimit -a for user $USER" >> $log
|
echo "ulimit -a for user $USER" >> $log
|
||||||
ulimit -a >> $log 2>&1
|
ulimit -a >> $log 2>&1
|
||||||
|
|
Loading…
Reference in New Issue