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

Agent Host Disk Usage Alert Hardcodes the Stack Directory

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      The Host Disk Usage alert currently hard codes the stack location directly
      into the script:

      1. the location where HDP installs components when using HDP 2.2+
        STACK_HOME_DIR = "/usr/hdp"
      2. the location where HDP installs components when using HDP 2.0 to 2.1
        STACK_HOME_LEGACY_DIR = "/usr/lib"
      3. determine the location of HDP home
        stack_home = None
        if os.path.isdir(STACK_HOME_DIR):
        stack_home = STACK_HOME_DIR
        elif os.path.isdir(STACK_HOME_LEGACY_DIR):
        stack_home = STACK_HOME_LEGACY_DIR

      On clusters where a different stack is installed (such as `/usr/hdf`, the
      above logic incorrectly checks the `STACK_HOME_LEGACY_DIR`.

      • The 2.0 and 2.1 code paths should be removed since they are not supported anymore.
      • We should parameterize STACK_HOME_DIR (or even better, use the stack features JSON structure) to determine the home location to check.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment