question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with getting API-dask-Gateway Pod to start

See original GitHub issue

I’m trying to create a dask cluster on existing Kubernetes using dask gateway I used the default values.yaml as a baseline and added the following code to extraConfig:

extraConfig: |
from dask_gateway_server.options import Options, Integer, Float, String

       def option_handler(options):
           return {
              "worker_cores": options.worker_cores,
              "worker_memory": "%fG" % options.worker_memory,
              "image": options.image,
       }

        c.Backend.cluster_options = Options(
            Integer("worker_cores", 2, min=1, max=4, label="Worker Cores"),
            Float("worker_memory", 4, min=1, max=8, label="Worker Memory (GiB)"),
            String("image", default="daskgateway/dask-gateway:latest", label="Image"),
            handler=option_handler,
       )

I performed helm installation based on this updated values.yaml file and everything runs except the API-Dask-Gateway pod. Without this extraConfig it runs fine, but I don’t get options for clusters. Please help. Thanks, Vinh

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jun 19, 2020

wow you guys are amazing. Thanks you so much for helping me correct the problem with a quick turn around, I will remember to keep note of the white spaces.

0reactions
droctothorpecommented, Jun 19, 2020

Ha was about to follow up about that. Thanks, Jim.

Your code @vinhdiesal:

extraConfig: |
from dask_gateway_server.options import Options, Integer, Float, String

       def option_handler(options):
           return {
              "worker_cores": options.worker_cores,
              "worker_memory": "%fG" % options.worker_memory,
              "image": options.image,
       }

        c.Backend.cluster_options = Options(
            Integer("worker_cores", 2, min=1, max=4, label="Worker Cores"),
            Float("worker_memory", 4, min=1, max=8, label="Worker Memory (GiB)"),
            String("image", default="daskgateway/dask-gateway:latest", label="Image"),
            handler=option_handler,
       )

Example code:

extraConfig: |
from dask_gateway_server.options import Options, Integer, Float, String

def option_handler(options):
    return {
        "worker_cores": options.worker_cores,
        "worker_memory": "%fG" % options.worker_memory,
        "image": options.image,
    }

c.Backend.cluster_options = Options(
    Integer("worker_cores", 2, min=1, max=4, label="Worker Cores"),
    Float("worker_memory", 4, min=1, max=8, label="Worker Memory (GiB)"),
    String("image", default="daskgateway/dask-gateway:latest", label="Image"),
    handler=option_handler,
)

Python is very particular about whitespace.

This will probably fix it – but you should probably look into why you can’t access pod logs at some point either way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Debug Kubernetes Pending Pods and Scheduling ...
Learn how to debug Pending pods that fail to get scheduled due to resource constraints, taints, affinity rules, and other reasons.
Read more >
Kubernetes troubleshooting: 6 ways to find and fix issues
If you run kubectl get pods and see that some pods are being restarted, the next thing to do is to check why....
Read more >
Understanding Kubernetes pod pending problems - Sysdig
When a pod is created, it starts in the Pending phase. Once the pod is scheduled and the containers have started, the pod...
Read more >
kubernetes executor: timedout waiting for pod to start, does ...
Expected behavior. If build pod fails to schedule, the pod should get deleted. ... Use tasks to break down this issue into smaller...
Read more >
Troubleshoot pod issues - Bitnami Documentation
If available resources are insufficient, try the following steps: Option 1: Add more nodes to the cluster.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found