From ede882d384ae0959eb8a9484b7d491baa628a1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20=C5=A0imko?= Date: Mon, 6 May 2024 14:24:27 +0200 Subject: [PATCH] fix(reana-admin): respect service domain when cleaning sessions (#687) Removes hard-coded infrastructure component host name domain "svc.local.cluster" during interactive session clean-up procedures, since this assumption is not really necessary and would not work under some deployment scenarios, such as on SSL-RIVER. Closes reanahub/reana-commons#457 --- reana_server/reana_admin/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reana_server/reana_admin/cli.py b/reana_server/reana_admin/cli.py index 2cbe0fea..b76036ac 100644 --- a/reana_server/reana_admin/cli.py +++ b/reana_server/reana_admin/cli.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of REANA. -# Copyright (C) 2020, 2021, 2022 CERN. +# Copyright (C) 2020, 2021, 2022, 2024 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -1077,7 +1077,7 @@ def interactive_session_cleanup( try: session_status = requests.get( - f"http://reana-run-session-{workflow_id}.{REANA_RUNTIME_KUBERNETES_NAMESPACE}.svc.cluster.local:8081/{workflow_id}/api/status", + f"http://reana-run-session-{workflow_id}.{REANA_RUNTIME_KUBERNETES_NAMESPACE}:8081/{workflow_id}/api/status", headers={"Authorization": f"token {token}"}, ).json() except Exception as e: