[ https://issues.apache.org/jira/browse/FLINK-23057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
LIU Xiao updated FLINK-23057: ----------------------------- Description: In flink-deamon.sh: {code:java} ... # Evaluate user options for local variable expansion FLINK_ENV_JAVA_OPTS=$(eval echo ${FLINK_ENV_JAVA_OPTS}) echo "Starting $DAEMON daemon on host $HOSTNAME." "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}" > "$out" 200<&- 2>&1 < /dev/null & ... {code} There is a "$(eval echo ...)" line, so variables like ${FLINK_LOG_PREFIX} in FLINK_ENV_JAVA_OPTS can be expanded, as described in [https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/ops/debugging/application_profiling/] but flink-console.sh doesn't have the line, and as kubernetes-jobmanager.sh and kubernetes-taskmanager.sh all depend on flink-console.sh, so in native kubernetes application mode, variable expansion of FLINK_ENV_JAVA_OPTS is not working. Add that line to flink-console.sh sovles the problem, patch: [https://github.com/Zor-X-L/flink/commit/e09ba4400b4183e2486c3ef73b986473b7dbea9a] was: In flink-deamon.sh: {code:java} ... # Evaluate user options for local variable expansion FLINK_ENV_JAVA_OPTS=$(eval echo ${FLINK_ENV_JAVA_OPTS}) echo "Starting $DAEMON daemon on host $HOSTNAME." "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}" > "$out" 200<&- 2>&1 < /dev/null & ... {code} There is a "$(eval echo ...)" line, so variables like ${FLINK_LOG_PREFIX} in FLINK_ENV_JAVA_OPTS can be expanded, as described in [https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/ops/debugging/application_profiling/] but flink-console.sh doesn't have the line, and as kubernetes-jobmanager.sh and kubernetes-taskmanager.sh all depend on flink-console.sh, so in native kubernetes application mode, variable expansion of FLINK_ENV_JAVA_OPTS is not working. Add that line to flink-console.sh sovles the problem. > flink-console.sh doesn't do variable expansion for FLINK_ENV_JAVA_OPTS like > flink-daemon.sh > ------------------------------------------------------------------------------------------- > > Key: FLINK-23057 > URL: https://issues.apache.org/jira/browse/FLINK-23057 > Project: Flink > Issue Type: Bug > Components: Client / Job Submission > Affects Versions: 1.13.1, 1.12.4 > Reporter: LIU Xiao > Priority: Major > > In flink-deamon.sh: > > {code:java} > ... > # Evaluate user options for local variable expansion > FLINK_ENV_JAVA_OPTS=$(eval echo ${FLINK_ENV_JAVA_OPTS}) > echo "Starting $DAEMON daemon on host $HOSTNAME." > "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath > "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" > ${CLASS_TO_RUN} "${ARGS[@]}" > "$out" 200<&- 2>&1 < /dev/null & > ... > {code} > There is a "$(eval echo ...)" line, so variables like ${FLINK_LOG_PREFIX} in > FLINK_ENV_JAVA_OPTS can be expanded, as described in > [https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/ops/debugging/application_profiling/] > but flink-console.sh doesn't have the line, and as kubernetes-jobmanager.sh > and kubernetes-taskmanager.sh all depend on flink-console.sh, so in native > kubernetes application mode, variable expansion of FLINK_ENV_JAVA_OPTS is not > working. > Add that line to flink-console.sh sovles the problem, patch: > [https://github.com/Zor-X-L/flink/commit/e09ba4400b4183e2486c3ef73b986473b7dbea9a] > -- This message was sent by Atlassian Jira (v8.3.4#803005)