Application crash when running the binary for a few days on some systems

Description

When running DATAGERRY from the binary, on some systems the application stopped working after a few days.

Reason:
When starting the binary, all required files were extracted to /tmp directory. systemd-tmpfiles may delete files from that directory, that are older than x days. This will make the DATAGERRY WebUI unresponsive.

Environment

None

Activity

Show:
Mark Heumüller
January 13, 2021, 2:56 PM

Tested: Rollout RPM on CentOS 7 & 8
Tested: Rollout TAR on Ubuntu 20.04.1 LTS & Ubuntu 20.10
I also tried Docker. Do not see any problems. Ran through.

tmpfiles were created, tmpfiles.d service did not delete any files when moving the date over the configured time.

Michael Batz
January 13, 2021, 8:07 AM

Configuration added to RPM and setup script. Needs to be tested with in different environments:

  • Rollout of RPM on CentOS/RHEL

  • Rollout of TAR.GZ on Debian/Ubuntu

  • Check, if Docker Image still works correctly

Michael Batz
January 11, 2021, 4:41 PM

The following configuration file for systemd-tmpfile in /usr/lib/tmpfiles.d/datagerry.conf will exclude PyInstaller directories from cleanup:

Michael Batz
January 11, 2021, 4:27 PM

The following options exists to solve the problem:

  • create a configuration file, which excludes the temporary directory created by PyInstaller from cleanup

    • /usr/lib/tmpfiles.d/datagerry.conf

  • Use another directory to let PyInstaller extract the content of the binary:

    • TMPDIR=/root ./datagerry -c ./cmdb.conf  -s

Done

Assignee

Michael Batz

Reporter

Michael Batz

Labels

Tester

Mark Heumüller

Sprint

None

Fix versions

Priority

Medium