Skip to content

Commit 1b77005

Browse files
authored
Set autorestart=true for all workers (cvat-ai#6945)
Helm: set memory request for keydb SUpervisord configs: - Added `autorestart=true` option for all workers - Unified program names to use dashes as delimiter instead of mixed '_' and '-' - Minor improvements to supervisor configurations
1 parent 2802442 commit 1b77005

12 files changed

+45
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Changed
2+
3+
- Helm: set memory request for keydb
4+
- Supervisord:
5+
- added `autorestart=true` option for all workers
6+
- unified program names to use dashes as delimiter instead of mixed '_' and '-'
7+
- minor improvements to supervisor configurations
8+
(<https://github.com/opencv/cvat/pull/6945>)

helm-chart/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.10.0
18+
version: 0.10.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

helm-chart/test.values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ cvat:
2727
frontend:
2828
imagePullPolicy: Never
2929

30+
keydb:
31+
resources:
32+
requests:
33+
3034
traefik:
3135
logs:
3236
general:
3337
level: DEBUG
3438
access:
3539
enabled: true
40+

helm-chart/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ keydb:
252252
- storage-provider: ["flash", "/data/flash"]
253253
- maxmemory: "5G"
254254
- maxmemory-policy: "allkeys-lfu"
255+
resources:
256+
requests:
257+
memory: "7G"
255258

256259
nuclio:
257260
enabled: false

supervisord/server.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ autostart=true
2828
autorestart=true
2929
startretries=5
3030
numprocs=1
31-
process_name=%(program_name)s-%(process_num)s
31+
process_name=%(program_name)s-%(process_num)d
3232

3333
[fcgi-program:uvicorn]
3434
socket=unix:///tmp/uvicorn.sock
3535
command=python3 -m uvicorn --fd 0 --forwarded-allow-ips='*' cvat.asgi:application
3636
autorestart=true
3737
environment=CVAT_EVENTS_LOCAL_DB_FILENAME="events_%(process_num)03d.db"
3838
numprocs=%(ENV_NUMPROCS)s
39-
process_name=%(program_name)s-%(process_num)s
39+
process_name=%(program_name)s-%(process_num)d
4040

4141
[program:smokescreen]
4242
command=smokescreen --listen-ip=127.0.0.1 %(ENV_SMOKESCREEN_OPTS)s

supervisord/utils.conf

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,25 @@ pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

2020
[program:rqscheduler]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic \
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c \
2222
"python3 ~/rqscheduler.py --host %(ENV_CVAT_REDIS_HOST)s --password '%(ENV_CVAT_REDIS_PASSWORD)s' -i 30 --path '%(ENV_HOME)s'"
2323
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2424
numprocs=1
2525

2626
[program:rqworker-notifications]
27-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
27+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2828
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 notifications \
2929
--worker-class cvat.rqworker.DefaultWorker \
3030
"
3131
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
3232
numprocs=1
3333

34-
[program:rqworker_cleaning]
35-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
34+
[program:rqworker-cleaning]
35+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
3636
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 cleaning \
3737
--worker-class cvat.rqworker.DefaultWorker \
3838
"
3939
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
4040
numprocs=%(ENV_NUMPROCS)s
41-
process_name=rqworker_cleaning_%(process_num)s
41+
process_name=%(program_name)s-%(process_num)d
42+
autorestart=true

supervisord/worker.analytics_reports.conf

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ loglevel=debug ; info, debug, warn, trace
1717
pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

20-
[program:rqworker_analytics_reports]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
20+
[program:rqworker-analytics-reports]
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2222
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 analytics_reports \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27-
process_name=%(program_name)s-%(process_num)s
27+
process_name=%(program_name)s-%(process_num)d
28+
autorestart=true

supervisord/worker.annotation.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

2020
[program:rqworker-annotation]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2222
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 annotation \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27+
process_name=%(program_name)s-%(process_num)d
28+
autorestart=true

supervisord/worker.export.conf

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

2020
[program:rqworker-export]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2222
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 export \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27-
process_name=%(program_name)s-%(process_num)s
27+
process_name=%(program_name)s-%(process_num)d
28+
autorestart=true

supervisord/worker.import.conf

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

2020
[program:rqworker-import]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2222
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 import \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27-
process_name=%(program_name)s-%(process_num)s
27+
process_name=%(program_name)s-%(process_num)d
28+
autorestart=true
2829

2930

3031
[program:clamav-update]

supervisord/worker.quality_reports.conf

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ loglevel=debug ; info, debug, warn, trace
1717
pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

20-
[program:rqworker_quality_reports]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic " \
20+
[program:rqworker-quality-reports]
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c " \
2222
exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 quality_reports \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27-
process_name=rqworker_quality_reports_%(process_num)s
27+
process_name=%(program_name)s-%(process_num)d
28+
autorestart=true

supervisord/worker.webhooks.conf

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ loglevel=debug ; info, debug, warn, trace
1717
pidfile=/tmp/supervisord/supervisord.pid ; pidfile location
1818
childlogdir=%(ENV_HOME)s/logs/ ; where child log files will live
1919

20-
[program:rqworker_webhooks]
21-
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -ic \
20+
[program:rqworker-webhooks]
21+
command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_REDIS_HOST)s:6379 -t 0 -- bash -c \
2222
"exec python3 %(ENV_HOME)s/manage.py rqworker -v 3 webhooks \
2323
--worker-class cvat.rqworker.DefaultWorker \
2424
"
2525
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
2626
numprocs=%(ENV_NUMPROCS)s
27+
process_name=%(program_name)s-%(process_num)d
2728

2829
[program:smokescreen]
2930
command=smokescreen --listen-ip=127.0.0.1 %(ENV_SMOKESCREEN_OPTS)s

0 commit comments

Comments
 (0)