cleanupProcesses.php 835 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. include_once '../util/Logger.php';
  3. include_once '../conf/Config.inc';
  4. include_once 'localDirs.php';
  5. include_once "../util/lock.php";
  6. include_once '../db/HMCDBAccessor.php';
  7. include_once './uninstall/uninstallUtil.php';
  8. $logger = new HMCLogger("CleanupProcesses");
  9. $dbAccessor = new HMCDBAccessor($GLOBALS["DB_PATH"]);
  10. function getCommandLine() {
  11. $cmdLine = " killall puppet ; ";
  12. return $cmdLine;
  13. }
  14. $clusterName = $argv[1];
  15. $deployUser = $argv[2];
  16. $rootTxnId = $argv[3];
  17. $mySubTxnId = $argv[4];
  18. $parentSubTxnId = $argv[5];
  19. $hostsStr = $argv[6];
  20. // stage name should match corr. stage in stages.php
  21. $stageName = "CleanupProcesses";
  22. $cmdLine = getCommandLine();
  23. handleUninstallTransaction($clusterName, $deployUser, $rootTxnId,
  24. $mySubTxnId, $parentSubTxnId, $hostsStr,
  25. $stageName, $cmdLine, $dbAccessor, $logger);
  26. ?>