incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347233 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/php/orchestrator/Cluster.php hmc/php/orchestrator/Service.php hmc/php/orchestrator/ServiceComponent.php
Date Thu, 07 Jun 2012 00:53:38 GMT
Author: vikram
Date: Thu Jun  7 00:53:37 2012
New Revision: 1347233

URL: http://svn.apache.org/viewvc?rev=1347233&view=rev
Log:
AMBARI-430. set service state to failed if cluster monitoring reconfiguration fails (Contributed
by Hitesh)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Cluster.php
    incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Service.php
    incubator/ambari/branches/ambari-186/hmc/php/orchestrator/ServiceComponent.php

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347233&r1=1347232&r2=1347233&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 00:53:37 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-430. set service state to failed if cluster monitoring reconfiguration fails (Hitesh
via Vikram)
+
   AMBARI-429. Fix bug with jmx parsing on HBase. (Mahadev via Vikram)
 
   AMBARI-428. changes to templeton setup for 0.1.4 (Ramya via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Cluster.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Cluster.php?rev=1347233&r1=1347232&r2=1347233&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Cluster.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Cluster.php Thu Jun  7 00:53:37
2012
@@ -340,6 +340,11 @@ class Cluster {
       $result = $nagiosComp->stop($transaction->createSubTransaction(), $dryRun);
       if ($result["result"] != 0) {
         $this->setState(State::FAILED, $transaction, $dryRun);
+        $nagiosService = $this->db->getService("NAGIOS");
+        if ($nagiosService !== FALSE) {
+          $nagiosService->setState(STATE::FAILED,
+              $transaction->createSubTransaction(), $dryRun, FALSE);
+        }
         $this->logger->log_error("Failed to stop nagios server, error"
             . $result["error"]);
         return $result;
@@ -364,6 +369,11 @@ class Cluster {
       $result = $dashboardComp->start($transaction->createSubTransaction(), $dryRun);
       if ($result["result"] != 0) {
         $this->setState(State::FAILED, $transaction, $dryRun);
+        $dashboardService = $this->db->getService("DASHBOARD");
+        if ($dashboardService !== FALSE) {
+          $dashboardService->setState(STATE::FAILED,
+              $transaction->createSubTransaction(), $dryRun, FALSE);
+        }
         $this->logger->log_error("Failed to start dashboard server, error"
             . $result["error"]);
         return $result;
@@ -436,7 +446,7 @@ class Cluster {
       $opStatus = array(
           "stats" =>
              array (
-                    "NODE_COUNT" => count($nodes),
+                    "NODE_COUNT" => count($allHosts),
                     "TIME_TAKEN_SECS" => $timeTaken),
           "nodeReport" =>
              array ( "PUPPET_KICK_FAILED" => $result[KICKFAILED],
@@ -532,7 +542,7 @@ class Cluster {
       $opStatus = array(
           "stats" =>
               array (
-                    "NODE_COUNT" => count($nodes),
+                    "NODE_COUNT" => count($kickHosts),
                     "TIME_TAKEN_SECS" => $timeTaken),
          "nodeReport" =>
             array ( "PUPPET_KICK_FAILED" => $result[KICKFAILED],

Modified: incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Service.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Service.php?rev=1347233&r1=1347232&r2=1347233&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Service.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/orchestrator/Service.php Thu Jun  7 00:53:37
2012
@@ -451,7 +451,7 @@ class Service {
       $opStatus = array(
           "stats" =>
                array (
-                      "NODE_COUNT" => count($nodes),
+                      "NODE_COUNT" => 1,
                       "TIME_TAKEN_SECS" => $timeTaken),
           "nodeReport" =>
               array ( "PUPPET_KICK_FAILED" => $result[KICKFAILED],

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=1347233&r1=1347232&r2=1347233&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 00:53:37 2012
@@ -253,7 +253,7 @@ class ServiceComponent {
       $opStatus = array(
           "stats" =>
               array (
-                     "NODE_COUNT" => count($nodes),
+                     "NODE_COUNT" => count($nodes['nodes']),
                      "TIME_TAKEN_SECS" => $timeTaken),
           "nodeReport" =>
               array ( "PUPPET_KICK_FAILED" => $result[KICKFAILED],
@@ -372,7 +372,7 @@ class ServiceComponent {
       $opStatus = array(
           "stats" =>
               array (
-                     "NODE_COUNT" => count($nodes),
+                     "NODE_COUNT" => count($nodes['nodes']),
                      "TIME_TAKEN_SECS" => $timeTaken),
           "nodeReport" =>
               array ( "PUPPET_KICK_FAILED" => $result[KICKFAILED],



Mime
View raw message