Browse Source

HPCC-24026 Replace existing jobs if they exist.

In some circumstances we resubmit a job with the same name,
after the previous incarnation has failed, e.g. due to RECOVERY
option. If any existing job exists it should be replaced.

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 5 năm trước cách đây
mục cha
commit
a237bdb12a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      common/workunit/workunit.cpp

+ 1 - 1
common/workunit/workunit.cpp

@@ -13772,7 +13772,7 @@ void launchK8sJob(const char *componentName, const char *wuid, const char *job,
     }
 
     StringBuffer output, error;
-    unsigned ret = runExternalCommand(output, error, "kubectl apply -f -", jobYaml.str());
+    unsigned ret = runExternalCommand(output, error, "kubectl replace --force -f -", jobYaml.str());
     DBGLOG("kubectl output: %s", output.str());
     if (error.length())
         DBGLOG("kubectl error: %s", error.str());