Skip to content

Commit 54eca85

Browse files
author
amantri
committed
Setup /var/run/dcmanager_orchestrator_tmp as orchestrator temp dir
dcmanager-orchestrator call the k8s python client to perform a number of operations. The k8s python client creates temp files under /tmp and continues use these tmp files for the life-cycle of the processes. However systemd-tmpfiles-clean.service will run every day to clean up files in /tmp dir that are older than 10 days. If the k8s client code is not triggered for more than 10 days (thus its temp files are not accessed for more than 10 days), these temp files will be removed as part of the cleanup. Certain dcmanager-orchestrator operations then starts to fail with an error that the tmp file is no longer there. This is a known issue of kubernetes python client: kubernetes-client/python#765 The commit fixes this issue by setting TMPDIR to /var/run/dcmanager_ orchestrator_tmp when sm starts dcmanager-orchestrator. The following similar commits were added for sysinv,dcmanager services in the past https://review.opendev.org/c/starlingx/config/+/736761 https://review.opendev.org/c/starlingx/distcloud/+/736247 Closes-bug: 2066048 Change-Id: I3d39f5b034e3ef2e6ad9636e86f26f0e93f16d45 Signed-off-by: amantri <[email protected]>
1 parent cb2df3f commit 54eca85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

distributedcloud/ocf/dcmanager-orchestrator

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ OCF_RESKEY_pid_default="$HA_RSCTMP/$OCF_RESOURCE_INSTANCE.pid"
3838
: ${OCF_RESKEY_user=${OCF_RESKEY_user_default}}
3939
: ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}}
4040

41+
export TMPDIR=/var/run/dcmanager_orchestrator_tmp
42+
4143
#######################################################################
4244

4345
usage() {

0 commit comments

Comments
 (0)