Member since
11-03-2016
20
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
688 | 11-07-2016 08:12 AM |
07-17-2017
03:22 AM
@andy zhou Looks like you have opened duplicate threads: https://community.hortonworks.com/questions/114193/ambari-server-cant-manager-the-servercant-stop-or-2.html#answer-114195 Can you please close one of them to avoid duplicate HCC threads. .
... View more
06-23-2017
08:01 AM
@qiancai zhou Please refer to the following piece of code to understand the logic: https://github.com/apache/ambari/blob/release-2.5.1/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py#L226-L257 def requires_recovery(self, component):
"""
Recovery is allowed for:
INISTALLED --> STARTED
INIT --> INSTALLED --> STARTED
RE-INSTALLED (if configs do not match)
"""
if not self.enabled():
return False
if not self.configured_for_recovery(component):
return False
if component not in self.statuses:
return False
status = self.statuses[component]
if self.auto_start_only or self.auto_install_start:
if status["current"] == status["desired"]:
return False
if status["desired"] not in self.allowed_desired_states:
return False
else:
if status["current"] == status["desired"] and status['stale_config'] == False:
return False
if status["desired"] not in self.allowed_desired_states or status["current"] not in self.allowed_current_states:
return False
logger.info("%s needs recovery, desired = %s, and current = %s.", component, status["desired"], status["current"])
return True
pass .
... View more
11-07-2016
08:12 AM
I slave it add the shell using ambari api in the /etc/rc.d/rc.local also can change it in the database can't use the ambari.propeties file to add the auto start (after 2.4.0) Thanks.
... View more