[
https://issues.apache.org/jira/browse/YUNIKORN-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu-Lin Chen resolved YUNIKORN-2636.
-----------------------------------
Fix Version/s: 1.6.0
Resolution: Fixed
Merged to master.
> Admission Controller ignores existing Queue/ApplicationID annotations
> ---------------------------------------------------------------------
>
> Key: YUNIKORN-2636
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2636
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes
> Reporter: Yu-Lin Chen
> Assignee: Yu-Lin Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> Admission controller should patch missing queueName/applicationID to pod if
> they were not set.
> However, if the queueName/applicationID were only set in annotation, AM will
> still patch the default value to pod. The updatePodLabel() only check
> existing labels.
> *
> [https://github.com/apache/yunikorn-k8shim/blob/master/pkg/admission/util.go#L39-L40]
> *
> [https://github.com/apache/yunikorn-k8shim/blob/6f2800f689e9e341c736a6af8cbf178a711a9423/pkg/admission/util.go#L53]
>
> {*}What will impact users{*}:
> When we set placement rule to"provided" and queueName/applicationID were only
> set in annotation.
> The application will be submitted to default queue instead the queue set in
> the pod anonotation.
> {*}Steps to reproduce the issue{*}:
> 1. Update placement rule to 'provided'
> {code:java}
> apiVersion: v1
> kind: ConfigMap
> metadata:
> name: yunikorn-configs
> namespace: yunikorn
> data:
> log.level: "DEBUG"
> queues.yaml: |
> partitions:
> - name: default
> queues:
> - name: root
> submitacl: '*'
> placementrules:
> - name: provided
> create: true {code}
> 2. Create pod with queue/app-id annotations
> {code:java}
> apiVersion: v1
> kind: Pod
> metadata:
> labels:
> app: sleep
> annotations:
> yunikorn.apache.org/app-id: "application-sleep-0001"
> yunikorn.apache.org/queue: "root.sandbox"
> name: pod-with-annotations-only
> spec:
> schedulerName: yunikorn
> restartPolicy: Never
> containers:
> - name: sleep-6000s
> image: "alpine:latest"
> command: ["sleep", "6000"]
> resources:
> requests:
> cpu: "100m"
> memory: "500M"{code}
> 3. Check below labels in pod, thees are added by AM.
> * queue=root.default
> * applicationId=yunikorn-default-autogen
> 4. Check the app's queue:
> *
> [http://localhost:9889/ws/v1/partition/default/application/application-sleep-0001]
>
> The app is in "root.default", but it should be in "root.sandbox".
> (Please check the queue ordering:
> [Doc|https://yunikorn.apache.org/docs/user_guide/labels_and_annotations_in_yunikorn#annotations-in-yunikorn])
> To fix this issue, we should let AM check all the possible locations.
> Notes: As part of the future change in YUNIKORN-2504, If the same metadata
> (queue or applicationID) is specified in multiple locations and their values
> are inconsistent, the pod should be reject.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]