Author: swagle
Date: Wed May 15 18:31:16 2013
New Revision: 1482991
URL: http://svn.apache.org/r1482991
Log:
AMBARI-2138. HBase smoke test fails on secure cluster. (swagle)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hbase_grant_permissions.erb
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/files/hbaseSmoke.sh
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/hbase/service_check.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1482991&r1=1482990&r2=1482991&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 15 18:31:16 2013
@@ -852,6 +852,8 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2138. HBase smoke test fails on secure cluster. (swagle)
+
AMBARI-2136. Home paths are not set correctly in /etc/sqoop/conf/sqoop-env.sh
(mahadev)
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/files/hbaseSmoke.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/files/hbaseSmoke.sh?rev=1482991&r1=1482990&r2=1482991&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/files/hbaseSmoke.sh
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/files/hbaseSmoke.sh
Wed May 15 18:31:16 2013
@@ -18,9 +18,9 @@
# under the License.
#
#
-disable 'usertable'
-drop 'usertable'
-create 'usertable','family'
-put 'usertable','row01','family:col01','value1'
-scan 'usertable'
+disable 'ambarismoketest'
+drop 'ambarismoketest'
+create 'ambarismoketest','family'
+put 'ambarismoketest','row01','family:col01','value1'
+scan 'ambarismoketest'
exit
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/hbase/service_check.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/hbase/service_check.pp?rev=1482991&r1=1482990&r2=1482991&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/hbase/service_check.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/hbase/service_check.pp
Wed May 15 18:31:16 2013
@@ -22,7 +22,7 @@ class hdp-hbase::hbase::service_check()
{
$smoke_test_user = $hdp::params::smokeuser
- $output_file = "/apps/hbase/data/usertable"
+ $output_file = "/apps/hbase/data/ambarismoketest"
$conf_dir = $hdp::params::hbase_conf_dir
$test_cmd = "fs -test -e ${output_file}"
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp?rev=1482991&r1=1482990&r2=1482991&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
Wed May 15 18:31:16 2013
@@ -28,7 +28,7 @@ class hdp-hbase(
$config_dir = $hdp-hbase::params::conf_dir
$hdp::params::component_exists['hdp-hbase'] = true
-
+ $smokeuser = $hdp::params::smokeuser
#Configs generation
@@ -102,6 +102,24 @@ class hdp-hbase(
if ($security_enabled == true) {
if ($type == 'master') {
hdp-hbase::configfile { 'hbase_master_jaas.conf' : }
+
+ $hbase_grant_premissions_file = '/tmp/hbase_grant_permissions.sh'
+
+ file { $hbase_grant_premissions_file:
+ owner => $hbase_user,
+ group => $hdp::params::user_group,
+ mode => '0644',
+ content => template('hdp-hbase/hbase_grant_permissions.erb')
+ }
+
+ hdp::exec { '${smokeuser}_grant_privileges' :
+ command => "su - ${smoke_test_user} -c 'hbase --config $conf_dir
shell ${hbase_grant_premissions_file}'",
+ require => File[$hbase_grant_premissions_file]
+ }
+
+ Hdp-hbase::Configfile<||> -> File[$hbase_grant_premissions_file] ->
+ Hdp::Exec['${smokeuser}_grant_privileges'] -> Anchor['hdp-hbase::end']
+
} elsif ($type == 'regionserver') {
hdp-hbase::configfile { 'hbase_regionserver_jaas.conf' : }
} else {
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp?rev=1482991&r1=1482990&r2=1482991&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
Wed May 15 18:31:16 2013
@@ -99,4 +99,6 @@ class hdp-hbase::params() inherits hdp::
} else {
$hbase_jaas_princ = "${hbase_primary_name}@${kerberos_domain}"
}
+
+ $smokeuser_permissions = hdp_default("smokeuser_permissions", "RWXCA")
}
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hbase_grant_permissions.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hbase_grant_permissions.erb?rev=1482991&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hbase_grant_permissions.erb
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hbase_grant_permissions.erb
Wed May 15 18:31:16 2013
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+grant '<%=scope.function_hdp_template_var("::hdp::params::smokeuser")%>',
'<%=scope.function_hdp_template_var("::hdp-hbase::params::smokeuser_permissions")%>'
\ No newline at end of file