https://prefect.io logo
#prefect-community
Title
# prefect-community
a

Amit

07/29/2020, 9:06 PM
Why would a flow could be stuck in Scheduled (late run), but not running, I can see prefect agent on kubernetes is able to connect to the cloud (as per the dashboard). I don't have any other flow running. I am on free plan.
j

josh

07/29/2020, 9:07 PM
Hi @Amit generally flows can be “stuck” in a Scheduled state when there’s a mismatch in the labels provided to the flow’s environment and the labels provided to the agent https://docs.prefect.io/orchestration/agents/overview.html#flow-affinity-labels
What are the labels on your flow? The Kubernetes agent does not start up with any default labels so there is a good chance you need to provide them
a

Amit

07/29/2020, 9:08 PM
There are no labels in my flow, kubernetes agent also doesn't have one.
Copy code
[2020-07-29 20:56:41,533] INFO - agent | Starting KubernetesAgent with labels []
j

josh

07/29/2020, 9:09 PM
Can you send a screenshot of your flow information on the UI similar to this:
a

Amit

07/29/2020, 9:10 PM
j

josh

07/29/2020, 9:14 PM
Thanks! That’s interesting 🤔 because it looks like it should be getting picked up. How are you starting the kubernetes agent?
a

Amit

07/29/2020, 9:15 PM
I have a helm chart for that. It was created from the instructions here: https://docs.prefect.io/orchestration/agents/kubernetes.html
j

josh

07/29/2020, 9:16 PM
Okay great, and you’re providing the agent with a RUNNER type token?
a

Amit

07/29/2020, 9:17 PM
Yes RUNNER token, It used to work. I am facing this since today actually.
Since, I am doing a lot of testing with it, like creating and deleting flows quite often, even probably during execution, I am guessing in your system/db I have a flow running, that's why this is probably blocked?
j

josh

07/29/2020, 9:19 PM
Do you think you could DM me the flow run id?
a

Amit

07/29/2020, 9:19 PM
Sure, 1 sec