diff --git a/ray-operator/controllers/ray/common/constant.go b/ray-operator/controllers/ray/common/constant.go index 7b7a2de40a4..7efe3472afb 100644 --- a/ray-operator/controllers/ray/common/constant.go +++ b/ray-operator/controllers/ray/common/constant.go @@ -70,6 +70,8 @@ const ( REDIS_PASSWORD = "REDIS_PASSWORD" RAY_EXTERNAL_STORAGE_NS = "RAY_external_storage_namespace" RAY_TIMEOUT_MS_TASK_WAIT_FOR_DEATH_INFO = "RAY_timeout_ms_task_wait_for_death_info" + RAY_GCS_SERVER_REQUEST_TIMEOUT_SECONDS = "RAY_gcs_server_request_timeout_seconds" + RAY_SERVE_KV_TIMEOUT_S = "RAY_SERVE_KV_TIMEOUT_S" // Ray core default configurations DefaultRedisPassword = "5241590000000000" diff --git a/ray-operator/controllers/ray/common/pod.go b/ray-operator/controllers/ray/common/pod.go index 66503b2d68b..b9357be389e 100644 --- a/ray-operator/controllers/ray/common/pod.go +++ b/ray-operator/controllers/ray/common/pod.go @@ -564,6 +564,14 @@ func setContainerEnvVars(pod *v1.Pod, rayContainerIndex int, rayNodeType rayiov1 deathEnv := v1.EnvVar{Name: RAY_TIMEOUT_MS_TASK_WAIT_FOR_DEATH_INFO, Value: "0"} container.Env = append(container.Env, deathEnv) } + if !envVarExists(RAY_GCS_SERVER_REQUEST_TIMEOUT_SECONDS, container.Env) { + gcsTimeoutEnv := v1.EnvVar{Name: RAY_GCS_SERVER_REQUEST_TIMEOUT_SECONDS, Value: "5"} + container.Env = append(container.Env, gcsTimeoutEnv) + } + if !envVarExists(RAY_SERVE_KV_TIMEOUT_S, container.Env) { + serveKvTimeoutEnv := v1.EnvVar{Name: RAY_SERVE_KV_TIMEOUT_S, Value: "5"} + container.Env = append(container.Env, serveKvTimeoutEnv) + } } // Setting the RAY_ADDRESS env allows connecting to Ray using ray.init() when connecting // from within the cluster.