Browse Source

AMBARI-16898. Restart icon appears incorrectly for client components. (mpapirkovskyy)

Myroslav Papirkovskyi 9 years ago
parent
commit
a52b57c1cd

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

@@ -411,8 +411,10 @@ class ActionQueue(threading.Thread):
       if command.has_key('configurationTags'):
         configHandler.write_actual(command['configurationTags'])
         roleResult['configurationTags'] = command['configurationTags']
+      component = {'serviceName':command['serviceName'],'componentName':command['role']}
       if 'roleCommand' in command and \
           (command['roleCommand'] == self.ROLE_COMMAND_START or
+             (command['roleCommand'] == self.ROLE_COMMAND_INSTALL and component in LiveStatus.CLIENT_COMPONENTS) or
                (command['roleCommand'] == self.ROLE_COMMAND_CUSTOM_COMMAND and
                   'custom_command' in command['hostLevelParams'] and
                       command['hostLevelParams']['custom_command'] == self.CUSTOM_COMMAND_RESTART)):

+ 5 - 0
ambari-agent/src/main/python/ambari_agent/LiveStatus.py

@@ -25,6 +25,11 @@ logger = logging.getLogger()
 
 
 class LiveStatus:
+
+  SERVICES = []
+  CLIENT_COMPONENTS = []
+  COMPONENTS = []
+
   LIVE_STATUS = "STARTED"
   DEAD_STATUS = "INSTALLED"