You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/05/07 01:35:23 UTC
svn commit: r1479725 - in
/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp:
files/changeToSecureUid.sh manifests/init.pp
Author: swagle
Date: Mon May 6 23:35:22 2013
New Revision: 1479725
URL: http://svn.apache.org/r1479725
Log:
AMBARI-2081. changeUid.sh failing during installation. New fixes. (swagle)
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh?rev=1479725&r1=1479724&r2=1479725&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh Mon May 6 23:35:22 2013
@@ -21,7 +21,7 @@
username=$1
newUid=$2
-dirs=$3
+directories=$3
function find_available_uid() {
for ((i=1001; i<=2000; i++))
@@ -35,7 +35,7 @@ function find_available_uid() {
done
}
-grep -q $i /etc/passwd
+grep -q $newUid /etc/passwd
if [ "$?" != 0 ]
then
echo "Uid $newUid is available for $username"
@@ -50,7 +50,7 @@ then
exit 1
fi
-dir_array=($(echo $dirs | sed 's/,/\n/g'))
+dir_array=($(echo $directories | sed 's/,/\n/g'))
old_uid=$(id -u $username)
echo "Changing uid of $username from $old_uid to $newUid"
echo "Changing directory permisions for ${dir_array[@]}"
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp?rev=1479725&r1=1479724&r2=1479725&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp Mon May 6 23:35:22 2013
@@ -158,7 +158,7 @@ class hdp::create_smoke_user()
## Set smoke user uid to > 1000 for enable security feature
$secure_uid = $hdp::params::smoketest_user_secure_uid
$changeUid_path = "/tmp/changeUid.sh"
- $smoke_user_dirs = "/tmp/${smoke_user},/home/${smoke_user},/var/spool/mail/${smoke_user}"
+ $smoke_user_dirs = "/tmp/hadoop-${smoke_user},/tmp/hsperfdata_${smoke_user},/home/${smoke_user}"
$cmd_set_uid = "$changeUid_path ${smoke_user} ${secure_uid} ${smoke_user_dirs}"
$cmd_set_uid_check = "test $(id -u ${smoke_user}) -gt 1000"