[MCOL-4866] /tmp/columnstore_tmp_files can be owned by root when CS is clustered Created: 2021-09-14  Updated: 2023-03-23  Resolved: 2023-02-22

Status: Closed
Project: MariaDB ColumnStore
Component/s: cpimport
Affects Version/s: 5.6.2
Fix Version/s: 23.02.1

Type: Bug Priority: Blocker
Reporter: Edward Stoever Assignee: Alan Mologorsky
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MCOL-5242 DiskJoinStep::joinFcn() Disk join cou... Closed

 Description   

I am getting this error:

2021-09-14 08:27:28 (2763) INFO : Running distributed import (mode 1) on all PMs...
writeenginesplit[2763]: 28.568250 |0|0|0| I 33 CAL0000: Send EOD message to All PMs
writeenginesplit[2763]: 28.613584 |0|0|0| E 33 CAL0000: Received a Cpimport Failure from PM1
2021-09-14 08:27:28 (2763) ERR  : Received a Cpimport Failure from PM1
writeenginesplit[2763]: 28.613718 |0|0|0| E 33 CAL0087: BulkLoad Error: Received a Cpimport Failure from PM1
2021-09-14 08:27:28 (2763) INFO : Please verify error log files in PM1
2021-09-14 08:27:28 (2763) INFO : Canceling outstanding cpimports
writeenginesplit[2763]: 28.813513 |0|0|0| I 33 CAL0098: Received a Cpimport Pass from PM2.
writeenginesplit[2763]: 28.907437 |0|0|0| I 33 CAL0000: Released Table Lock
2021-09-14 08:27:28 (2763) INFO : Table inventory.products: (OID-3000) was NOT successfully loaded.
2021-09-14 08:27:28 (2763) INFO : Bulk load completed, total run time : 0.411774 seconds

On the second node of my two node cluster, I see that the directory for temporary files is owned by root.

root@cs2:~$ ls -ld /tmp/columnstore_tmp_files/
drwxr-xr-x 3 root root 4096 Sep 14 08:18 /tmp/columnstore_tmp_files/

This is a new install. The cpimport command was run once successfully. The nodes were rebooted, then this happened on a second attempt to run cpimport.

Possible solution: chown mysql:mysql; chmod -R 777
can be included in the programming of cpimport.



 Comments   
Comment by Edward Stoever [ 2021-09-14 ]

I have seen this twice now. It happens when the second node is rebooted. I see this:

drwxr-xr-x 3 root root 4096 Sep 14 16:29 columnstore_tmp_files

The OS is Debian Linux.
Node 1 of 2 does not have this problem. It was rebooted and it looks good:

drwxr-xr-x 5 mysql mysql  4096 Sep 14 16:30 columnstore_tmp_files

Comment by Edward Stoever [ 2022-12-06 ]

Here is the solution:

echo 'd /tmp/columnstore_tmp_files 0755 mysql mysql' > /etc/tmpfiles.d/columnstore_tmp_files.conf

Then, when the server is rebooted, the directory exists with the correct ownership.
Tested on debian and centos. ㋡ neat!

Comment by Daniel Lee (Inactive) [ 2023-02-22 ]

Build verified: develop branch
engine: e6127ab9bc3b8bfb5916bb57b2f5a1f3641fae61
server: 1c8bc55d8fadfeefaf7fbaabd04a0929481a5381
buildNo: 6871
Reproduced the issue in 22.08.2 and verified the in the build mentioned above.

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