Parcourir la source

AMBARI-4120. Fix HBase on 2.0._ failing in security, oozie alerts
(aonishuk)

Andrew Onischuk il y a 11 ans
Parent
commit
8692e9c9a8

+ 22 - 0
ambari-agent/src/main/python/resource_management/core/resources/__init__.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 from resource_management.core.resources.accounts import *
 from resource_management.core.resources.packaging import *
 from resource_management.core.resources.service import *

+ 21 - 0
ambari-agent/src/main/python/resource_management/core/resources/accounts.py

@@ -1,3 +1,24 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
 __all__ = ["Group", "User"]
 
 from resource_management.core.base import Resource, ForcedListArgument, ResourceArgument, BooleanArgument

+ 22 - 0
ambari-agent/src/main/python/resource_management/core/resources/packaging.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 __all__ = ["Package"]
 
 from resource_management.core.base import Resource, ForcedListArgument, ResourceArgument

+ 22 - 0
ambari-agent/src/main/python/resource_management/core/resources/service.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 __all__ = ["Service"]
 
 from resource_management.core.base import Resource, ResourceArgument, ForcedListArgument

+ 22 - 0
ambari-agent/src/main/python/resource_management/core/resources/system.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 __all__ = ["File", "Directory", "Link", "Execute", "ExecuteScript", "Mount"]
 
 from resource_management.core.base import Resource, ForcedListArgument, ResourceArgument, BooleanArgument

+ 22 - 0
ambari-agent/src/main/python/resource_management/libraries/functions/check_process_status.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 from resource_management.core.exceptions import ComponentIsNotRunning
 __all__ = ["check_process_status"]
 

+ 22 - 0
ambari-agent/src/main/python/resource_management/libraries/functions/get_kinit_path.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 __all__ = ["get_kinit_path"]
 import os
 

+ 22 - 0
ambari-agent/src/main/python/resource_management/libraries/functions/get_unique_id_and_date.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 __all__ = ["get_unique_id_and_date"]
 import datetime
 from resource_management.core.shell import checked_call

+ 22 - 0
ambari-agent/src/main/python/resource_management/libraries/providers/monitor_webserver.py

@@ -1,3 +1,25 @@
+#!/usr/bin/env python
+"""
+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.
+
+Ambari Agent
+
+"""
+
 from resource_management import *
 from resource_management.core.system import System
 

+ 1 - 0
ambari-server/src/main/resources/stacks/HDP/2.0._/services/HBASE/package/scripts/hbase_master.py

@@ -39,6 +39,7 @@ class HbaseMaster(Script):
   def start(self, env):
     import params
     env.set_params(params)
+    self.configure(env) # for security
 
     hbase_service( 'master',
       action = 'start'

+ 1 - 0
ambari-server/src/main/resources/stacks/HDP/2.0._/services/HBASE/package/scripts/hbase_regionserver.py

@@ -39,6 +39,7 @@ class HbaseRegionServer(Script):
   def start(self, env):
     import params
     env.set_params(params)
+    self.configure(env) # for security
 
     hbase_service( 'regionserver',
       action = 'start'

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/templates/hadoop-services.cfg.j2

@@ -612,7 +612,7 @@ define service {
         service_description     OOZIE::Oozie Server status
         servicegroups           OOZIE
         {% if security_enabled %}
-        check_command           check_oozie_status!{{ oozie_server_port }}!{{ java64_home }}!true!{{ nagios_keytab_path }}>!{{ nagios_principal_name }}!{{ kinit_path_local }}
+        check_command           check_oozie_status!{{ oozie_server_port }}!{{ java64_home }}!true!{{ nagios_keytab_path }}!{{ nagios_principal_name }}!{{ kinit_path_local }}
         {% else %}
         check_command           check_oozie_status!{{ oozie_server_port }}!{{ java64_home }}!false
         {% endif %}

+ 2 - 1
pom.xml

@@ -153,7 +153,8 @@
 
             <!--Python Mock library (BSD license)-->
             <exclude>ambari-common/src/test/python/mock/**</exclude>
-
+	    <!--Jinja2 library (BSD license)-->
+	    <exclude>ambari-common/src/main/python/jinja2/**</exclude>
           </excludes>
         </configuration>
       </plugin>