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

Add API to get file log location in the task execution output, currently hardcoded in UI

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

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.7.0
    • site
    • None

    Description

      The Task Execution Output window hardcodes the path to the log files (stdout and stderr). Because the prefix path is configured for each agent in ambari-agent.ini, it's possible for each agent to have its own independent value, and if the configuration changes, then historic logs will not be referenced correctly.
      The ask is to remove the hardcoded prefix from the UI, retrieve the log file paths by calling an API, and store the log file path for each task.

      Related item:
      Once we have the API available, it would be possible to display the logs via an HTTP server running on the agents.

      Proposal:
      The agent will advertise its prefix path when it registers, and the server will store the path for each host in-memory.
      When the server spawns a task execution on an agent, it will insert a record into the host_command_role table, which will contain 2 new fields to store the values for output_log and error_log, by retrieving the prefix path for the host that the command will run on.
      Then, the UI can simply query the API to display the log paths.

      Attachments

        Activity

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

          People

            afernandez Alejandro Fernandez
            afernandez Alejandro Fernandez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment