diff options
-rw-r--r-- | configd/src/apps/sentinel/service.cpp | 16 | ||||
-rwxr-xr-x | vespabase/src/rhel-prestart.sh | 1 |
2 files changed, 6 insertions, 11 deletions
diff --git a/configd/src/apps/sentinel/service.cpp b/configd/src/apps/sentinel/service.cpp index 9652db71a32..5153a98d1ff 100644 --- a/configd/src/apps/sentinel/service.cpp +++ b/configd/src/apps/sentinel/service.cpp @@ -15,18 +15,13 @@ LOG_SETUP(".service", "$Id$"); extern sig_atomic_t stop; -namespace config { -namespace sentinel { +namespace config::sentinel { namespace { -std::string getTempDir() { - const char * configuredTmp = getenv("TMPDIR"); - if (configuredTmp) { - return configuredTmp; - } +std::string getVespaTempDir() { std::string tmp = getenv("ROOT"); - tmp += "/tmp"; + tmp += "var/db/vespa/tmp"; return tmp; } @@ -114,7 +109,7 @@ Service::terminate(bool catchable) setState(KILLING); char pstackCmd[256]; LOG(info, "%s:%d failed to stop. Will dump the stack", name().c_str(), _pid); - snprintf(pstackCmd, sizeof(pstackCmd), "pstack %d > %s/%s.pstack.%d", _pid, getTempDir().c_str(), name().c_str(), _pid); + snprintf(pstackCmd, sizeof(pstackCmd), "pstack %d > %s/%s.pstack.%d", _pid, getVespaTempDir().c_str(), name().c_str(), _pid); int pstackRet = system(pstackCmd); if (pstackRet != 0) { LOG(warning, "'%s' failed with return value %d", pstackCmd, pstackRet); @@ -447,6 +442,5 @@ Service::stateName(ServiceState state) const return "--BAD--"; } +} -} // end namespace sentinel -} // end namespace config diff --git a/vespabase/src/rhel-prestart.sh b/vespabase/src/rhel-prestart.sh index b6444c37548..069a41235b2 100755 --- a/vespabase/src/rhel-prestart.sh +++ b/vespabase/src/rhel-prestart.sh @@ -91,6 +91,7 @@ fixdir ${VESPA_USER} wheel 755 logs/vespa/qrs fixdir ${VESPA_USER} wheel 755 logs/vespa/search fixdir ${VESPA_USER} wheel 755 var/cache/vespa/config fixdir ${VESPA_USER} wheel 755 var/db/vespa +fixdir ${VESPA_USER} wheel 755 var/db/vespa/tmp fixdir ${VESPA_USER} wheel 755 var/db/vespa/config_server fixdir ${VESPA_USER} wheel 755 var/db/vespa/config_server/serverdb fixdir ${VESPA_USER} wheel 755 var/db/vespa/config_server/serverdb/applications |