File tree 4 files changed +22
-2
lines changed
director-v2/src/simcore_service_director_v2
core/dynamic_services_settings
modules/dynamic_sidecar/scheduler/_core
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ COMPUTATIONAL_BACKEND_DEFAULT_FILE_LINK_TYPE=PRESIGNED
82
82
COMPUTATIONAL_BACKEND_ON_DEMAND_CLUSTERS_FILE_LINK_TYPE=PRESIGNED
83
83
DIRECTOR_V2_DEV_FEATURES_ENABLED=0
84
84
DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED=1
85
+ DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=0
85
86
DIRECTOR_V2_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS='{}'
86
87
DIRECTOR_V2_HOST=director-v2
87
88
DIRECTOR_V2_LOGLEVEL=WARNING
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ class DynamicServicesSchedulerSettings(BaseCustomSettings):
30
30
)
31
31
32
32
DYNAMIC_SIDECAR_DOCKER_COMPOSE_VERSION : str = Field (
33
- "3.8" , description = "docker-compose spec version used in the compose-specs" , deprecated = True
33
+ "3.8" ,
34
+ description = "docker-compose spec version used in the compose-specs" ,
35
+ deprecated = True ,
34
36
)
35
37
36
38
DYNAMIC_SIDECAR_ENABLE_VOLUME_LIMITS : bool = Field (
@@ -61,7 +63,9 @@ class DynamicServicesSchedulerSettings(BaseCustomSettings):
61
63
description = "Prometheus will scrape service placed on these networks" ,
62
64
)
63
65
64
- DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED : bool = Field (
66
+ DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED : (
67
+ bool
68
+ ) = Field (
65
69
default = True ,
66
70
description = (
67
71
"when the message indicating there are no more credits left in a wallet "
@@ -149,3 +153,11 @@ class DynamicServicesSchedulerSettings(BaseCustomSettings):
149
153
"allow for some time to pass before declaring it failed."
150
154
),
151
155
)
156
+
157
+ #
158
+ # DEBUG
159
+ #
160
+
161
+ DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL : timedelta = Field (
162
+ timedelta (0 ), description = "time to sleep before removing a container"
163
+ )
Original file line number Diff line number Diff line change 1
1
# pylint: disable=relative-beyond-top-level
2
2
3
+ import asyncio
3
4
import json
4
5
import logging
5
6
from typing import Any , cast
@@ -276,6 +277,11 @@ async def attempt_pod_removal_and_data_saving(
276
277
277
278
await service_remove_containers (app , scheduler_data .node_uuid , sidecars_client )
278
279
280
+ # used for debuug, normally sleeps 0
281
+ await asyncio .sleep (
282
+ settings .DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL .total_seconds ()
283
+ )
284
+
279
285
# only try to save the status if :
280
286
# - it is requested to save the state
281
287
# - the dynamic-sidecar has finished booting correctly
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ services:
281
281
DIRECTOR_V2_PUBLIC_API_BASE_URL : ${DIRECTOR_V2_PUBLIC_API_BASE_URL}
282
282
DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS : ${DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS}
283
283
DIRECTOR_V2_PROFILING : ${DIRECTOR_V2_PROFILING}
284
+ DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL : ${DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL}
284
285
285
286
DYNAMIC_SIDECAR_ENDPOINT_SPECS_MODE_DNSRR_ENABLED : ${DYNAMIC_SIDECAR_ENDPOINT_SPECS_MODE_DNSRR_ENABLED}
286
287
DYNAMIC_SIDECAR_ENABLE_VOLUME_LIMITS : ${DYNAMIC_SIDECAR_ENABLE_VOLUME_LIMITS}
You can’t perform that action at this time.
0 commit comments