From: garciadeblas Date: Fri, 26 Sep 2025 12:07:00 +0000 (+0200) Subject: Fix kubectl.create_pvc_with_content to delete the pod after copying content X-Git-Tag: v18.0.1^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=8938bfaa69bfc48fccb80c5a35dcf0f9e335b79c;p=osm%2FLCM.git Fix kubectl.create_pvc_with_content to delete the pod after copying content Change-Id: I6a44546eb282c82819fef23dd5b7a7770ff99f2a Signed-off-by: garciadeblas --- diff --git a/osm_lcm/n2vc/kubectl.py b/osm_lcm/n2vc/kubectl.py index 9ac4a271..a1ac6def 100644 --- a/osm_lcm/n2vc/kubectl.py +++ b/osm_lcm/n2vc/kubectl.py @@ -1067,6 +1067,8 @@ class Kubectl: src_file=src_file, dest_path=f"/mnt/data/{dest_filename}", ) + self.logger.debug(f"Deleting pod {pod_name}") + await self.delete_pod(pod_name, namespace) @retry( attempts=10, diff --git a/osm_lcm/odu_libs/oka.py b/osm_lcm/odu_libs/oka.py index 240dda57..63c4d366 100644 --- a/osm_lcm/odu_libs/oka.py +++ b/osm_lcm/odu_libs/oka.py @@ -189,12 +189,6 @@ async def clean_items_oka_create(self, op_id, op_params_list, content_list): volume_name = f"temp-pvc-oka-{op_id}" try: items = { - "pods": [ - { - "name": f"copy-pod-{volume_name}", - "namespace": "osm-workflows", - } - ], "pvcs": [ { "name": volume_name,