Bladeren bron

AMBARI-515. Modules tar size increases. (Contributed by Jitendra)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1347365 13f79535-47bb-0310-9956-ffa450edef68
Vikram Dixit K 13 jaren geleden
bovenliggende
commit
c9f3f19a25
2 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 2 0
      CHANGES.txt
  2. 3 3
      hmc/php/puppet/PuppetInvoker.php

+ 2 - 0
CHANGES.txt

@@ -6,6 +6,8 @@ characters wide.
 
 
 Release 0.1.x - unreleased
 Release 0.1.x - unreleased
 
 
+  AMBARI-515. Modules tar size increases. (Jitendra via Vikram)
+
   AMBARI-514. Fix parsing error in puppet manifests. (Mahadev via Vikram)
   AMBARI-514. Fix parsing error in puppet manifests. (Mahadev via Vikram)
 
 
   AMBARI-513. Download mysql rpm for sqoop (Ramya via Vikram)
   AMBARI-513. Download mysql rpm for sqoop (Ramya via Vikram)

+ 3 - 3
hmc/php/puppet/PuppetInvoker.php

@@ -242,13 +242,13 @@
           $configInfo, $hostRolesStates, $hostAttributes, $agentModulesDir);
           $configInfo, $hostRolesStates, $hostAttributes, $agentModulesDir);
 
 
       //Tar the modules and catalog
       //Tar the modules and catalog
-      $tarCmd = "tar zcf ". $GLOBALS["manifestloaderDir"] . "/modules.tgz" . " " .  $GLOBALS["puppetMasterModulesDirectory"];
-      $this->logger->log_info($tarCmd);
-      exec($tarCmd);
       $tarLocation = $GLOBALS["puppetMasterModulesDirectory"] . "/catalog/files" ;
       $tarLocation = $GLOBALS["puppetMasterModulesDirectory"] . "/catalog/files" ;
       $removeOldTar = "rm -f " . $tarLocation . "/modules.tgz";
       $removeOldTar = "rm -f " . $tarLocation . "/modules.tgz";
       $this->logger->log_info($removeOldTar);
       $this->logger->log_info($removeOldTar);
       exec($removeOldTar);
       exec($removeOldTar);
+      $tarCmd = "tar zcf ". $GLOBALS["manifestloaderDir"] . "/modules.tgz" . " " .  $GLOBALS["puppetMasterModulesDirectory"];
+      $this->logger->log_info($tarCmd);
+      exec($tarCmd);
       $placeNewTarCmd = "mv " . $GLOBALS["manifestloaderDir"] . "/modules.tgz" . " " . $tarLocation;
       $placeNewTarCmd = "mv " . $GLOBALS["manifestloaderDir"] . "/modules.tgz" . " " . $tarLocation;
       $this->logger->log_info($placeNewTarCmd);
       $this->logger->log_info($placeNewTarCmd);
       exec($placeNewTarCmd);
       exec($placeNewTarCmd);