Skip to content

Commit 583740c

Browse files
committed
clean up
1 parent 3f059e7 commit 583740c

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

ray-operator/config/samples/ray-service.sample.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ spec:
7474
spec:
7575
containers:
7676
- name: ray-head
77-
image: rayproject/ray:2.9.0-aarch64
77+
image: rayproject/ray:2.9.0
7878
resources:
7979
limits:
8080
cpu: 2
@@ -107,7 +107,7 @@ spec:
107107
spec:
108108
containers:
109109
- name: ray-worker # must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'
110-
image: rayproject/ray:2.9.0-aarch64
110+
image: rayproject/ray:2.9.0
111111
lifecycle:
112112
preStop:
113113
exec:

ray-operator/controllers/ray/raycluster_controller.go

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,9 +1204,11 @@ func (r *RayClusterReconciler) calculateStatus(ctx context.Context, instance *ra
12041204
}
12051205

12061206
// Check if the head node is running and ready by checking the head pod's status.
1207-
headPod, _ := r.getHeadPod(ctx, newInstance)
1208-
12091207
if features.Enabled(features.RayClusterStatusConditions) {
1208+
headPod, err := common.GetRayClusterHeadPod(ctx, r, newInstance)
1209+
if err != nil {
1210+
return nil, err
1211+
}
12101212
replicaHeadPodReadyCondition := utils.FindPodReadyCondition(headPod, rayv1.HeadPodReady)
12111213
meta.SetStatusCondition(&newInstance.Status.Conditions, replicaHeadPodReadyCondition)
12121214
}
@@ -1485,17 +1487,3 @@ func sumGPUs(resources map[corev1.ResourceName]resource.Quantity) resource.Quant
14851487

14861488
return totalGPUs
14871489
}
1488-
1489-
// TODO this should be replace by other implementation
1490-
func (r *RayClusterReconciler) getHeadPod(ctx context.Context, instance *rayv1.RayCluster) (*corev1.Pod, error) {
1491-
podList := corev1.PodList{}
1492-
if err := r.List(ctx, &podList, common.RayClusterHeadPodsAssociationOptions(instance).ToListOptions()...); err != nil {
1493-
return nil, err
1494-
}
1495-
1496-
if len(podList.Items) != 1 {
1497-
return nil, fmt.Errorf("Found %d head pods for RayCluster %s in the namespace %s", len(podList.Items), instance.Name, instance.Namespace)
1498-
}
1499-
1500-
return &podList.Items[0], nil
1501-
}

0 commit comments

Comments
 (0)