Fix kubectl.create_pvc_with_content to delete the pod after copying content 27/15427/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 26 Sep 2025 12:07:00 +0000 (14:07 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 26 Sep 2025 12:07:22 +0000 (14:07 +0200)
Change-Id: I6a44546eb282c82819fef23dd5b7a7770ff99f2a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_lcm/n2vc/kubectl.py
osm_lcm/odu_libs/oka.py

index 9ac4a27..a1ac6de 100644 (file)
@@ -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,
index 240dda5..63c4d36 100644 (file)
@@ -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,