Skip to content

Commit 3b16347

Browse files
GitHKAndrei Neagu
andauthored
🐛 Various fixes (ITISFoundation#3314)
* logs recovery does not work on swarm * messages out of context would fail Co-authored-by: Andrei Neagu <[email protected]>
1 parent 31dd926 commit 3b16347

File tree

2 files changed

+5
-12
lines changed
  • services
    • director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_api
    • dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules

2 files changed

+5
-12
lines changed

services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_api/_volume.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,8 @@ async def remove_volumes_from_node(
115115
task_state == "complete"
116116
and task_status["ContainerStatus"]["ExitCode"] == 0
117117
):
118-
# recover logs from command for a simpler debugging
119-
container_id = task_status["ContainerStatus"]["ContainerID"]
120-
container = await client.containers.get(container_id)
121-
container_logs = await container.log(stdout=True, stderr=True)
122118
log.error(
123-
"Service %s, %s output: %s",
124-
service_id,
125-
f"{task_status=}",
126-
"\n".join(container_logs),
119+
"Service %s status: %s", service_id, f"{task_status=}"
127120
)
128121
# NOTE: above implies the volumes will remain in the system and
129122
# have to be manually removed.

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/nodeports.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ async def upload_outputs(
145145
await logged_gather(*archiving_tasks)
146146
await PORTS.set_multiple(ports_values)
147147

148-
elapsed_time = time.perf_counter() - start_time
149-
total_bytes = sum(_get_size_of_value(x) for x in ports_values.values())
150-
logger.info("Uploaded %s bytes in %s seconds", total_bytes, elapsed_time)
151-
logger.debug(_CONTROL_TESTMARK_DY_SIDECAR_NODEPORT_UPLOADED_MESSAGE)
148+
elapsed_time = time.perf_counter() - start_time
149+
total_bytes = sum(_get_size_of_value(x) for x in ports_values.values())
150+
logger.info("Uploaded %s bytes in %s seconds", total_bytes, elapsed_time)
151+
logger.debug(_CONTROL_TESTMARK_DY_SIDECAR_NODEPORT_UPLOADED_MESSAGE)
152152

153153

154154
async def dispatch_update_for_directory(

0 commit comments

Comments
 (0)