Retrieve scheduler logs
Currently, the scheduler writes its logs to stdout/stderr, docker container handles the redirection of these logs to a local location on the underneath node, you can read more document here. These logs can be retrieved by kubectl logs. Such as:
In most cases, this command cannot get all logs because the scheduler is rolling logs very fast. To retrieve more logs in the past, you will need to setup the cluster level logging. The recommended setup is to leverage fluentd to collect and persistent logs on an external storage, e.g s3.
Set Logging Level
Changing the logging level requires a restart of the scheduler pod.
Stop the scheduler:
edit the deployment config in vim:
LOG_LEVEL to the
env field of the container template. For example setting
0 sets the logging
Start the scheduler:
Available logging levels:
Pods are stuck at Pending state
If some pods are stuck at Pending state, that means the scheduler could not find a node to allocate the pod. There are several possibilities to cause this:
1. Non of the nodes satisfy pod placement requirement
A pod can be configured with some placement constraints, such as node-selector, affinity/anti-affinity, do not have certain toleration for node taints, etc. To debug such issues, you can describe the pod by:
the pod events will contain the predicate failures and that explains why nodes are not qualified for allocation.
2. The queue is running out of capacity
If the queue is running out of capacity, pods will be pending for available queue resources. To check if a queue is still having enough capacity for the pending pods, there are several approaches:
1) check the queue usage from yunikorn UI
If you do not know how to access the UI, you can refer the document here. Go
Queues page, navigate to the queue where this job is submitted to. You will be able to see the available capacity
left for the queue.
2) check the pod events
kubectl describe pod to get the pod events. If you see some event like:
Application <appID> does not fit into <queuePath> queue. That means the pod could not get allocated because the queue
is running out of capacity.
The pod will be allocated if some other pods in this queue is completed or removed. If the pod remains pending even the queue has capacity, that may because it is waiting for the cluster to scale up.
Restart the scheduler
YuniKorn can recover its state upon a restart. YuniKorn scheduler pod is deployed as a deployment, restart the scheduler can be done by scale down and up the replica:
Still got questions?
No problem! The Apache YuniKorn community will be happy to help. You can reach out to the community with the following options: