You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2015/11/13 18:33:11 UTC

[2/2] ambari git commit: AMBARI-13887. SmartSense install fails as archive.zip fails to download (dlysnichenko)

AMBARI-13887. SmartSense install fails as archive.zip fails to download (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: a75e81c310704b4af800132b274c10e12955fbb0
Parents: 9319c67
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Nov 13 19:32:30 2015 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Nov 13 19:33:45 2015 +0200

----------------------------------------------------------------------
 .../src/main/python/ambari_server/resourceFilesKeeper.py         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a75e81c3/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
index fb429d0..f2a3ebd 100644
--- a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
+++ b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
@@ -232,7 +232,8 @@ class ResourceFilesKeeper():
           self.dbg_out("Empty directory. Skipping archive creation for {0}".format(directory))
           return
 
-      zf = zipfile.ZipFile(os.path.join(directory, self.ARCHIVE_NAME), "w")
+      zip_file_path = os.path.join(directory, self.ARCHIVE_NAME)
+      zf = zipfile.ZipFile(zip_file_path, "w")
       abs_src = os.path.abspath(directory)
       for root, dirs, files in os.walk(directory):
         for filename in files:
@@ -244,6 +245,7 @@ class ResourceFilesKeeper():
                                         arcname))
             zf.write(absname, arcname)
       zf.close()
+      os.chmod(zip_file_path, 0o666)
     except Exception, err:
       raise KeeperException("Can not create zip archive of "
                             "directory {0} : {1}".format(directory, str(err)))