From dc513bc22df2f77e95b298605460755ec1f8aa4f Mon Sep 17 00:00:00 2001 From: Basasuya Date: Thu, 28 Jul 2022 20:48:41 +0800 Subject: [PATCH] [operator] enable interative bash before container start --- ray-operator/controllers/ray/common/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ray-operator/controllers/ray/common/pod.go b/ray-operator/controllers/ray/common/pod.go index 180aec0b1e3..677dc5e7f94 100644 --- a/ray-operator/controllers/ray/common/pod.go +++ b/ray-operator/controllers/ray/common/pod.go @@ -304,7 +304,7 @@ func BuildPod(podTemplateSpec v1.PodTemplateSpec, rayNodeType rayiov1alpha1.RayN if !strings.Contains(cmd, "ray start") { cont := concatenateContainerCommand(rayNodeType, rayStartParams, pod.Spec.Containers[rayContainerIndex].Resources) // replacing the old command - pod.Spec.Containers[rayContainerIndex].Command = []string{"/bin/bash", "-c", "--"} + pod.Spec.Containers[rayContainerIndex].Command = []string{"/bin/bash", "-lc", "--"} if cmd != "" { // If 'ray start' has --block specified, commands after it will not get executed. // so we need to put cmd before cont.