Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RayService][Observability] Add more loggings about networking issues #1282

Merged

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Aug 1, 2023

Why are these changes needed?

Note that NetworkPolicy will not have any effect if you do not have CNI plugin installed in your Kubernetes cluster. Hence, I developed this PR on AWS EKS and installed the CNI plugin Calico.

  • Step 1: Follow this doc to install Calico in your EKS cluster.

  • Step 2: Create a NetworkPolicy to block all incoming traffic to the Ray head Pod.

     apiVersion: networking.k8s.io/v1
     kind: NetworkPolicy
     metadata:
       name: block-head-pod
     spec:
       podSelector:
         matchLabels:
           ray.io/node-type: head
       ingress: []
  • Step 3: Install KubeRay operator with this PR.

    helm install kuberay-operator kuberay/kuberay-operator --version 0.6.1 --set image.repository=$YOUR_DOCKERHUB_REPO,image.tag=$YOUR_DOCKERHUB_TAG
  • Step 4: Create a RayService with 1 head Pod and 0 worker Pods. Since incoming traffic is not allowed to reach the Ray head Pod, the init container in the worker Pods will indefinitely wait for GCS to become ready. For this reason, we opt to create 0 worker Pods here.

  • Step 5: Check KubeRay operator's log

    kubectl logs $KUBERAY_OPERATOR_POD
    
    # [Example log]
    # 2023-08-01T00:37:37.818Z	ERROR	controllers.RayService	Fail to reconcileServe.	{"ServiceName": "default/rayservice-sample", "error": "Fail to create / update Serve applications. If you observe this error consistently, please check \"Issue 5: Fail to create / update Serve applications.\" in https://github.com/ray-project/kuberay/blob/master/docs/guidance/rayservice-troubleshooting.md for more details.err: Put \"http://rayservice-sample-raycluster-8rshn-head-svc.default.svc.cluster.local:52365/api/serve/applications/\": dial tcp 10.100.192.179:52365: i/o timeout"}
    # sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
    #	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:114
    # sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    #	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:311
    # sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    #	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:266
    # sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
    #	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.1/pkg/internal/controller/controller.go:227

Related issue number

Closes #1279

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@kevin85421 kevin85421 marked this pull request as ready for review August 1, 2023 01:03
@kevin85421 kevin85421 merged commit 45d3a4f into ray-project:master Aug 1, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RayService][Observability] Add more loggings about networking issues
3 participants