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.
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
The following configuration file for systemd-tmpfile in /usr/lib/tmpfiles.d/datagerry.conf will exclude PyInstaller directories from cleanup:
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
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.