Explorar o código

AMBARI-8154 storm secure cluster issues

Dmytro Sen %!s(int64=10) %!d(string=hai) anos
pai
achega
776743beb4

+ 8 - 1
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py

@@ -26,7 +26,14 @@ from ambari_agent.AgentException import AgentException
 def storm():
   import params
 
-  Directory([params.log_dir, params.pid_dir, params.local_dir, params.conf_dir],
+  Directory(params.log_dir,
+            owner=params.storm_user,
+            group=params.user_group,
+            mode=0775,
+            recursive=True
+  )
+
+  Directory([params.pid_dir, params.local_dir, params.conf_dir],
             owner=params.storm_user,
             group=params.user_group,
             recursive=True

+ 40 - 0
ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-env.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+
+<configuration>
+  <!-- storm-env.sh -->
+  <property>
+    <name>content</name>
+    <description>This is the jinja template for storm-env.sh file</description>
+    <value>
+#!/bin/bash
+
+# Set Storm specific environment variables here.
+
+# The java implementation to use.
+export JAVA_HOME={{java64_home}}
+
+# export STORM_CONF_DIR=""
+STORM_HOME=/usr/hdp/current/storm-client
+    </value>
+  </property>
+</configuration>

+ 2 - 0
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py

@@ -30,6 +30,7 @@ class TestStormBase(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/storm',
       owner = 'storm',
       group = 'hadoop',
+      mode = 0775,
       recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/run/storm',
@@ -68,6 +69,7 @@ class TestStormBase(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/storm',
       owner = 'storm',
       group = 'hadoop',
+      mode = 0775,
       recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/run/storm',