diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 8085c64a881..bfedd0b9056 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -320,6 +320,9 @@ Add ConfigMap volume mount for a component mountPath: /tmp - name: {{ .name }}-hpcctmp-volume mountPath: /var/lib/HPCCSystems +{{- if .tmpSubPath }} + subPath: {{ .tmpSubPath | quote }} +{{- end }} - name: {{ .name }}-configmap-volume mountPath: /etc/config {{- end -}} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index d6cddeb54ba..26f8d40cb19 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -252,7 +252,7 @@ data: {{ include "hpcc.mergeEnvironments" $configCtx.me.env | indent 12 }} workingDir: /var/lib/HPCCSystems volumeMounts: -{{ include "hpcc.addConfigMapVolumeMount" $configCtx.me | indent 12 }} +{{ include "hpcc.addConfigMapVolumeMount" (deepCopy $configCtx.me | merge (dict "tmpSubPath" $containerNum)) | indent 12 }} {{ include "hpcc.addVolumeMounts" $configCtx | indent 12 }} {{ include "hpcc.addSecretVolumeMounts" $configCtx | indent 12 }} {{ include "hpcc.addVaultClientCertificateVolumeMounts" $configCtx | indent 12 }} diff --git a/thorlcr/master/thmastermain.cpp b/thorlcr/master/thmastermain.cpp index 1dc2bdde01d..12bcdbba09f 100644 --- a/thorlcr/master/thmastermain.cpp +++ b/thorlcr/master/thmastermain.cpp @@ -1163,18 +1163,23 @@ int main( int argc, const char *argv[] ) } if (isContainerized()) { + int retCode = exception ? TEC_Exception : 0; if (!cloudJobName.isEmpty()) { + if (exception) + { + Owned factory = getWorkUnitFactory(); + Owned wu = factory->openWorkUnit(workunit); + if (wu) + { + relayWuidException(wu, exception); + retCode = 0; // if successfully reported, suppress thormanager exit failure that would trigger another exception + } + } if (workerJobInstalled) { try { - if (exception) - { - Owned factory = getWorkUnitFactory(); - Owned wu = factory->openWorkUnit(workunit); - relayWuidException(wu, exception); - } k8s::KeepJobs keepJob = k8s::translateKeepJobs(globals->queryProp("@keepJobs")); switch (keepJob) { @@ -1209,7 +1214,7 @@ int main( int argc, const char *argv[] ) } } } - setExitCode(exception ? TEC_Exception : 0); + setExitCode(retCode); } // cleanup handler to be sure we end