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

Empty package folders on ambari-server causes corresponding component restart to fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • ambari-server
    • None

    Description

      When the agent executes a command say status/start/stop command, ambari-server provides the service_package_folder to use as a parameter

      Repro Steps:
      1. mkdir /var/lib/ambari-server/resouces/stacks/HDP/2.2/services/HDFS/package
      2. ambari-server restart
      3. Notice HDFS components report Heartbeat Lost and Restart HDFS fail.
      4. This is because the sservice_package_folder is set to the empty folder.
      ERROR 2015-08-28 20:35:59,383 CustomServiceOrchestrator.py:218 - Caught an exception while executing custom service command: <class 'ambari_agent.AgentException.AgentException'>: 'Script /var/lib/ambari-agent/cache/stacks/HDP/2.2/services/HDFS/package/scripts/namenode.py does not exist'; 'Script /var/lib/ambari-agent/cache/stacks/HDP/2.2/services/HDFS/package/scripts/namenode.py does not exist'
      Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 151, in runCommand
      script_path = self.resolve_script_path(base_dir, script)
      File "/usr/lib/python2.6/site-packages/ambari_agent/CustomServiceOrchestrator.py", line 288, in resolve_script_path
      raise AgentException(message)

      So even if we disable the stack from replicating an empty folder, the ambari-server would still pass the path as empty folder.

      We should also look at ignoring empty package folders while building the Stack Inheritance in Ambari Server

      Refer code in: ambari/ambari-server/src/main/java/org/apache/ambari/server/stack

      Attachments

        Activity

          People

            smnaha Nahappan Somasundaram
            smnaha Nahappan Somasundaram
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: