Bläddra i källkod

AMBARI-7544. Ambari Agent become stopped after installation (heartBeat lost). (mpapirkovskyy)

Myroslav Papirkovskyy 10 år sedan
förälder
incheckning
cf4108794d

+ 2 - 2
ambari-agent/src/main/python/ambari_agent/ActionQueue.py

@@ -137,8 +137,8 @@ class ActionQueue(threading.Thread):
                       " of cluster " +  queued_command['clusterName'] + \
                       " to the queue.")
 
-    # Kill if in progress
-    self.customServiceOrchestrator.cancel_command(task_id, reason)
+      # Kill if in progress
+      self.customServiceOrchestrator.cancel_command(task_id, reason)
 
   def run(self):
     while not self.stopped():

+ 5 - 1
ambari-agent/src/main/python/ambari_agent/Controller.py

@@ -146,7 +146,11 @@ class Controller(threading.Thread):
   def cancelCommandInQueue(self, commands):
     """ Remove from the queue commands, kill the process if it's in progress """
     if commands:
-      self.actionQueue.cancel(commands)
+      try:
+        self.actionQueue.cancel(commands)
+      except Exception, err:
+        logger.error("Exception occurred on commands cancel: %s", err.message)
+        pass
     pass
 
   def addToQueue(self, commands):