Skip to content

Commit

Permalink
Expose kernel_info_timeout configuration (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
lresende authored Feb 20, 2024
1 parent ef2f2c6 commit 90961ab
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/source/operators/config-add-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Besides those environment variables associated with configurable options, the fo
startup attempt will take place. If a second timeout occurs, Enterprise
Gateway will report a failure to the client.
EG_KERNEL_INFO_TIMEOUT=60
The time (in seconds) Enterprise Gateway will wait for kernel info response
before deeming the request a failure.
EG_SENSITIVE_ENV_KEYS=""
A comma separated list (e.g. "secret,pwd,auth") of sensitive environment
variables. Any environment variables that contain any of the words from this
Expand Down
1 change: 1 addition & 0 deletions etc/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
environment:
- "EG_DOCKER_NETWORK=${EG_DOCKER_NETWORK:-enterprise-gateway_enterprise-gateway}"
- "EG_KERNEL_LAUNCH_TIMEOUT=${EG_KERNEL_LAUNCH_TIMEOUT:-60}"
- "EG_KERNEL_INFO_TIMEOUT=${EG_KERNEL_INFO_TIMEOUT:-60}"
- "EG_CULL_IDLE_TIMEOUT=${EG_CULL_IDLE_TIMEOUT:-3600}"
# Use double-defaulting for B/C. Support for EG_KERNEL_WHITELIST will be removed in a future release
- "EG_ALLOWED_KERNELS=${EG_ALLOWED_KERNELS:-${EG_KERNEL_WHITELIST:-'r_docker','python_docker','python_tf_docker','python_tf_gpu_docker','scala_docker'}}"
Expand Down
4 changes: 3 additions & 1 deletion etc/docker/enterprise-gateway/start-enterprise-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export EG_CULL_CONNECTED=${EG_CULL_CONNECTED:-False}
EG_ALLOWED_KERNELS=${EG_ALLOWED_KERNELS:-${EG_KERNEL_WHITELIST:-"null"}}
export EG_ALLOWED_KERNELS=`echo ${EG_ALLOWED_KERNELS} | sed 's/[][]//g'` # sed is used to strip off surrounding brackets as they should no longer be included.
export EG_DEFAULT_KERNEL_NAME=${EG_DEFAULT_KERNEL_NAME:-python_docker}
export EG_KERNEL_INFO_TIMEOUT=${EG_KERNEL_INFO_TIMEOUT:-60}

# Determine whether the kernels-allowed list should be added to the start command.
# This is conveyed via a 'null' value for the env - which indicates no kernel names
Expand All @@ -46,4 +47,5 @@ exec jupyter enterprisegateway \
--RemoteMappingKernelManager.cull_idle_timeout=${EG_CULL_IDLE_TIMEOUT} \
--RemoteMappingKernelManager.cull_interval=${EG_CULL_INTERVAL} \
--RemoteMappingKernelManager.cull_connected=${EG_CULL_CONNECTED} \
--RemoteMappingKernelManager.default_kernel_name=${EG_DEFAULT_KERNEL_NAME}
--RemoteMappingKernelManager.default_kernel_name=${EG_DEFAULT_KERNEL_NAME} \
--RemoteMappingKernelManager.kernel_info_timeout=${EG_KERNEL_INFO_TIMEOUT}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ spec:
value: {{ .Values.logLevel }}
- name: EG_KERNEL_LAUNCH_TIMEOUT
value: !!str {{ .Values.kernel.launchTimeout }}
- name: EG_KERNEL_INFO_TIMEOUT
value: !!str {{ .Values.kernel.infoTimeout }}
- name: EG_ALLOWED_KERNELS
value: {{ toJson .Values.kernel.allowedKernels | squote }}
- name: EG_DEFAULT_KERNEL_NAME
Expand Down

0 comments on commit 90961ab

Please sign in to comment.