Skip to content

Commit

Permalink
Add wget timeout to probes (ray-project#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonwang371 authored and Jeffwan committed Aug 9, 2022
1 parent 49ab391 commit 6093223
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ray-operator/controllers/ray/common/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,16 @@ func initLivenessProbeHandler(probe *v1.Probe, rayNodeType rayiov1alpha1.RayNode
if rayNodeType == rayiov1alpha1.HeadNode {
// head node liveness probe
cmd := []string{
"bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardAgentListenPort, RayAgentRayletHealthPath),
"&&", "bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"&&", "bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardPort, RayDashboardGCSHealthPath),
}
probe.Exec = &v1.ExecAction{Command: cmd}
} else {
// worker node liveness probe
cmd := []string{
"bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardAgentListenPort, RayAgentRayletHealthPath),
}
probe.Exec = &v1.ExecAction{Command: cmd}
Expand All @@ -249,16 +249,16 @@ func initReadinessProbeHandler(probe *v1.Probe, rayNodeType rayiov1alpha1.RayNod
if rayNodeType == rayiov1alpha1.HeadNode {
// head node readiness probe
cmd := []string{
"bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardAgentListenPort, RayAgentRayletHealthPath),
"&&", "bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"&&", "bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardPort, RayDashboardGCSHealthPath),
}
probe.Exec = &v1.ExecAction{Command: cmd}
} else {
// worker node readiness probe
cmd := []string{
"bash", "-c", fmt.Sprintf("wget -q -O- http://localhost:%d/%s | grep success",
"bash", "-c", fmt.Sprintf("wget -T 2 -q -O- http://localhost:%d/%s | grep success",
DefaultDashboardAgentListenPort, RayAgentRayletHealthPath),
}
probe.Exec = &v1.ExecAction{Command: cmd}
Expand Down

0 comments on commit 6093223

Please sign in to comment.