[MCOL-2101] setup tempfiles.d to prevent OS from flushing /tmp on reboot Created: 2019-01-22  Updated: 2023-10-26  Resolved: 2020-03-19

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.2.2
Fix Version/s: 1.2.6, 1.4.4, 1.5.1

Type: New Feature Priority: Minor
Reporter: David Hill (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: beginner-friendly

Sprint: 2020-1, 2020-2, 2020-3, 2020-4, 2020-5

 Description   

Customer request:

If the OS flushes /tmp on reboot, Have the installer setup the proper tempfiles.d so the directory gets created when the system starts, to ensure the functions that use /tmp/<blah> will work when ColumnStore tries to use them.

An alternate method of having ColumnStore create the dir if it does not exist may not be sufficient as privileges must be granted for programs to be run by other than root.

Also add to docs that if running programs as other than root, one may need to add an entry to /etc/tempfiles.d/ to get the directory created with proper permissions for that user to successfully execute colxml, cpimport, etc..

Since you do not know what user a customer may run such programs as, this will likely continue to be a problem in the future.



 Comments   
Comment by David Hall (Inactive) [ 2020-01-06 ]

Would not startup code need root access to create the tmp dir on some machines?

Comment by Andrew Hutchings (Inactive) [ 2020-01-07 ]

For RPM/DEB that would be easy during the postinst script. For non-root we would probably use /usr/local/mariadb/columnstore/tmp or something like that.

Comment by Gagan Goel (Inactive) [ 2020-01-31 ]

"columnstore start" already creates the temp dir which is in the SystemTempFileDir value in the config file. This is /tmp/columnstore_tmp_files for root user and $HOME/.tmp for non-root user.

Comment by David Hill (Inactive) [ 2020-02-07 ]

The issue isnt that the tmp directories arent being created, its that the tmp directory for root user is only writeable by root user. Customer is running some commands as non-root user, which is allowed, and the nonroot user is getting an error writing into the root user install /tmp area. The BUG request to to setup /tmp for columnstore to allow all users to write to it.

Comment by Gagan Goel (Inactive) [ 2020-02-10 ]

Patches submitted in the 3 respective branches.

Comment by Daniel Lee (Inactive) [ 2020-03-17 ]

Build verified: 1.2.6-1 BB

engine commit:
d4173ef

Build verified: 1.5.0-1 BB

engine commit:
f01185f

1.4.4 is not yet available from buildbot.

/tmp/columnstore_tmp_files directory permission has been set to 777.

Comment by Daniel Lee (Inactive) [ 2020-03-19 ]

Build verified: 1.4.4.-1 source

/root/ColumnStore/buildColumnstoreFromGithubSource/server
commit 86a634a0feaf7788c9bcf7cc763e500d2be97d75
Author: Sergei Golubchik <serg@mariadb.org>
Date: Fri Feb 28 21:55:32 2020 +0100

Revert "make columnstore maturity gamma"

This reverts commit e4a0372cd08a53f97a62d6b6ef32114b553cacb7.

/root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
commit ca3e2d78d6e1d06fb6711befe7bb2d618e801929
Merge: ec3630d f437152
Author: Patrick LeBlanc <43503225+pleblanc1976@users.noreply.github.com>
Date: Thu Mar 19 11:43:55 2020 -0500

Merge pull request #1113 from pleblanc1976/develop-1.4

Bumped version num to 1.4.4-1

Generated at Thu Feb 08 02:33:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.