ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-20879. Ambari clean up for 3.0.(vbrodetskyi)
Date Fri, 28 Apr 2017 12:11:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 704072cb0 -> 0d2ac4f1b


AMBARI-20879. Ambari clean up for 3.0.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d2ac4f1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d2ac4f1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d2ac4f1

Branch: refs/heads/trunk
Commit: 0d2ac4f1b294662917b8a50a7cb5c895d7049c03
Parents: 704072c
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Fri Apr 28 15:10:30 2017 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Fri Apr 28 15:11:09 2017 +0300

----------------------------------------------------------------------
 ambari-agent/conf/unix/install-helper.sh          |  1 +
 ambari-agent/pom.xml                              |  1 +
 ambari-agent/src/packages/tarball/all.xml         | 11 ++++++++++-
 ambari-server/conf/unix/install-helper.sh         | 17 +++++++++++++++++
 ambari-server/src/main/assemblies/server.xml      |  2 ++
 ambari-server/src/main/package/rpm/postinstall.sh | 18 ------------------
 .../python/ambari_server/serverConfiguration.py   |  1 +
 .../resources/scripts/check_ambari_permissions.py | 13 ++++++++-----
 8 files changed, 40 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-agent/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh
index 0e32d0a..fef634f 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -70,6 +70,7 @@ do_install(){
   chmod a+x $AMBARI_AGENT_VAR
   
   chmod 1777 $AMBARI_AGENT_VAR/tmp
+  chmod 700 $AMBARI_AGENT_VAR/keys
   chmod 700 $AMBARI_AGENT_VAR/data
 
   #TODO we need this when upgrading from pre 2.4 versions to 2.4, remove this when upgrade
from pre 2.4 versions will be

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index a57ed64..c1cb056 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -330,6 +330,7 @@
                     <include>/tools/*.jar</include>
                     <include>/cache/stacks/HDP/2.1.GlusterFS/services/STORM/package/files/wordCount.jar</include>
                     <include>/cache/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar</include>
+                    <include>/cache/stacks/HDP/3.0/hooks/before-START/files/fast-hdfs-resource.jar</include>
                     <include>/cache/common-services/STORM/0.9.1/package/files/wordCount.jar</include>
                   </includes>
                 </source>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-agent/src/packages/tarball/all.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/src/packages/tarball/all.xml b/ambari-agent/src/packages/tarball/all.xml
index 363941a..c71ffe9 100644
--- a/ambari-agent/src/packages/tarball/all.xml
+++ b/ambari-agent/src/packages/tarball/all.xml
@@ -44,21 +44,25 @@
   <fileSets>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>src/main/python/ambari_agent</directory>
       <outputDirectory>${agent.install.dir}</outputDirectory>
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${project.basedir}/../ambari-common/src/main/python/ambari_commons</directory>
       <outputDirectory>${ambari_commons.install.dir}</outputDirectory>
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${resourceManagementSrcLocation}</directory>
       <outputDirectory>${resource_management.install.dir}</outputDirectory>
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</directory>
       <outputDirectory>${jinja.install.dir}</outputDirectory>
       <excludes>
@@ -67,11 +71,13 @@
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${project.basedir}/../ambari-common/src/main/python/ambari_simplejson</directory>
       <outputDirectory>${simplejson.install.dir}</outputDirectory>
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>src/examples</directory>
       <outputDirectory>${lib.dir}/examples</outputDirectory>
     </fileSet>
@@ -92,7 +98,8 @@
 	  </excludes>
     </fileSet>
     <fileSet>
-      <directoryMode>755</directoryMode>
+      <directoryMode>700</directoryMode>
+      <fileMode>700</fileMode>
       <directory>${empty.dir}</directory>
       <outputDirectory>/var/lib/${project.artifactId}/keys</outputDirectory>
 	  <excludes>
@@ -117,11 +124,13 @@
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${target.cache.dir}</directory>
       <outputDirectory>/var/lib/ambari-agent/cache</outputDirectory>
     </fileSet>
     <fileSet>
       <directoryMode>755</directoryMode>
+      <fileMode>755</fileMode>
       <directory>${pluggableStackDefinitionOutput}/custom_actions</directory>
       <outputDirectory>/var/lib/ambari-agent/cache/custom_actions</outputDirectory>
     </fileSet>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh
index 8def27a..7b29d06 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -33,6 +33,9 @@ JINJA_SERVER_DIR="${ROOT}/usr/lib/ambari-server/lib/ambari_jinja2"
 SIMPLEJSON_SERVER_DIR="${ROOT}/usr/lib/ambari-server/lib/ambari_simplejson"
 AMBARI_PROPERTIES="${ROOT}/etc/ambari-server/conf/ambari.properties"
 AMBARI_ENV_RPMSAVE="${ROOT}/var/lib/ambari-server/ambari-env.sh.rpmsave" # this turns into
ambari-env.sh during ambari-server start
+AMBARI_SERVER_KEYS_FOLDER="${ROOT}/var/lib/ambari-server/keys"
+AMBARI_SERVER_KEYS_DB_FOLDER="${ROOT}/var/lib/ambari-server/keys/db"
+AMBARI_SERVER_NEWCERTS_FOLDER="${ROOT}/var/lib/ambari-server/keys/db/newcerts"
 
 PYTHON_WRAPER_DIR="${ROOT}/usr/bin/"
 PYTHON_WRAPER_TARGET="${PYTHON_WRAPER_DIR}/ambari-python-wrap"
@@ -126,6 +129,20 @@ do_install(){
 	$AUTOSTART_SERVER_CMD
   fi
 
+  if [ -d "$AMBARI_SERVER_KEYS_FOLDER" ]
+  then
+      chmod 700 "$AMBARI_SERVER_KEYS_FOLDER"
+      if [ -d "$AMBARI_SERVER_KEYS_DB_FOLDER" ]
+      then
+          chmod 700 "$AMBARI_SERVER_KEYS_DB_FOLDER"
+          if [ -d "$AMBARI_SERVER_NEWCERTS_FOLDER" ]
+          then
+              chmod 700 "$AMBARI_SERVER_NEWCERTS_FOLDER"
+
+          fi
+      fi
+  fi
+
   if [ -f "$AMBARI_ENV_RPMSAVE" ] ; then
     PYTHON_PATH_LINE='export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages'
     grep "^$PYTHON_PATH_LINE\$" "$AMBARI_ENV_RPMSAVE" > /dev/null

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml
index 2783526..51ee14e 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -177,6 +177,7 @@
       <excludes>
 	    <exclude>/2.1.GlusterFS/services/STORM/package/files/wordCount.jar</exclude>
         <exclude>/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar</exclude>
+        <exclude>/3.0/hooks/before-START/files/fast-hdfs-resource.jar</exclude>
 	  </excludes>
     </fileSet>
     <fileSet>
@@ -186,6 +187,7 @@
       <includes>
 	    <include>/2.1.GlusterFS/services/STORM/package/files/wordCount.jar</include>
         <include>/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar</include>
+        <include>/3.0/hooks/before-START/files/fast-hdfs-resource.jar</include>
 	  </includes>
     </fileSet>
     <fileSet>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-server/src/main/package/rpm/postinstall.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/postinstall.sh b/ambari-server/src/main/package/rpm/postinstall.sh
index 021a514..1e8e0f0 100644
--- a/ambari-server/src/main/package/rpm/postinstall.sh
+++ b/ambari-server/src/main/package/rpm/postinstall.sh
@@ -17,10 +17,6 @@
 
 INSTALL_HELPER="${RPM_INSTALL_PREFIX}/var/lib/ambari-server/install-helper.sh"
 
-AMBARI_SERVER_KEYS_FOLDER="${ROOT}/var/lib/ambari-server/keys"
-AMBARI_SERVER_KEYS_DB_FOLDER="${ROOT}/var/lib/ambari-server/keys/db"
-AMBARI_SERVER_NEWCERTS_FOLDER="${ROOT}/var/lib/ambari-server/keys/db/newcerts"
-
 case "$1" in
   1) # Action install
     if [ -f "$INSTALL_HELPER" ]; then
@@ -34,18 +30,4 @@ case "$1" in
   ;;
 esac
 
-if [ -d "$AMBARI_SERVER_KEYS_FOLDER" ]
-then
-    chmod 700 "$AMBARI_SERVER_KEYS_FOLDER"
-    if [ -d "$AMBARI_SERVER_KEYS_DB_FOLDER" ]
-    then
-        chmod 700 "$AMBARI_SERVER_KEYS_DB_FOLDER"
-        if [ -d "$AMBARI_SERVER_NEWCERTS_FOLDER" ]
-        then
-            chmod 700 "$AMBARI_SERVER_NEWCERTS_FOLDER"
-
-        fi
-    fi
-fi
-
 exit 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 7eba9db..4780338 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -555,6 +555,7 @@ class ServerConfigDefaultsLinux(ServerConfigDefaults):
       (AmbariPath.get("/var/lib/ambari-server/resources/stacks/HDP/2.1.GlusterFS/services/STORM/package/files/wordCount.jar"),
"644", "{0}", False),
       (AmbariPath.get("/var/lib/ambari-server/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar"),
"644", "{0}", False),
       (AmbariPath.get("/var/lib/ambari-server/resources/stacks/HDP/2.1/services/SMARTSENSE/package/files/view/smartsense-ambari-view-1.4.0.0.60.jar"),
"644", "{0}", False),
+      (AmbariPath.get("/var/lib/ambari-server/resources/stacks/HDP/3.0/hooks/before-START/files/fast-hdfs-resource.jar"),
"644", "{0}", False),
       # Also, /etc/ambari-server/conf/password.dat
       # is generated later at store_password_file
     ]

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d2ac4f1/ambari-server/src/main/resources/scripts/check_ambari_permissions.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/check_ambari_permissions.py b/ambari-server/src/main/resources/scripts/check_ambari_permissions.py
index bcb5fc0..21b8a0a 100644
--- a/ambari-server/src/main/resources/scripts/check_ambari_permissions.py
+++ b/ambari-server/src/main/resources/scripts/check_ambari_permissions.py
@@ -30,23 +30,26 @@ SECURE_DIRECTORY_PERMISSIONS = 700
 SECURE_FILE_PERMISSIONS = 700
 
 # List of directories with jar files or path to jar file. If "directory", then we will check
all jar files in it and in all subdirectories. If jar "file" then we will check only this
file.
-jar_files_to_check = ["/var/lib/ambari-server/", "/usr/lib/ambari-server/"]
+jar_files_to_check = ["/var/lib/ambari-server/", "/usr/lib/ambari-server/", "/var/lib/ambari-agent/"]
 
 # List of directories. For this list we are only checking permissions for directory.
 directories_to_check = ["/etc/ambari-server/conf", "/usr/lib/ambari-server", "/usr/lib/python2.6/site-packages/ambari_server",
-                        "/var/lib/ambari-server"]
+                        "/var/lib/ambari-server", "/usr/lib/ambari-agent", "/usr/lib/python2.6/site-packages/ambari_agent",
+                        "/var/lib/ambari-agent/cache", "/var/lib/ambari-agent/cred", "/var/lib/ambari-agent/data",
+                        "/var/lib/ambari-agent/tools", "/var/lib/ambari-agent/lib", "/etc/ambari-agent/conf"]
 
 # List of directories/files. If "directory", then we will check all files in it and in all
subdirectories. If "file" then we will check only this file.
 files_to_check = ["/etc/ambari-server/conf/", "/etc/init/ambari-server.conf", "/etc/init.d/ambari-server",
                   "/usr/lib/ambari-server", "/usr/lib/python2.6/site-packages/ambari_server",
"/usr/sbin/ambari_server_main.py",
-                  "/usr/sbin/ambari-server.py", "/var/lib/ambari-server"]
+                  "/usr/sbin/ambari-server.py", "/var/lib/ambari-server", "/usr/lib/ambari-agent",
+                  "/usr/lib/python2.6/site-packages/ambari_agent", "/var/lib/ambari-agent"]
 
 
 # List of secure directories. For this list we are only checking permissions for directory.
-secure_directories_to_check = ["/var/lib/ambari-server/keys"]
+secure_directories_to_check = ["/var/lib/ambari-server/keys","/var/lib/ambari-agent/keys"]
 
 # List of secure directories/files. If "directory", then we will check all files in it and
in all subdirectories. If "file" then we will check only this file.
-secure_files_to_check = ["/var/lib/ambari-server/keys"]
+secure_files_to_check = ["/var/lib/ambari-server/keys", "/var/lib/ambari-agent/keys"]
 
 
 


Mime
View raw message