Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] fix issue around logs of che-server not written in host folder and update path of machines logs #3926

Merged
merged 2 commits into from
Jan 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dockerfiles/che/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ Variables:
DEFAULT_CHE_LOG_LEVEL=INFO
CHE_LOG_LEVEL=${CHE_LOG_LEVEL:-${DEFAULT_CHE_LOG_LEVEL}}

DEFAULT_CHE_LOGS_DIR="${CATALINA_HOME}/logs/"
export CHE_LOGS_DIR=${CHE_LOGS_DIR:-${DEFAULT_CHE_LOGS_DIR}}

DEFAULT_CHE_DEBUG_SERVER=false
CHE_DEBUG_SERVER=${CHE_DEBUG_SERVER:-${DEFAULT_CHE_DEBUG_SERVER}}

Expand Down Expand Up @@ -112,7 +115,6 @@ set_environment_variables () {
export CATALINA_BASE="${CHE_HOME}/tomcat"
export ASSEMBLY_BIN_DIR="${CATALINA_HOME}/bin"
export CHE_LOGS_LEVEL="${CHE_LOG_LEVEL}"
export CHE_LOGS_DIR="${CATALINA_HOME}/logs/"
}

docker_exec() {
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/init/modules/che/templates/che.env.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

CHE_IP=<%= scope.lookupvar('che::che_ip') %>
CHE_PORT=<%= scope.lookupvar('che::che_port') %>
CHE_LOGS_DIR=/logs
#DOCKER_HOST=<%= scope.lookupvar('che::docker_host') %>
#DOCKER_MACHINE_HOST=<%= scope.lookupvar('che::docker_ip') %>

Expand All @@ -23,7 +22,8 @@ JPDA_ADDRESS=<%= scope.lookupvar('che::che_debug_port') %>

CHE_DATABASE=/data
CHE_WORKSPACE_STORAGE=/data/workspaces
CHE_WORKSPACE_LOGS=/data/logs/machine
CHE_LOGS_DIR=/logs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is hardcoded here then it is not possible to reassign it in user's che.env. Am I correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garagatyi I've moved the definition few lines after its initial location so the LOGS_DIR are at the same place, I've not introduced a new hardcoded property.

AFAIK the definition of these values are "hardcoded" by CLI as it's inside the docker container. (for Che and Codenvy)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garagatyi you may want to be able to override these values ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just thinking about changed behavior here. But now I see that this line sets that one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garagatyi yes correct, this is the fix. Before it was hardcoded in che-server docker image. Now it is set only if not provided. And cli is providing the property so it handle it correctly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

CHE_WORKSPACE_LOGS=/logs/machines
CHE_TEMPLATE_STORAGE=/data/templates
CHE_STACKS_STORAGE=/data/stacks/stacks.json
CHE_STACKS_IMAGES=/data/stacks/images
Expand Down