-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Provide machine logs volume and configuration of logs root path #8535
Conversation
ci-build |
ci-test-ocp |
will we have ws logs on docker? |
@riuvshin maybe, but not in the scope of this pr |
@akorneta sure, but we need ws logs on docker same as on openshift, so that should be considered I think in order to close ws logs issue |
@dmytro-ndp no(see comment above), I'll not close that issue, just will comment that for OS infra it works. |
@akorneta: I see, thank you. |
dockerfiles/init/manifests/che.env
Outdated
# Defines the directory inside the machine where all the workspace logs are placed. | ||
# The value of this folder should be provided into machine e.g. like environment variable | ||
# so agents developers can use this directory for backup agents logs. | ||
#CHE_WORKSPACE_LOGS_ROOT_DIR=/workspace_logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe default value should be set right here in che.env
instead of defining in each agent installer script?
This way it will be more obvious to end user where are logs stored by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default value from che.properties
will be used, and it equals to /workspace_logs
(we won't define it in each script). This value is commented to be the same as all properties in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thx
ci-test build report: |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/4441/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Only one question: Did you consider configuring log dir for the terminal agent?
public class LogsRootEnvVariableProvider implements EnvVarProvider { | ||
|
||
/** Environment variable that points to root folder of projects inside machine */ | ||
public static final String WORKSPACE_LOGS_ROOT_VARIABLE = "CHE_WORKSPACE_LOGS_ROOT_DIR"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd used ENV_VAR
instead of VARIABLE
@sleshchenko |
74cbcbe
to
87792d3
Compare
#Defines the directory inside the machine where all the workspace logs are placed. | ||
#The value of this folder should be provided into machine e.g. like environment variable | ||
#so agents developers can use this directory for backup agents logs. | ||
che.workspace.logs.root.dir=/workspace_logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider usage of underscore between root
and dir
words
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nice job!
eb179d3
to
fdb0dcc
Compare
👍 thanks @akorneta |
I have updated redhat-developer/rh-che#448 |
What does this PR do?
Adds configuration of workspace logs root directory;
Provides environment variable for each OpenShift machine that contains value of logs root directory;
Adds logs volume into all OpenShift machines and make distinct subpaths for logs with machine name.
Modifies installation scripts of ws-agent and exec-agent with a logic that defines the logs folder for this agents and redirects bootstrapper logs to workspace logs root.
file structure on host for different strategies:
One PV will be used for storing logs of machines that are placed in the same pod.
unique:
One PV will be used for storing logs and projects data of workspace with two machines.
common:
What issues does this PR fix or reference?
#7807
partially solves this issue(for OpenShift only): #7386
Docs PR
n/a