[ 
https://issues.apache.org/jira/browse/YUNIKORN-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17685117#comment-17685117
 ] 

Peter Bacsko commented on YUNIKORN-1546:
----------------------------------------

cc [~wilfreds] 

I looked at the existing code in more detail and this is what I found:
 # Conversion from parent-to-leaf and leaf-to-parent is already possible in the 
current codebase (see patch):
 ** parent-to-leaf: if there are child queues, queue remains a parent, no error 
is thrown
 ** leaf-to-parent: presence of running applications is NOT checked, this is a 
necessary addition
 # Updating the queue hieararchy might fail in the middle of the operation, 
leaving the config in an inconsistent state
 ** {*}Suggestion{*}: first do a dry run without actually modifying anything. 
If that passes, apply the configuration for real.
 # Allocation logic can run together with the config update code
 ** {*}Suggestion{*}: add new variable to {{PartitionContext}} to mark the 
partition as being updated. If it is, then don't run 
{{{}ClusterContext.schedule(){}}}, instead send an event to trigger it again.
 # Config validation: there is config validation in the Admission Controller 
which calls YK core with a web service call 
([https://github.com/apache/yunikorn-k8shim/blob/de8d8b62fc35bfe528b7fa3334673e20584e3f20/pkg/admission/admission_controller.go#L544-L550]).
 If this fails, the configmap will not be applied. If YK is not available for 
some reason (eg. it crashed), no validation will take place.
 ** {*}Question{*}: why is this a webservice call? Shouldn't we just embed the 
verification logic inside the AC? The {{Validate()}} function in 
{{configvalidatior.go}} looks completely stateless.

> Allow changing queue type: parent to leaf and back
> --------------------------------------------------
>
>                 Key: YUNIKORN-1546
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1546
>             Project: Apache YuniKorn
>          Issue Type: New Feature
>          Components: core - common
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Peter Bacsko
>            Priority: Major
>         Attachments: TestUpdateQueues2.patch
>
>
> In certain cases we would like to allow changing the queue type from a parent 
> to a leaf or the other way around in one update.
> Currently there is no way to change the type and it will throw an error when 
> tried. That means two updates need to be made to first remove and then add 
> the same queue with a different type. This is only important for managed 
> queues, i.e. queues in the config. Dynamic queues should not allow type 
> changes as they are removed when empty.
>  * parent to leaf: only if no children are registered for the parent
>  * leaf to parent: only of no applications are running in the queue



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to