[MCOL-4328] New segments files created as the result of bulk insertion with cpimport belongs to root Created: 2020-09-28 Updated: 2021-09-17 Resolved: 2020-10-09 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | cpimport |
| Affects Version/s: | 1.5.3 |
| Fix Version/s: | 5.4.1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Roman | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The files created by bulk insertions with cpimport belongs to root so any read operations fails making tables unusable. |
| Comments |
| Comment by Roman [ 2020-10-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Plz review. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-10-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Plz review. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-10-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4 QA. One can use 866 build before the nightly will be available. cpimport/.bin now has an additional option to set segment and dictionary files owner -U. mysql is the owner by default. All auxilary files, e.g. .job and .log files belongs to the user that runs cpimport. One can run cpimport/.bin using a non-privileged user,e.g. mysql but this operation mode puts an additional requirenment, non-privileged user must have privileges to create files in cwd of the cpimport. To test this issue one should upload data set with cardinality >= 16,000,000 records couple times to test that created files and directories belongs to mysql. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.4.1-1 (Drone #868) cpimport mode 2 also not working I executed the following cpimport using root root from PM1. [centos8:root~]# /usr/bin/cpimport -m 2 mytest lineitem -l lineitem.tbl err.log entries this is in the err.log file: Oct 5 19:04:47 centos-8 cpimport.bin[6700]: 47.651458 |0|0|0| E 34 CAL0087: BulkLoad Error: Error gaining r/w access to import path .: Permission denied Logged as root user, all directories in the following path: In /var/lib/columnstore, I did "chmod -R 777 data", cpimport still failed. I noticed cpimport.bin on remote nodes runs under the mysql user. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.4.1-1 (Drone #868) As reported by another engineer, cpimport on a cluster using S3 failed. It failed on both single and multi -node stacks. [centos8:root~]# /usr/bin/cpimport mytest lineitem /data/qa/source/dbt3/1g/lineitem.tbl err.log [centos8:root~]# cat err.log | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-10-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4QA Mode 2 works for me. It is important to explicitly set a source directory that is owned by mysql user on all remote nodes. Here is the example if cpimport command and /data belongs to mysql user. /data/output1.txt is the source file. This must be documented for sure.:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Your test case is a bit different from mine. I did not specify the -f option so the default directory (/var/lib/columnstore/data/bulk/data/import) was used. The mysql does not have access to /var/lib. Therefore, even I granted permission from ./columnstore and down, cpimport still would fail. I did verify your test case and it worked. If -f is required, we will need to document that. Also change the Example4 in the help text to include the -f option. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please see may comments Also it has the S3 issue. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.4.1-1 (Drone #495) Single node Single node with S3 Multi-node (3PM), cpimport mode 2 Multi-node (3PM), cpimport mode 2, -f option This is has been reported in Drone build #868 and it still exist in this build. [centos7:root~]# /usr/bin/cpimport -m2 mytest lineitem -l lineitem.tbl err..og Oct 8 21:27:38 localhost cpimport.bin[15166]: 38.851141 |0|0|0| E 34 CAL0087: BulkLoad Error: Error gaining r/w access to import path .: Permission denied | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-10-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4QA Now mode 2 calls for an explicit -f option. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-10-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.4.1-1 ( Drone #904 ) Verified on a 3PM cluster on Centos 8 [centos8:root~]# /usr/bin/cpimport -m2 mytest lineitem -l lineitem.tbl [centos8:root~]# /usr/bin/cpimport -m2 mytest lineitem -f /tmp -l lineitem.tbl Also tested on modes 1 and 3, as well as no mode specified, defaulted to mode 1 |