Skip to content

Commit e8a886f

Browse files
amoralejopenshift-merge-bot[bot]
authored andcommitted
Set max_workers=8 in [watcher_workflow_engines.taskflow] config section
The watcher taskflow workflow engine defaults to the number of CPUs, which can be too high in terms of cpu consumption in the decision-engine and in terms of parallel VM live migration for the cluster. Set max_workers to 8 by default seems a balanced value that can be overrided using customServiceConfig. Assisted-By: Cursor (claude-4.6-opus) Fixes: OSPRH-26677 Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
1 parent d9d7f10 commit e8a886f

6 files changed

Lines changed: 17 additions & 0 deletions

File tree

templates/00-default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ interface = internal
174174
region_name = {{ .Region }}
175175
{{- end }}
176176

177+
[watcher_workflow_engines.taskflow]
178+
max_workers = 8
179+
177180
[watcher_cluster_data_model_collectors.compute]
178181
period = 900
179182

test/functional/watcherapi_controller_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ region_name = regionOne`, `
293293
[placement_client]
294294
interface = internal
295295
region_name = regionOne`, `
296+
[watcher_workflow_engines.taskflow]
297+
max_workers = 8`, `
296298
[watcher_cluster_data_model_collectors.compute]
297299
period = 900`, `
298300
[watcher_cluster_data_model_collectors.baremetal]
@@ -1200,6 +1202,8 @@ region_name = regionTwo`, `
12001202
[placement_client]
12011203
interface = internal
12021204
region_name = regionTwo`, `
1205+
[watcher_workflow_engines.taskflow]
1206+
max_workers = 8`, `
12031207
[watcher_cluster_data_model_collectors.compute]
12041208
period = 900`, `
12051209
[watcher_cluster_data_model_collectors.baremetal]

test/functional/watcherapplier_controller_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ region_name = regionOne`, `
217217
[placement_client]
218218
interface = internal
219219
region_name = regionOne`, `
220+
[watcher_workflow_engines.taskflow]
221+
max_workers = 8`, `
220222
[oslo_messaging_notifications]
221223
222224
driver = noop`,
@@ -778,6 +780,8 @@ region_name = regionTwo`, `
778780
[placement_client]
779781
interface = internal
780782
region_name = regionTwo`, `
783+
[watcher_workflow_engines.taskflow]
784+
max_workers = 8`, `
781785
[oslo_messaging_notifications]
782786
783787
driver = messagingv2

test/functional/watcherdecisionengine_controller_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ region_name = regionOne`, `
227227
[placement_client]
228228
interface = internal
229229
region_name = regionOne`, `
230+
[watcher_workflow_engines.taskflow]
231+
max_workers = 8`, `
230232
[watcher_cluster_data_model_collectors.compute]
231233
period = 900`, `
232234
[watcher_cluster_data_model_collectors.baremetal]
@@ -747,6 +749,8 @@ region_name = regionTwo`, `
747749
[placement_client]
748750
interface = internal
749751
region_name = regionTwo`, `
752+
[watcher_workflow_engines.taskflow]
753+
max_workers = 8`, `
750754
[watcher_cluster_data_model_collectors.compute]
751755
period = 900`, `
752756
[watcher_cluster_data_model_collectors.baremetal]

test/kuttl/test-suites/default/watcher-tls/01-assert.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ commands:
481481
[ -n "$(oc get -n ${NAMESPACE} watcher watcher-kuttl -o jsonpath={.status.hash.dbsync})" ]
482482
[ "$(oc get -n ${NAMESPACE} secret watcher-kuttl-api-config-data -o jsonpath='{.data.my\.cnf}'|base64 -d|grep -c 'ssl=1')" == 1 ]
483483
[ "$(oc get -n ${NAMESPACE} secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'cafile = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem')" == 2 ]
484+
[ "$(oc get -n ${NAMESPACE} secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'max_workers = 8')" == 1 ]
484485
# check that both endpoints have https set
485486
oc exec -n ${NAMESPACE} openstackclient -- openstack endpoint list | grep infra-optim | [ $(grep -c https) == 2 ]
486487
# If we are running the container locally, skip following test

test/kuttl/test-suites/default/watcher/01-assert.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ commands:
512512
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.my\.cnf}'|base64 -d|grep -c 'ssl=1')" == 1 ]
513513
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'cafile = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem')" == 2 ]
514514
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'region_name = regionOne')" -ge 1 ]
515+
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'max_workers = 8')" == 1 ]
515516
# If we are running the container locally, skip following test
516517
if [ "$(oc get pods -n openstack-operators -o name -l openstack.org/operator-name=watcher)" == "" ]; then
517518
exit 0

0 commit comments

Comments
 (0)