[ https://issues.apache.org/jira/browse/AMBARI-14842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Onischuk updated AMBARI-14842: ------------------------------------- Attachment: AMBARI-14842.patch > ambari agent upstart support > ---------------------------- > > Key: AMBARI-14842 > URL: https://issues.apache.org/jira/browse/AMBARI-14842 > Project: Ambari > Issue Type: Bug > Reporter: Andrew Onischuk > Assignee: Andrew Onischuk > Fix For: 2.2.2 > > Attachments: AMBARI-14842.patch, AMBARI-14842.patch > > > Context: > It is critical that we have a service that can auto-restart during crashes and > reboots. This is done via upstart on Ubuntu. > The issue is that Ambari-Agent scripts in the current state is not upstart- > able due to some implementation issues. > So to make this upstart-able, we had to directly take a dependency into a > helper script for Ambari-Agent (as per user1 recommendation). However, this > dependency turned out to be fragile, since it broke in HDP 2.4. So this JIRA > is about making ambari agent upstartable directly when we install Ambari, so > users doesn’t have to resort to a fragile dependency. We made it work > Details: > The way to start ambari-agent and ambari-server are different for user1 and > user2. > In the case for ambari-agent: > user1 calls "/etc/init.d/ambari-agent" (which invokes /usr/sbin/ambari-agent) > to start ambari agent. > user2 uses "/etc/init/ambari-agent" (which directly calls /usr/lib/python2.6 > /site-packages/ambari_agent/main.py) to start ambari-agent. > user2 has to call ambari-agent/main.py directly is because we need upstart to > re-start services when it crashes unexpectedly and upstart does not work if we > configure it to call /usr/sbin/ambari-agent. > The reason is that upstart needs to track the process for the service (i.e. > ambari-agent) that it needs to restart; however, /usr/sbin/ambari-agent > executes lots of commands that would result in new processes being spawned and > will confuse upstart the "main" process it should be tracking. > We need user1 to give us a upstart-compatible script otherwise HDP changes can > break us unexpectedly. > We also have a upstart script for ambari-server for the same reason. > Attaching both scripts for user1 to take a look. -- This message was sent by Atlassian JIRA (v6.3.4#6332)