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

Use ">>" instead of ">" to write ambari-metrics-monitor.out

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0
    • ambari-metrics

    Description

      If we want to rotate ambari-metrics-monitor.out by logrotate (using copytruncate option), we need to use ">>" instead of ">" not to keep the file offset to write. If the offset is kept, null characters are padded in the new file.

      ambari-metrics-monitor
          nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" > ${OUTFILE} 2>&1 &
      

      should be

          nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" >> ${OUTFILE} 2>&1 &
      

      Attachments

        1. AMBARI-15588.01.patch
          0.6 kB
          Akira Ajisaka

        Issue Links

          Activity

            People

              aajisaka Akira Ajisaka
              aajisaka Akira Ajisaka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: