Author: swagle
Date: Fri May 10 18:35:46 2013
New Revision: 1481136
URL: http://svn.apache.org/r1481136
Log:
AMBARI-2101. Hive service check (still) failing with file permissions. (swagle)
Modified:
incubator/ambari/trunk/CHANGES.txt
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/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1481136&r1=1481135&r2=1481136&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri May 10 18:35:46 2013
@@ -837,6 +837,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2101. Hive service check (still) failing with file permissions.
+ (swagle)
+
AMBARI-2095. It's possible to get into a state where install retry is not
possible if the agent stops heartbeating. (jaimin via yusaku)
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=1481136&r1=1481135&r2=1481136&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
Fri May 10 18:35:46 2013
@@ -27,7 +27,7 @@ function find_available_uid() {
for ((i=1001; i<=2000; i++))
do
grep -q $i /etc/passwd
- if [ "$?" != 0 ]
+ if [ "$?" -ne 0 ]
then
newUid=$i
break
@@ -36,7 +36,7 @@ function find_available_uid() {
}
grep -q $newUid /etc/passwd
-if [ "$?" != 0 ]
+if [ "$?" -ne 0 ]
then
echo "Uid $newUid is available for $username"
else
@@ -44,7 +44,7 @@ else
find_available_uid
fi
-if [ $newUid == 0 ]
+if [ $newUid -eq 0 ]
then
echo "Failed to find Uid between 1000 and 2000"
exit 1
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=1481136&r1=1481135&r2=1481136&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
Fri May 10 18:35:46 2013
@@ -153,8 +153,8 @@ 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/hadoop-${smoke_user},/tmp/hsperfdata_${smoke_user},/home/${smoke_user}"
- $cmd_set_uid = "$changeUid_path ${smoke_user} ${secure_uid}
${smoke_user_dirs}"
+ $smoke_user_dirs =
"/tmp/hadoop-${smoke_user},/tmp/hsperfdata_${smoke_user},/home/${smoke_user},/tmp/${smoke_user},/tmp/sqoop-${smoke_user}"
+ $cmd_set_uid = "$changeUid_path ${smoke_user} ${secure_uid}
${smoke_user_dirs} 2>/dev/null"
$cmd_set_uid_check = "test $(id -u ${smoke_user}) -gt 1000"
file { $changeUid_path :