incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject svn commit: r1493216 - /incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
Date Fri, 14 Jun 2013 19:12:41 GMT
Author: swagle
Date: Fri Jun 14 19:12:41 2013
New Revision: 1493216

URL: http://svn.apache.org/r1493216
Log:
AMBARI-2394. ambari-server setup borken in trunk. (swagle)

Modified:
    incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py

Modified: incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py?rev=1493216&r1=1493215&r2=1493216&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py (original)
+++ incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Fri Jun 14 19:12:41
2013
@@ -1347,16 +1347,14 @@ def install_jce_manualy(args):
     jce_destination = os.path.join(properties[RESOURCES_DIR_PROPERTY], JCE_POLICY_FILENAME)
     shutil.copy(args.jce_policy, jce_destination)
     print "JCE policy copied from " + args.jce_policy + " to " + jce_destination
+    return 0
   else:
-    err = "Error getting ambari properties"
-    print_error_msg( err )
-    raise FatalException(-1, err)
-
+    return 1
 #
 # Downloads the JDK
 #
 def download_jdk(args):
-  install_jce_manualy(args)
+  jce_installed = install_jce_manualy(args)
   if get_JAVA_HOME():
     return 0
   if args.java_home and os.path.exists(args.java_home):
@@ -1445,15 +1443,17 @@ def download_jdk(args):
       format(JDK_INSTALL_DIR, jdk_version)
   write_property(JAVA_HOME_PROPERTY, "{0}/{1}".
       format(JDK_INSTALL_DIR, jdk_version))
-  try:
-    download_jce_policy(properties, ok)
-  except FatalException as e:
-    print "JCE Policy files are required for secure HDP setup. Please ensure " \
-            " all hosts have the JCE unlimited strength policy 6, files."
-    print_error_msg("Failed to download JCE policy files:")
-    if e.reason is not None:
-      print_error_msg("Reason: {0}".format(e.reason))
-    # TODO: We don't fail installation if download_jce_policy fails. Is it OK?
+
+  if jce_installed != 0:
+    try:
+      download_jce_policy(properties, ok)
+    except FatalException as e:
+      print "JCE Policy files are required for secure HDP setup. Please ensure " \
+              " all hosts have the JCE unlimited strength policy 6, files."
+      print_error_msg("Failed to download JCE policy files:")
+      if e.reason is not None:
+        print_error_msg("Reason: {0}".format(e.reason))
+      # TODO: We don't fail installation if download_jce_policy fails. Is it OK?
   return 0
 
 



Mime
View raw message