ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [ambari] shubhamod opened a new pull request #3314: [AMBARI-25675] On giving Restart command, on Server side the desired state gets changed to STARTED but on Agent Side desired state remains INSTALLED.
Date Sun, 23 May 2021 13:32:00 GMT

shubhamod opened a new pull request #3314:

   ## What changes were proposed in this pull request?
   Currently, if we the component is in INSTALLED state and we give Restart command, on Server
side the desired state gets changed to STARTED but on Agent Side desired state remains INSTALLED.
   The RESTART command received and created on Ambari Agent is:
   {'requiredConfigTimestamp': 1621237797633, u'commandParams':
   {u'hooks_folder': u'stack-hooks', u'custom_command': u'RESTART', u'script': u'scripts/',
u'version': u'', u'command_timeout': u'1800', u'HAS_RESOURCE_FILTERS': u'true', u'script_type':
   , u'roleCommand': u'CUSTOM_COMMAND', u'repositoryFile': {u'resolved': True, u'repoVersion':
u'', u'repositories': [
   {u'mirrorsList': None, u'tags': [], u'ambariManaged': True, u'baseUrl': u'
', u'repoName': u'HDInsight', u'components': None, u'distribution': None, u'repoId': u'HDInsight-4.1-repo-1',
u'applicableServices': []}
   ], u'feature':
   {u'preInstalled': True, u'scoped': False}
   , u'stackName': u'HDInsight', u'repoVersionId': 1, u'repoFileName': u'ambari-hdinsight-1'},
u'clusterId': u'2', u'commandType': u'EXECUTION_COMMAND', u'clusterName': u'gshubhamhadoop40test',
u'serviceName': u'OOZIE', u'role': u'OOZIE_SERVER', u'requestId': 75454, u'taskId': 13304,
   {u'component_category': u'MASTER'}
   , u'componentVersionMap': {u'HDFS':
   {u'DATANODE': u'', u'ZKFC': u'', u'JOURNALNODE': u'', u'HDFS_CLIENT':
u'', u'NAMENODE': u''}
   , u'ZOOKEEPER':
   , u'SQOOP':
   {u'SQOOP': u''}
   , u'HIVE':
   {u'HIVE_METASTORE': u'', u'HIVE_SERVER': u'', u'HIVE_CLIENT': u''}
   , u'PIG':
   {u'PIG': u''}
   , u'TEZ':
   {u'TEZ_CLIENT': u''}
   , u'MAPREDUCE2':
   , u'YARN':
u'YARN_CLIENT': u''}
   , u'OOZIE': {u'OOZIE_CLIENT': u'', u'OOZIE_SERVER': u''}}, u'commandId':
   And currently while updating the desired state we are checking - command['custom_command']
== CustomCommand.restart
   But this is incorrect since the key is inside commandParams, so correct check should be:
command['commandParams']['custom_command'] == CustomCommand.restart
   Problems due to this:
   Currently if we stop a component and give RESTART , then on agent side DESIRED state is
still INSTALLED but current state gets to STARTED state. Now if we manually kill the process
or the process gets shutdown, it will not recover since CURRENT state == DESIRED state ==
   With this bug fix, we should be able to recover those tasks as well.
   (Please fill in changes proposed in this fix)
   ## How was this patch tested?
   (Please explain how this patch was tested. Ex: unit tests, manual tests)
   (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
   Please review [Ambari Contributing Guide](
before opening a pull request.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message