From 30c297bdadb8f6ec130408d08f2be34351ccf74b Mon Sep 17 00:00:00 2001 From: Andrei Neagu Date: Tue, 9 May 2023 10:56:14 +0200 Subject: [PATCH 1/2] read only mode does not upload outputs --- .../modules/dynamic_sidecar/scheduler/_core/_events.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py index 286371ab093..f6c8046f033 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py @@ -489,9 +489,12 @@ async def progress_create_containers( dynamic_sidecar_endpoint, compose_spec, progress_create_containers ) - await dynamic_sidecar_client.enable_service_outputs_watcher( - dynamic_sidecar_endpoint - ) + # NOTE: only if service was NOT started in READ ONLY mode enable + # the outputs watcher + if scheduler_data.dynamic_sidecar.service_removal_state.can_save: + await dynamic_sidecar_client.enable_service_outputs_watcher( + dynamic_sidecar_endpoint + ) # Starts PROXY ----------------------------------------------- # The entrypoint container name was now computed From 76b118e4ac487d723b126890bf705a67a2fa7f27 Mon Sep 17 00:00:00 2001 From: Andrei Neagu Date: Wed, 10 May 2023 07:44:28 +0200 Subject: [PATCH 2/2] disable output watcher in READ ONLY mode --- .../modules/dynamic_sidecar/scheduler/_core/_events.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py index f6c8046f033..f68346ff857 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events.py @@ -489,12 +489,15 @@ async def progress_create_containers( dynamic_sidecar_endpoint, compose_spec, progress_create_containers ) - # NOTE: only if service was NOT started in READ ONLY mode enable - # the outputs watcher + # NOTE: when in READ ONLY mode disable the outputs watcher if scheduler_data.dynamic_sidecar.service_removal_state.can_save: await dynamic_sidecar_client.enable_service_outputs_watcher( dynamic_sidecar_endpoint ) + else: + await dynamic_sidecar_client.disable_service_outputs_watcher( + dynamic_sidecar_endpoint + ) # Starts PROXY ----------------------------------------------- # The entrypoint container name was now computed