Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5504

mesos-appmaster.sh logs to wrong directory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.2.0, 1.3.0
    • Component/s: Mesos
    • Labels:
      None

      Description

      The mesos-appmaster.sh script does not create the log file under FLINK_HOME/log and does not follow the naming convention. I think we should correct the behaviour.

        Issue Links

          Activity

          Hide
          till.rohrmann Till Rohrmann added a comment -

          1.3.0: Fixed via 43eee9002d7eb02297b47faba069f7cf39e8a5db
          1.2.0: Fixed via 1d6b8bbcef0130e1dd74a7f21af34a25c2327270

          Show
          till.rohrmann Till Rohrmann added a comment - 1.3.0: Fixed via 43eee9002d7eb02297b47faba069f7cf39e8a5db 1.2.0: Fixed via 1d6b8bbcef0130e1dd74a7f21af34a25c2327270
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann closed the pull request at:

          https://github.com/apache/flink/pull/3160

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann closed the pull request at: https://github.com/apache/flink/pull/3160
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on the issue:

          https://github.com/apache/flink/pull/3160

          Merged with the `release-1.2` branch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/3160 Merged with the `release-1.2` branch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3159

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3159
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on the issue:

          https://github.com/apache/flink/pull/3160

          Thanks for the review @rmetzger. Merging this PR.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/3160 Thanks for the review @rmetzger. Merging this PR.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on the issue:

          https://github.com/apache/flink/pull/3159

          Thanks for the review @uce. Merging this PR and #3160.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/3159 Thanks for the review @uce. Merging this PR and #3160.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3159#discussion_r97308341

          — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh —
          @@ -38,9 +38,14 @@ constructAppMasterClassPath()

          { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS }

          +if [ "$FLINK_IDENT_STRING" = "" ]; then
          + FLINK_IDENT_STRING="$USER"
          +fi
          +
          +
          CC_CLASSPATH=`manglePathList $(constructAppMasterClassPath)`

          -log=flink-appmaster.log
          +log="$

          {FLINK_LOG_DIR}

          /flink-$

          {FLINK_IDENT_STRING}

          mesos-appmaster$

          {HOSTNAME}

          .log"
          — End diff –

          Thanks for clarifying this. I think in the future it could make sense to unify the different deployment scripts and fix these issues.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/3159#discussion_r97308341 — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh — @@ -38,9 +38,14 @@ constructAppMasterClassPath() { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS } +if [ "$FLINK_IDENT_STRING" = "" ]; then + FLINK_IDENT_STRING="$USER" +fi + + CC_CLASSPATH=`manglePathList $(constructAppMasterClassPath)` -log=flink-appmaster.log +log="$ {FLINK_LOG_DIR} /flink-$ {FLINK_IDENT_STRING} mesos-appmaster $ {HOSTNAME} .log" — End diff – Thanks for clarifying this. I think in the future it could make sense to unify the different deployment scripts and fix these issues.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3159#discussion_r97308273

          — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh —
          @@ -38,9 +38,14 @@ constructAppMasterClassPath()

          { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS }

          +if [ "$FLINK_IDENT_STRING" = "" ]; then
          + FLINK_IDENT_STRING="$USER"
          +fi
          +
          +
          — End diff –

          Good catch. Will correct it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/3159#discussion_r97308273 — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh — @@ -38,9 +38,14 @@ constructAppMasterClassPath() { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS } +if [ "$FLINK_IDENT_STRING" = "" ]; then + FLINK_IDENT_STRING="$USER" +fi + + — End diff – Good catch. Will correct it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3160

          +1 to merge

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3160 +1 to merge
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uce commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3159#discussion_r97282251

          — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh —
          @@ -38,9 +38,14 @@ constructAppMasterClassPath()

          { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS }

          +if [ "$FLINK_IDENT_STRING" = "" ]; then
          + FLINK_IDENT_STRING="$USER"
          +fi
          +
          +
          — End diff –

          Empty line

          Show
          githubbot ASF GitHub Bot added a comment - Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3159#discussion_r97282251 — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh — @@ -38,9 +38,14 @@ constructAppMasterClassPath() { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS } +if [ "$FLINK_IDENT_STRING" = "" ]; then + FLINK_IDENT_STRING="$USER" +fi + + — End diff – Empty line
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uce commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3159#discussion_r97283093

          — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh —
          @@ -38,9 +38,14 @@ constructAppMasterClassPath()

          { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS }

          +if [ "$FLINK_IDENT_STRING" = "" ]; then
          + FLINK_IDENT_STRING="$USER"
          +fi
          +
          +
          CC_CLASSPATH=`manglePathList $(constructAppMasterClassPath)`

          -log=flink-appmaster.log
          +log="$

          {FLINK_LOG_DIR}

          /flink-$

          {FLINK_IDENT_STRING}

          mesos-appmaster$

          {HOSTNAME}

          .log"
          — End diff –

          Looks good. This is inline with the other scripts we have.

          As a small note: If for some weird reason the `FLINK_LOG_DIR` is not correctly set, this will try to create the log file in root instead of the current working directory or something else. Having said that, not relevant for this PR as it's the same for all scripts.

          Show
          githubbot ASF GitHub Bot added a comment - Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3159#discussion_r97283093 — Diff: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh — @@ -38,9 +38,14 @@ constructAppMasterClassPath() { echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS } +if [ "$FLINK_IDENT_STRING" = "" ]; then + FLINK_IDENT_STRING="$USER" +fi + + CC_CLASSPATH=`manglePathList $(constructAppMasterClassPath)` -log=flink-appmaster.log +log="$ {FLINK_LOG_DIR} /flink-$ {FLINK_IDENT_STRING} mesos-appmaster $ {HOSTNAME} .log" — End diff – Looks good. This is inline with the other scripts we have. — As a small note: If for some weird reason the `FLINK_LOG_DIR` is not correctly set, this will try to create the log file in root instead of the current working directory or something else. Having said that, not relevant for this PR as it's the same for all scripts.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tillrohrmann opened a pull request:

          https://github.com/apache/flink/pull/3160

          [backport] FLINK-5504 Create mesos-appmaster log file in log directory

          Backport of #3159 onto the `release-1.2` branch.

          This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging
          directory to the logging file name.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/tillrohrmann/flink mesosBackportFixLoggingDir

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3160.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3160


          commit 492f1855b4425e04a80c8cbb43339c2a6e308b23
          Author: Till Rohrmann <trohrmann@apache.org>
          Date: 2017-01-18T15:53:42Z

          FLINK-5504 Create mesos-appmaster log file in log directory

          This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging
          directory to the logging file name.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tillrohrmann opened a pull request: https://github.com/apache/flink/pull/3160 [backport] FLINK-5504 Create mesos-appmaster log file in log directory Backport of #3159 onto the `release-1.2` branch. This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging directory to the logging file name. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tillrohrmann/flink mesosBackportFixLoggingDir Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3160.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3160 commit 492f1855b4425e04a80c8cbb43339c2a6e308b23 Author: Till Rohrmann <trohrmann@apache.org> Date: 2017-01-18T15:53:42Z FLINK-5504 Create mesos-appmaster log file in log directory This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging directory to the logging file name.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tillrohrmann opened a pull request:

          https://github.com/apache/flink/pull/3159

          FLINK-5504 Create mesos-appmaster log file in log directory

          This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging
          directory to the logging file name.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/tillrohrmann/flink mesosFixLoggingDir

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3159.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3159


          commit 19143548ab2a3a856d19436d6d3abed7d6700229
          Author: Till Rohrmann <trohrmann@apache.org>
          Date: 2017-01-18T15:53:42Z

          FLINK-5504 Create mesos-appmaster log file in log directory

          This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging
          directory to the logging file name.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tillrohrmann opened a pull request: https://github.com/apache/flink/pull/3159 FLINK-5504 Create mesos-appmaster log file in log directory This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging directory to the logging file name. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tillrohrmann/flink mesosFixLoggingDir Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3159.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3159 commit 19143548ab2a3a856d19436d6d3abed7d6700229 Author: Till Rohrmann <trohrmann@apache.org> Date: 2017-01-18T15:53:42Z FLINK-5504 Create mesos-appmaster log file in log directory This PR prepends the FLINK_LOG_DIR env variable pointing to Flink's logging directory to the logging file name.

            People

            • Assignee:
              till.rohrmann Till Rohrmann
              Reporter:
              till.rohrmann Till Rohrmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development