Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-14842

ambari agent upstart support

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.2
    • None
    • None

    Description

      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.

      Attachments

        1. AMBARI-14842.patch
          4 kB
          Andrew Onischuk
        2. AMBARI-14842.patch
          5 kB
          Andrew Onischuk

        Issue Links

          Activity

            People

              aonishuk Andrew Onischuk
              aonishuk Andrew Onischuk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: