[
https://issues.apache.org/jira/browse/YUNIKORN-3245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081084#comment-18081084
]
Ayub Pathan commented on YUNIKORN-3245:
---------------------------------------
Opened PR: https://github.com/apache/yunikorn-core/pull/1086
The patch resets queue property-derived fields on config update while
preserving inherited parent properties for existing child queues during reload.
> Queue properties has old values even after passing empty properties map
> -----------------------------------------------------------------------
>
> Key: YUNIKORN-3245
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3245
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - scheduler
> Reporter: Manikandan R
> Assignee: Ayub Pathan
> Priority: Major
> Labels: pull-request-available
>
> Queue props can be set by passing `properties` map to `updateQueueProperties`
> function. After setting non-empty map, Queue variables are set accordingly.
> In case empty `properties` map, values of Queue variables still remains same
> and not reset to default values. It is not correct and needs to fixed.
> Below code shows the problem:
> {code:java}
> func TestUpdateQueueProperties(t *testing.T) {
> root, err := createRootQueue(nil)
> assert.NilError(t, err, "failed to create basic root queue: %v", err)
> // Test specific queue
> var leaf *Queue
> leaf, err = createManagedQueue(root, "leaf-queue", false, nil)
> assert.NilError(t, err, "failed to create managed queue")
> leaf.properties = map[string]string{
> configs.ApplicationSortPolicy: policies.FairSortPolicy.String(),
> configs.PreemptionPolicy: policies.FencePreemptionPolicy.String(),
> }
> leaf.UpdateQueueProperties(nil)
> assert.Equal(t, leaf.sortType.String(), policies.FairSortPolicy.String(),
> "incorrect sort policy")
> assert.Equal(t, leaf.preemptionPolicy.String(),
> policies.FencePreemptionPolicy.String(), "incorrect preemption policy")
> leaf.properties = map[string]string{}
> leaf.UpdateQueueProperties(nil)
> assert.Equal(t, leaf.sortType.String(), policies.FairSortPolicy.String(),
> "incorrect sort policy")
> assert.Equal(t, leaf.preemptionPolicy.String(),
> policies.FencePreemptionPolicy.String(), "incorrect preemption policy")
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]