[
https://issues.apache.org/jira/browse/YUNIKORN-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792496#comment-17792496
]
Kuan-Po Tseng commented on YUNIKORN-2230:
-----------------------------------------
copied from slack discussion
[https://yunikornworkspace.slack.com/archives/CL9CRJ1KM/p1701535489057229]
> brandboat
Hello everyone, I attempted to set
{{admissionController.filtering.defaultQueue}} to "", but I observed that after
doing so, the application's queue name becomes {{root.sandbox}} (even though I
didn't set a queue name in the application, and the sandbox becomes another
default queue name). I'm unsure if this is the intended behavior or not. If
this is a bug or something , I'm willing to fix it. Many thanks (edited)
13 replies
> Wilfred Spiegelenburg
The admission controller is doing the right thing as far as I can tell.
This default is then triggered in the k8shim when processing in
[GetQueueNameFromPod|https://github.com/apache/yunikorn-k8shim/blob/28995cd7289256be3d3b8f820d438ddec36778b3/pkg/common/utils/utils.go#L104-L112].
There we pull the default queue from the
[constant|https://github.com/apache/yunikorn-k8shim/blob/master/pkg/common/constants/constants.go#L45]:
const ApplicationDefaultQueue = "root.sandbox"
That has been there for a long time. [@Mit
Desai|https://yunikornworkspace.slack.com/team/U041DKN4YHW] worked on not
setting the value in the admission controller. Looks like we need a follow up
on the k8shim side to make the empty string work as expected.
> Wilfred Spiegelenburg
Can you update YUNIKORN-2228 and change it from a documentation bug into a bug
against the k8shim?
Also a really weird value for the constant. We should have {{root.default}} if
we have any set in the k8shim.
> brandboat
Thanks for the reply, already updated the desc and title in YUNIKORN-2228
{quote}Also a really weird value for the constant. We should have
{{root.default}} if we have any set in the k8shim.{quote}
I'm not entirely sure if I understand correctly. Are you suggesting that there
is an inconsistency between {{root.sandbox}} and {{{}root.default{}}}?
> Yu-Lin Chen
[@Wilfred Spiegelenburg|https://yunikornworkspace.slack.com/team/ULRU2BU6B]
Why we need default queue in shim? Why don't we keep it empty in shim? Default
queue should only be used for AdmissionController to add more information for
pod. (edited)
> Yu-Lin Chen
I think we could remove default queue in shim. Since the current value
root.sandbox shouldn't be used by anyone.(Need to test it carefully.) (edited)
> Chia-Ping Tsai
[@Yu-Lin Chen|https://yunikornworkspace.slack.com/team/U05PXMAEX3K] could you
share the use case we discussed yesterday?
> Wilfred Spiegelenburg
{quote} Are you suggesting that there is an inconsistency between
{{root.sandbox}} and {{{}root.default{}}}?{quote}
yes I am, we should have the same default in all places.We also need to be able
to support the empty case as per the admission controller. That might require
not overriding the queue in the k8shim if the admission controller is deployed…
Something to investigate and define how we want the system to behave. (edited)
> Yu-Lin Chen
{quote}[@Yu-Lin Chen|https://yunikornworkspace.slack.com/team/U05PXMAEX3K]
could you share the use case we discussed yesterday?{quote}
This is the use case:
yunikorn-configs.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: yunikorn-configs
namespace: yunikorn
data:
log.level: "DEBUG"
admissionController.filtering.defaultQueue: ""
queues.yaml: |
partitions:
- name: default
placementrules:
- name: provided
create: false
- name: tag
value: namespace
create: true
queues:
- name: root
submitacl: "*"
queues:
- name: sandbox
submitacl: "*"
There have 2 placement rule: # provide
# tag
Pod
apiVersion: v1
kind: Pod
metadata:
labels:
app: sleep
applicationId: "application-sleep-0001"
name: task0
spec:
schedulerName: yunikorn
restartPolicy: Never
containers:
- name: sleep-30s
image: "alpine:latest"
command: ["sleep", "30"]
resources:
requests:
cpu: "100m"
memory: "500M"
Even though there is no queue name specified for the sleep pod, it's still
submitted to root.sandbox(Shim 's default queue value.) What we expected was
that it should submit the application through 'tag' placement rule. (edited)
> brandboat
{quote}I think we could remove default queue in shim. Since the current value
root.sandbox shouldn't be used by anyone.(Need to test it carefully.)
(edited){quote}
agree with [@Yu-Lin Chen|https://yunikornworkspace.slack.com/team/U05PXMAEX3K],
I believe we should remove the mechanism in GetQueueNameFromPod that adds
default queue name (i.e. {{{}root.sandbox{}}}) to the pod if the queue name
doesn't exist. Otherwise the tag placement rule won't be triggered in the above
example, event if we set {{admissionController.filtering.defaultQueue: ""}} .
Currently, I'm not certain whether removing the default queue name in shim side
might bring any side effect or not. I will do further research and come up with
a pull request accordingly. (edited)
> Wilfred Spiegelenburg
Be careful: we do not force anyone to use the admission controller. If you do
not use the admission controller things still need to work.
> Fix placement rule not behave as expected
> -----------------------------------------
>
> Key: YUNIKORN-2230
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2230
> Project: Apache YuniKorn
> Issue Type: Bug
> Reporter: Kuan-Po Tseng
> Assignee: Kuan-Po Tseng
> Priority: Major
>
> yunikorn configmap
> {code:yaml}
> apiVersion: v1
> kind: ConfigMap
> metadata:
> name: yunikorn-configs
> namespace: yunikorn
> data:
> log.level: "DEBUG"
> admissionController.filtering.defaultQueue: ""
> queues.yaml: |
> partitions:
> - name: default
> placementrules:
> - name: provided
> create: false
> - name: tag
> value: namespace
> create: true
> queues:
> - name: root
> submitacl: "*"
> queues:
> - name: sandbox
> submitacl: "*"
> {code}
> test pod
> {code:yaml}
> apiVersion: v1
> kind: Pod
> metadata:
> labels:
> app: sleep
> applicationId: "application-sleep-0001"
> name: task0
> spec:
> schedulerName: yunikorn
> restartPolicy: Never
> containers:
> - name: sleep-30s
> image: "alpine:latest"
> command: ["sleep", "30"]
> resources:
> requests:
> cpu: "100m"
> memory: "500M"
> {code}
> Even though there is no queue name specified for the sleep pod, it's still
> submitted to root.sandbox(Shim 's default queue value.) What we expected was
> that it should submit the application through 'tag' placement rule.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]