YuniKorn Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 23: Line 23:
There are submission permission and administrative permissions. Submission permission relate to the capability to submit a certain application to a certain queue by specific users or groups. Administrative permissions include submission permission plus stopping an application and moving the application to a different queue. Access control lists are checked recursively up to the root of the tree starting at the lowest point in the tree. In other words when the access control list of a queue does not allow access the parent queue is checked. The checks are repeated all the way up to the root of the queues.
There are submission permission and administrative permissions. Submission permission relate to the capability to submit a certain application to a certain queue by specific users or groups. Administrative permissions include submission permission plus stopping an application and moving the application to a different queue. Access control lists are checked recursively up to the root of the tree starting at the lowest point in the tree. In other words when the access control list of a queue does not allow access the parent queue is checked. The checks are repeated all the way up to the root of the queues.
===Submit ACL===
===Submit ACL===
Must explicitly specify <code>submitacl: "*"</code>, if missing, the application won't be accepted, with "application rejected: no placement rule matched"
===Admin ACL===
===Admin ACL===
==Queue Resources==
==Queue Resources==

Revision as of 01:39, 16 December 2023

Internal

Partition

https://yunikorn.apache.org/docs/user_guide/queue_config

The total "partition resource" is the sum of its nodes' "capacity" (node.GetCapacity(), which is the node's "total resource").

Each partition has a root queue, which is the start of the queue hierarchy per partition.

Queue

https://yunikorn.apache.org/docs/user_guide/queue_config
https://yunikorn.apache.org/docs/design/scheduler_configuration/#queue-configuration

The queue configuration is dynamic and it can be changed while the scheduler is running, without requiring a scheduler restart. The queue configuration will change after invocation of the corresponding Go API method, of the REST based API or after changing the configuration file. Changes made through API will be persisted in the configuration file. All queues defined in the configuration are considered managed queues.

The queues from a tree. The base of the tree is the root queue. The root queue reflects the entire cluster, and resource settings on the root queue are not allowed. The resources available to the root queue are calculated based on the resources of the nodes registered with the cluster.

Applications can only be submitted to leaf queues. A queue that is not a leaf queue is a parent queue. Except the root queue, any queue must have one and only one parent queue. A queue type is either leaf or parent.

The individual queue names are separated by dot ("."), thus yielding fully qualified queue names. As result, an individual queue name cannot contain dot characters. A queue in the hierarchy can thus be only uniquely identified by its fully qualified path. This means two individual queues with the same name are allowed, if they are resent in different position in the hierarchy.

Access Control List

https://yunikorn.apache.org/docs/user_guide/acls/

There are submission permission and administrative permissions. Submission permission relate to the capability to submit a certain application to a certain queue by specific users or groups. Administrative permissions include submission permission plus stopping an application and moving the application to a different queue. Access control lists are checked recursively up to the root of the tree starting at the lowest point in the tree. In other words when the access control list of a queue does not allow access the parent queue is checked. The checks are repeated all the way up to the root of the queues.

Submit ACL

Must explicitly specify submitacl: "*", if missing, the application won't be accepted, with "application rejected: no placement rule matched"

Admin ACL

Queue Resources

https://yunikorn.apache.org/docs/user_guide/queue_config/#resources

Guaranteed Resources

Maximum Resources

Running Applications Limit

A queue can set a running application limit.

Application Sort Algorithm

Fair, FIFO.

Queue Priority

Placement Rules

https://yunikorn.apache.org/docs/user_guide/placement_rules/

Placement rules refer to automatically placing an application onto a queue.

Kuberentes Implementation

A namespace can have a "queue" if annotated with "yunikorn.apache.org/queue". A namespace can have a "parent queue" is annotated with "yunikorn.apache.org/parentqueue".

Application

Application can issue allocation requests.

An application can be added or removed.

An application is assigned to a partition, there's an "applications" map in each partition. Can the same application assigned to two or more partitions at the same time?.

An application has an execution timeout, which is the maxima amount of time this application can be in a running state. What happens if the timeout expires? I set it to 10 secs for an application whose ask could not be fulfilled, and nothing happened.

Application Metadata

Application ID

Looks in this order:

  • Annotation "yunikorn.apache.org/app-id"
  • Label "applicationId"
  • ...

Queue Name

User

Tags

Groups

TaskGroups

OwnerReference

Usually a pod, designated by its UID.

Scheduling Policy Parameters

Application Task

For the Kubernetes implementations, Kubernetes pods are mapped onto YuniKorn Core Tasks, and the task ID is the pod UID.

A task may be the "originator" of the Application, if it's the first one seen for the application. If that is the case, it is considered "first pod"/"owner"/"driver".

Task Metadata

Application ID

TaskID

(same as the Pod ID)

Pod

Placeholder

TaskGroupName

Task Group

Application Request

Application Priority

Allocation

A core scheduler-level concept.

An allocation can be issued by an application, or it can be an independent allocation, which does not belong to any application.

An allocation can be in one of two states ("Pending" and "In-Progress"). A pending allocation is one which has been decided upon by YuniKorn but has not yet been communicated to the default scheduler via PreFilter()/Filter(). Once PreFilter()/Filter() pass, the allocation transitions to "In-Progress" to signify that the default scheduler is responsible for fulfilling the allocation. Once PostBind() is called in the plugin to signify completion of the allocation, it is removed.

Allocation Ask

Each allocation has a key. The key is used by both the scheduler and the resource manager to track allocations. The key does not have to be the resource manager's internal allocation ID, such as the pod name.

If the allocation specifies an application ID, the application must be registered in advance, otherwise we get "failed to find application ..."

Each allocation ask requests resources.

Each allocation ask has a priority.

What is "MaxAllocations"?

An application goes into a state transition after the first allocation ask, to "run application".

Identity

An application is submitted under a certain identity, that consists of a user and one or more groups.

TO PARSE:

User

Group

The identity an application is submitted under may be associated with one or more groups.

Plugin Mode

Resource Manager (RM)

YuniKorn communicates with various implementation of resource management systems (Kubernetes, YARN) via a standard interface defined in the yunikorn-scheduler-interface package.

Task

Node

Can a node be declared to be part of a partition with the "si/node-partition" label? It seems that the node Attributes partially come from the node labels.

In the Kubernetes implementation, the node is first added, then updated.

As part of handling the RMNodeUpdateEvent, RMProxy calls callback.UdpateNode().

Configuration

Context

yunikorn-k8shim cache.Context

Resource

Quantity

Reservation

Manual Scheduling

Policy Group

Set in the scheduler when a new resource manager is registered.

Gang Scheduling

Gang scheduling style can be "hard" (the application will fail after placeholder timeout) or "soft" (after the timeout the application will be scheduled as a normal application).