You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 03:36:28 UTC
svn commit: r1347272 - in /incubator/ambari/branches/ambari-186: ./
hmc/php/conf/ hmc/php/db/ hmc/php/frontend/ hmc/php/frontend/addNodes/
hmc/php/orchestrator/ hmc/php/puppet/ hmc/php/util/
Author: vikram
Date: Thu Jun 7 01:36:27 2012
New Revision: 1347272
URL: http://svn.apache.org/viewvc?rev=1347272&view=rev
Log:
AMBARI-447. First pass at Info level logging (cleanup of logging). (Contributed by Mahadev)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc
incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/bootstrap.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/findSshableNodes.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/verifyAndUpdateNodesInfo.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/assignMasters.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/commandUtils.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesActionProgress.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstall.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstallCleanup.php
incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php
incubator/ambari/branches/ambari-186/hmc/php/puppet/PuppetInvoker.php
incubator/ambari/branches/ambari-186/hmc/php/util/HMCTxnUtils.php
incubator/ambari/branches/ambari-186/hmc/php/util/clusterState.php
incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 01:36:27 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-447. First pass at Info level logging (cleanup of logging). (Mahadev via Vikram)
+
AMBARI-458. Support configuration of checkpointing-related variables (Hitesh via Vikram)
AMBARI-439. Fixes issues in previous commit of 439. (Ramya via Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc Thu Jun 7 01:36:27 2012
@@ -20,7 +20,7 @@ $GLOBALS["puppet_install"] = "/usr/share
$GLOBALS["DRYRUN"] = FALSE;
$GLOBALS["HMC_LOG_DIR"] = "/var/log/hmc";
-$GLOBALS["HMC_LOG_LEVEL"] = HMCLogger::DEBUG;
+$GLOBALS["HMC_LOG_LEVEL"] = HMCLogger::INFO;
$GLOBALS["HMC_LOG_FILE"] = $GLOBALS["HMC_LOG_DIR"] . "/hmc.log";
/*
Modified: incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php Thu Jun 7 01:36:27 2012
@@ -1028,7 +1028,7 @@ class HMCDBAccessor {
while (sizeof($order) > 0) {
// is it an array of arrays, for an array of sortColumn and sortOrder?
if (is_array($order[0])) {
- $this->logger->log_debug('yo');
+ $this->logger->log_debug('Order is array of arrays');
$orderItem = array_shift($order);
} else {
$orderItem["sortColumn"] = array_shift($order);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes.php Thu Jun 7 01:36:27 2012
@@ -32,7 +32,7 @@ $freshInstall = ($clusterState['state']
$clusterDir = getClusterDir($clusterName);
$logString = "Cluster Name: $clusterName Cleanup required? $freshInstall and type: ".gettype($freshInstall);
-$logger->log_debug($logString);
+$logger->log_info($logString);
// Validate clusterName: TODO; FIXME
// We need to clean up prior instances for this
@@ -78,7 +78,7 @@ if (move_uploaded_file($_FILES['clusterH
header("Content-type: application/json");
// Validate that there are no nodes that are already in use in case of addNodesWizard
-$logger->log_debug("$freshInstall");
+$logger->log_info("Doing a fresh install: $freshInstall");
if (!$freshInstall) {
// Get the list of current nodes
@@ -92,7 +92,7 @@ if (!$freshInstall) {
// See if they are duplicates
$newHosts = readHostsFile($hostsFileDestination);
$duplicateHosts = array();
- $logger->log_debug("checking for dups");
+ $logger->log_debug("Checking for Duplicate Hosts.");
foreach ($allHostsInfoResult["hosts"] as $hostInfo) {
if (in_array($hostInfo["hostName"], $newHosts)) {
$duplicateHosts[] = $hostInfo["hostName"];
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/bootstrap.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/bootstrap.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/bootstrap.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/bootstrap.php Thu Jun 7 01:36:27 2012
@@ -23,8 +23,8 @@ include_once "../util/YumRepoConfigParse
$gpgKeyFiles = $repo['gpgKeyFiles'];
exec ("/etc/init.d/iptables stop");
- $logger->log_debug("List of hosts to BootStrap ".json_encode($hosts));
- $logger->log_debug("Run script for pdsh ".$rscript);
+ $logger->log_info("List of hosts to BootStrap ".json_encode($hosts));
+ $logger->log_info("Run script for pdsh ".$rscript);
$scpCmd = "scp -o StrictHostKeyChecking=no ";
foreach ($hosts as $host) {
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/findSshableNodes.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/findSshableNodes.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/findSshableNodes.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/findSshableNodes.php Thu Jun 7 01:36:27 2012
@@ -118,7 +118,7 @@ if ($dirHandle = opendir($commandOutputD
}
// Perisist the data to the db.
-$logger->log_debug("Going to persist information sshAble nodes");
+$logger->log_info("Going to persist information sshAble nodes");
$returnValue = $dbAccessor->addHostsToCluster($clusterName, $allHosts);
if ($returnValue["result"] != 0 ) {
$logger->log_error("Got error while adding hosts: ".$returnValue["error"]);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/verifyAndUpdateNodesInfo.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/verifyAndUpdateNodesInfo.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/verifyAndUpdateNodesInfo.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/addNodes/verifyAndUpdateNodesInfo.php Thu Jun 7 01:36:27 2012
@@ -304,7 +304,7 @@ if ($dirHandle = opendir($prevOutputDir)
}
// Perisist the data to the db.
-$logger->log_debug("Going to persist discovered node properties");
+$logger->log_info("Going to persist discovered node properties");
$returnValue = $dbAccessor->addHostsToCluster($clusterName, $allHosts);
if ($returnValue["result"] != 0 ) {
$logger->log_error("Got error while adding hosts: ".$returnValue["error"]);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/assignMasters.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/assignMasters.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/assignMasters.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/assignMasters.php Thu Jun 7 01:36:27 2012
@@ -45,7 +45,7 @@ $suggestedNodes = $selectNodes->updateDB
$componentsToHosts
);
-$logger->log_error("323". json_encode($allServicesComponents["services"]));
+$logger->log_trace("Debug Trace". json_encode($allServicesComponents["services"]));
/* hack to unlock front end if the updateDBWithRoles
$allHosts = array();
@@ -91,7 +91,7 @@ if ($nameNodeInfoResult["result"] != 0 )
print json_encode($nameNodeInfoResult);
return;
}
-$logger->log_error("All mount points: ".$nameNodeInfoResult["disksInfo"]);
+$logger->log_info("All mount points: ".$nameNodeInfoResult["disksInfo"]);
$AllMountPoints = json_decode($nameNodeInfoResult["disksInfo"], true);
// generate the mount points info required by javascript in the next phase
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/commandUtils.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/commandUtils.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/commandUtils.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/commandUtils.php Thu Jun 7 01:36:27 2012
@@ -4,7 +4,7 @@ function launchCmd ($cmd)
{
global $logger;
- $logger->log_debug("WCOLL is ".json_encode(getenv("WCOLL")));
+ $logger->log_info("Env variable WCOLL is ".json_encode(getenv("WCOLL")));
$handle = popen($cmd, "r");
while (!feof($handle)) {
$read = fread($handle, 4096);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php Thu Jun 7 01:36:27 2012
@@ -518,7 +518,7 @@ function validateAndPersistConfigsFromUs
}
/* TODO - need to handle values with warnings - do we want to tell users they are using above recommended settings? */
- $logger->log_info("Got error when validating configs");
+ $logger->log_error("Got error when validating configs");
return $mergedErrors;
}
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php Thu Jun 7 01:36:27 2012
@@ -61,7 +61,7 @@ fclose($fileHdl);
// if user re-enters this page, we need to delete and restart the cluster conf
$dbAccessor->wipeOutClusters($clusterName);
-$logger->log_debug("Completed deletion of cluster: ".$clusterName);
+$logger->log_info("Completed deletion of cluster: ".$clusterName);
$hdpVersion="1.0"; // TODO: hardcoded
$state="Configuration in progress";
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php Thu Jun 7 01:36:27 2012
@@ -32,8 +32,6 @@ if (isset($_GET['serviceName'])) {
$forService = "all";
}
-$logger->log_debug("$forService");
-
function getAllComponentsForService ($serviceName)
{
global $logger, $dbAccessor, $clusterName;
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesAction.php Thu Jun 7 01:36:27 2012
@@ -124,8 +124,8 @@ if ($action == "addNodes") {
error_log("ClusterName: ".$clusterName);
-$logger->log_debug("ClusterName: $clusterName\n");
-$logger->log_debug("Deploy User: $deployUser\n");
+$logger->log_info("ClusterName: $clusterName\n");
+$logger->log_info("Deploy User: $deployUser\n");
// this api just creates a new transaction id for the db
$status = "";
@@ -138,8 +138,7 @@ if ($createTxResult == FALSE) {
}
$rootTxnId = $createTxResult;
-$logger->log_error("Txn Id ===== $rootTxnId\n");
-$logger->log_error("Clustername ===== $clusterName");
+$logger->log_info("Root Txn Id = $rootTxnId\n");
$cmd = $GLOBALS["PHP_EXEC_PATH"] . " " . "../util/sequentialScriptRunner.php";
// $cmd = $GLOBALS["PHP_EXEC_PATH"] . " " . "./addNodes/addNodesOrchestrator.php";
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesActionProgress.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesActionProgress.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesActionProgress.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/nodesActionProgress.php Thu Jun 7 01:36:27 2012
@@ -30,7 +30,7 @@ include_once $stagesFile;
header("Content-type: application/json");
-$logger->log_debug("Cluster Name: $clusterName Root Txn ID: $rootTxnId");
+$logger->log_info("Cluster Name: $clusterName Root Txn ID: $rootTxnId");
$progressStates = array();
foreach ($stagesInfo as $stage => $stageInfo) {
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php Thu Jun 7 01:36:27 2012
@@ -26,8 +26,6 @@ $dbAccessor->cleanupServices($clusterNam
$requestdata = file_get_contents('php://input');
$requestObj = json_decode($requestdata, true);
-$deployUser = $requestObj['ClusterDeployUser'];
-
// Persist the services enabled stuff
$servicesCheckList = $requestObj["services"];
@@ -37,7 +35,7 @@ foreach($servicesCheckList as $serviceIn
$tempLocalServicesCopy[$serviceInfo["serviceName"]] = array("isEnabled" => $serviceInfo["isEnabled"]);
}
-$logger->log_debug("temp local".json_encode($tempLocalServicesCopy)."========");
+$logger->log_debug("Temp local copy for services \n".json_encode($tempLocalServicesCopy));
$svcDepsListArr = $dbAccessor->getAllServiceDependencies();
if ($svcDepsListArr["result"] != 0) {
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstall.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstall.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstall.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstall.php Thu Jun 7 01:36:27 2012
@@ -38,7 +38,7 @@ $clusterState = json_decode($clusterStat
*/
if ($clusterState['state'] == 'DEPLOYED') {
- $logger->log_debug("Uninstall invoked");
+ $logger->log_info("Uninstall invoked");
$action = $_GET['action'];
$deployUser = $_GET['clusterDeployUser'];
@@ -70,7 +70,7 @@ if ($clusterState['state'] == 'DEPLOYED'
fclose($hostFileHdl);
////// end of generating new file
- $logger->log_debug("Uninstall got wipeout value $wipeout");
+ $logger->log_info("Uninstall got wipeout value $wipeout");
// call the wipeout script and return the transaction id
$hmc = new HMC($dbPath, $clusterName);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstallCleanup.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstallCleanup.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstallCleanup.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/uninstallCleanup.php Thu Jun 7 01:36:27 2012
@@ -38,8 +38,8 @@ function deBootStrap ($clusterName, $dep
/////// launch the stages in the background.
$stagesFile = "./uninstall/stages.php";
- $logger->log_debug("ClusterName: $clusterName\n");
- $logger->log_debug("Deploy User: $deployUser\n");
+ $logger->log_info("ClusterName: $clusterName\n");
+ $logger->log_info("Deploy User: $deployUser\n");
$status = "";
$createTxResult = HMCTxnUtils::createNewTransaction($dbAccessor, $clusterName, $status);
if ($createTxResult == FALSE) {
@@ -49,8 +49,7 @@ function deBootStrap ($clusterName, $dep
}
$rootTxnId = $createTxResult;
- $logger->log_error("Txn Id ===== $rootTxnId\n");
- $logger->log_error("Clustername ===== $clusterName");
+ $logger->log_info("Root Txn Id = $rootTxnId\n");
$cmd = $GLOBALS["PHP_EXEC_PATH"] . " " . "../util/sequentialScriptRunner.php";
// $cmd = $GLOBALS["PHP_EXEC_PATH"] . " " . "./addNodes/addNodesOrchestrator.php";
Modified: incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php Thu Jun 7 01:36:27 2012
@@ -129,7 +129,7 @@ class ServiceComponent {
// Check if it's already UNINSTALLED
if ($this->state === State::UNINSTALLED) {
- $this->logger->log_debug("ServiceComponent $this->name is already UNINSTALLED!");
+ $this->logger->log_info("ServiceComponent $this->name is already UNINSTALLED!");
return array("result" => 0, "error" => "");
}
@@ -153,7 +153,7 @@ class ServiceComponent {
// Check if it's already INSTALLED
if ($this->state === State::INSTALLED) {
- $this->logger->log_debug("ServiceComponent $this->name is already INSTALLED!");
+ $this->logger->log_info("ServiceComponent $this->name is already INSTALLED!");
return array("result" => 0, "error" => "");
}
@@ -196,7 +196,7 @@ class ServiceComponent {
// Check if it's already STARTED
if ($this->state === State::STARTED) {
- $this->logger->log_debug("ServiceComponent $this->name is already STARTED!");
+ $this->logger->log_info("ServiceComponent $this->name is already STARTED!");
return array("result" => 0, "error" => "");
}
@@ -239,7 +239,7 @@ class ServiceComponent {
}
if (!$dryRun) {
- $this->logger->log_debug("Kicking puppet for starting component on "
+ $this->logger->log_info("Kicking puppet for starting component on "
. " cluster=" . $this->clusterName
. ", servicecomponent=" . $this->name
. ", txn=" . $transaction->toString());
@@ -247,7 +247,7 @@ class ServiceComponent {
$startTime = time();
$result = $this->puppet->kickPuppet($nodes['nodes'], $transaction,
$this->clusterName, array ( $this->name => $nodes['nodes'] ));
- $this->logger->log_debug("Puppet kick response for starting component on "
+ $this->logger->log_info("Puppet kick response for starting component on "
. " cluster=" . $this->clusterName
. ", servicecomponent=" . $this->name
. ", txn=" . $transaction->toString()
@@ -315,7 +315,7 @@ class ServiceComponent {
// Check if it's already STOPPED
if ($this->state === State::STOPPED) {
- $this->logger->log_debug("ServiceComponent $this->name is already STOPPED!");
+ $this->logger->log_info("ServiceComponent $this->name is already STOPPED!");
return array("result" => 0, "error" => "");
}
@@ -358,7 +358,7 @@ class ServiceComponent {
}
if (!$dryRun) {
- $this->logger->log_debug("Kicking puppet for stopping component on"
+ $this->logger->log_info("Kicking puppet for stopping component on"
. " cluster=" . $this->clusterName
. ", servicecomponent=" . $this->name
. ", txn=" . $transaction->toString());
@@ -366,7 +366,7 @@ class ServiceComponent {
$startTime = time();
$result = $this->puppet->kickPuppet($nodes['nodes'], $transaction,
$this->clusterName, array ( $this->name => $nodes['nodes'] ));
- $this->logger->log_debug("Puppet kick response for stopping component on"
+ $this->logger->log_info("Puppet kick response for stopping component on"
. " cluster=" . $this->clusterName
. ", servicecomponent=" . $this->name
. ", txn=" . $transaction->toString()
Modified: incubator/ambari/branches/ambari-186/hmc/php/puppet/PuppetInvoker.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/puppet/PuppetInvoker.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/puppet/PuppetInvoker.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/puppet/PuppetInvoker.php Thu Jun 7 01:36:27 2012
@@ -76,7 +76,7 @@
$this->logger->log_info($kNode . "previous kick still running, will continue to wait");
$prevKickRunningNodes[] = $kNode;
} else {
- $this->logger->log_info($kNode . ": Kick failed");
+ $this->logger->log_info($kNode . ": Kick failed with $output");
$failedNodes[] = $kNode;
}
}
Modified: incubator/ambari/branches/ambari-186/hmc/php/util/HMCTxnUtils.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/HMCTxnUtils.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/HMCTxnUtils.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/HMCTxnUtils.php Thu Jun 7 01:36:27 2012
@@ -73,7 +73,7 @@ class HMCTxnUtils {
}
$execCommand .= " -l \"" . $logFile . "\"";
- self::$logger->log_debug("Trying to background a new process"
+ self::$logger->log_info("Trying to background a new process"
. ", cluster=" . $clusterName
. ", txnId=" . $txnId
. ", command=" . $command
@@ -100,7 +100,7 @@ class HMCTxnUtils {
do {
$data = fread($handle, 256);
$output .= $data;
- self::$logger->log_debug("Output from process"
+ self::$logger->log_info("Output from process"
. ", command=" . $command
. ", txnId=" . $txnId
. ", output=" . $output);
@@ -109,7 +109,7 @@ class HMCTxnUtils {
$output, $match);
if ($count > 0) {
$childPid = intval($match[1]);
- self::$logger->log_debug("Found child pid"
+ self::$logger->log_info("Found child pid"
. ", command=" . $command
. ", txnId=" . $txnId
. ", output=" . $output
Modified: incubator/ambari/branches/ambari-186/hmc/php/util/clusterState.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/clusterState.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/clusterState.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/clusterState.php Thu Jun 7 01:36:27 2012
@@ -15,7 +15,7 @@ function updateClusterState ($clusterNam
$stateStr = json_encode($stateObj);
$retval = $dbAccessor->setClusterState($clusterName, $stateStr);
- $logger->log_debug("Update Cluster State with ".$stateStr);
+ $logger->log_info("Update Cluster State with ".$stateStr);
return $retval;
}
Modified: incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php?rev=1347272&r1=1347271&r2=1347272&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php Thu Jun 7 01:36:27 2012
@@ -54,7 +54,6 @@ class SelectNodes {
$result["mastersToHosts"]["NAMENODE"] = $this->createHostMap($hostInfo);
}
- $this->logger->log_info("Adding to result ".$result);
return $result;
}
@@ -159,7 +158,7 @@ class SelectNodes {
$db->addHostsToComponent($clusterName, "HBASE_REGIONSERVER", $hostlist, "ASSIGNED", "");
}
if (array_key_exists("GANGLIA", $services)) {
- if (sizeof($hosts) > 0) {
+ if (sizeof($hostlist) > 0) {
$db->addHostsToComponent($clusterName, "GANGLIA_MONITOR", $hostlist, "ASSIGNED", "");
}
}
@@ -243,8 +242,8 @@ class SelectNodes {
$return = array();
$return["result"] = 0;
$return["error"] = "";
- $this->logger->log_error("All info: ".$clusterName."\n "
- .json_encode($masterToHost));
+ $this->logger->log_info("Updating with Info from User: \n".$clusterName."\n "
+ .print_r($masterToHost, true));
$allHostsDBInfo = $db->getAllHostsInfo($clusterName,
array("=" => array ( "discoveryStatus" => "SUCCESS")), array());
if ($allHostsDBInfo["result"] != 0) {
@@ -266,7 +265,7 @@ class SelectNodes {
$services = $this->filterEnabledServices($services_tmp);
$allHosts = $this->convertHostInfoToList($allHosts_t);
foreach($masterToHost as $componentName=>$hostNames) {
- $this->logger->log_debug("For cluster $clusterName setting $componentName to host $hostName");
+ $this->logger->log_info("For cluster $clusterName setting $componentName to host \n". print_r($hostNames, true));
$db->addHostsToComponent($clusterName, $componentName, $hostNames, "ASSIGNED", "");
if ($componentName == "GANGLIA_MONITOR_SERVER") {
$gangliaMaster = $hostNames[0];
@@ -286,7 +285,6 @@ class SelectNodes {
}
}
/** make sure ganglia is added to all the masters **/
- $this->logger->log_debug("Host for Gangalia Master $gangliaMaster");
$masterHosts = array();
foreach($masterToHost as $componentName=>$hostNames) {
foreach($hostNames as $hostName) {
@@ -323,7 +321,7 @@ class SelectNodes {
array_push($result, $hostInfo);
}
}
- $this->logger->log_debug("Excluding hmc host \n".print_r($result, true));
+ $this->logger->log_debug("List for picking Nagios/Ganglia masters from \n".print_r($result, true));
return $result;
}