Skip to content

Commit

Permalink
[Cherry-pick] Fix Log to indicate we are Using DashboardPort in RaySe…
Browse files Browse the repository at this point in the history
…rvice (#2001) (#2018)
  • Loading branch information
kevin85421 committed Mar 15, 2024
1 parent c3775bf commit 2273812
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ray-operator/controllers/ray/rayservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,15 +836,15 @@ func (r *RayServiceReconciler) updateServeDeployment(ctx context.Context, raySer
// Serve applications are ready to serve incoming traffic or not. It returns two values:
//
// (1) `isReady` is used to determine whether the Serve applications in the RayCluster are ready to serve incoming traffic or not.
// (2) `err`: If `err` is not nil, it means that KubeRay failed to get Serve application statuses from the dashboard agent. We should take a look at dashboard agent rather than Ray Serve applications.
// (2) `err`: If `err` is not nil, it means that KubeRay failed to get Serve application statuses from the dashboard. We should take a look at dashboard rather than Ray Serve applications.

func (r *RayServiceReconciler) getAndCheckServeStatus(ctx context.Context, dashboardClient utils.RayDashboardClientInterface, rayServiceServeStatus *rayv1.RayServiceStatus) (bool, error) {
logger := ctrl.LoggerFrom(ctx)
var serveAppStatuses map[string]*utils.ServeApplicationStatus
var err error
if serveAppStatuses, err = dashboardClient.GetMultiApplicationStatus(ctx); err != nil {
err = fmt.Errorf(
"Failed to get Serve application statuses from the dashboard agent (the head service's port with the name `dashboard-agent`). "+
"Failed to get Serve application statuses from the dashboard. "+
"If you observe this error consistently, please check https://github.com/ray-project/kuberay/blob/master/docs/guidance/rayservice-troubleshooting.md for more details. "+
"err: %v", err)
return false, err
Expand Down
11 changes: 5 additions & 6 deletions ray-operator/controllers/ray/utils/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,11 @@ const (
DefaultDashboardAgentListenPort = 52365
DefaultServingPort = 8000

ClientPortName = "client"
RedisPortName = "redis"
DashboardPortName = "dashboard"
MetricsPortName = "metrics"
DashboardAgentListenPortName = "dashboard-agent"
ServingPortName = "serve"
ClientPortName = "client"
RedisPortName = "redis"
DashboardPortName = "dashboard"
MetricsPortName = "metrics"
ServingPortName = "serve"

// The default AppProtocol for Kubernetes service
DefaultServiceAppProtocol = "tcp"
Expand Down

0 comments on commit 2273812

Please sign in to comment.