You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by ji...@apache.org on 2021/01/07 03:13:08 UTC

[submarine] branch master updated: SUBMARINE-704. Fix empty server logs in pod

This is an automated email from the ASF dual-hosted git repository.

jiwq pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a18748  SUBMARINE-704. Fix empty server logs in pod
8a18748 is described below

commit 8a18748ecebdf4541db2511061be718f751d57c5
Author: Byron <by...@gmail.com>
AuthorDate: Mon Jan 4 21:29:12 2021 +0800

    SUBMARINE-704. Fix empty server logs in pod
    
    ### What is this PR for?
    The logs of server pod are empty because they were not directed properly. I use to tee command to direct them to stdout to make the logs can be accessed by kubectl logs.
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-704
    
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    ![Kapture 2021-01-04 at 21 16 38](https://user-images.githubusercontent.com/24364830/103539141-7d774800-4ed2-11eb-8689-5159e3fc0690.gif)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Byron <by...@gmail.com>
    
    Closes #486 from ByronHsu/SUBMARINE-704 and squashes the following commits:
    
    3373ade [Byron] switch to append mode in tee
    049b782 [Byron] use tee command to direct output to stdout
---
 bin/submarine.sh                                      | 2 +-
 helm-charts/submarine/templates/submarine-server.yaml | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/bin/submarine.sh b/bin/submarine.sh
index 8a5d6e8..e8c109b 100755
--- a/bin/submarine.sh
+++ b/bin/submarine.sh
@@ -55,4 +55,4 @@ if [[ ! -d "${SUBMARINE_LOG_DIR}" ]]; then
   $(mkdir -p "${SUBMARINE_LOG_DIR}")
 fi
 
-exec $JAVA_RUNNER $JAVA_OPTS -cp ${SUBMARINE_SERVER_CLASSPATH} ${SUBMARINE_SERVER_MAIN} "$@" >> "${SUBMARINE_SERVER_LOGFILE}" 2>&1
+exec $JAVA_RUNNER $JAVA_OPTS -cp ${SUBMARINE_SERVER_CLASSPATH} ${SUBMARINE_SERVER_MAIN} "$@" | tee -a "${SUBMARINE_SERVER_LOGFILE}" 2>&1
diff --git a/helm-charts/submarine/templates/submarine-server.yaml b/helm-charts/submarine/templates/submarine-server.yaml
index c6f4ec4..b27f62f 100644
--- a/helm-charts/submarine/templates/submarine-server.yaml
+++ b/helm-charts/submarine/templates/submarine-server.yaml
@@ -66,8 +66,6 @@ spec:
 
         image: "{{ .Values.submarine.server.image }}"
         imagePullPolicy: {{ .Values.submarine.server.imagePullPolicy }}
-        command: ["/bin/bash", "-c"]
-        args: ["/opt/submarine-current/bin/submarine.sh start getMysqlJar"]
         ports:
         - containerPort: 8080
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org