Description:
Any time fabric is executed as a daemon this problem will pop up.
It happens because any daemon changes the current directory to "/".
However, the user who started fabric may not have the appropriated
permissions there.
The root directory is where fabric will try to create the necessary
files for the sharding operation. Unfortunately, regular users will
not have write permission to it.
This is an old issue that was unfolded now because a daemon is always
created by default.
How to repeat:
1.-Start fabric and create basic ha/shard topology
-bash-4.1$ mysqlfabric dump sharding_information
Fabric UUID: 6da210b4-3c39-41dd-8df8-545da4bbbaf3
Time-To-Live: 1
schema_name table_name column_name lower_bound shard_id type_name group_id global_group version_token_name version_token_value
----------- ---------- ----------- ----------- -------- --------- --------- ------------ -------------------- -------------------
oltp oltp emp_no 1 1 RANGE my_group1 my_group4 mysql_fabric_shard_1 1
oltp oltp emp_no 30001 2 RANGE my_group2 my_group4 mysql_fabric_shard_2 1
oltp oltp emp_no 60001 3 RANGE my_group3 my_group4 mysql_fabric_shard_3 1
2.-Run reet master on all group server and move a shard using shard move
-bash-4.1$ /export/home/tmp/qauser/packages/mysql-advanced-5.7.9-linux-glibc2.5-x86_64/bin/mysql -hviking54 -P13028 --protocol=tcp -ujettestuser1 -pjettestpassword1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3609
Server version: 5.7.9-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> reset master;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
-bash-4.1$ /export/home/tmp/qauser/packages/mysql-advanced-5.7.9-linux-glibc2.5-x86_64/bin/mysql -hviking54 -P13030 --protocol=tcp -ujettestuser1 -pjettestpassword1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3669
Server version: 5.7.9-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> reset master;
Query OK, 0 rows affected (0.02 sec)
-bash-4.1$ mysqlfabric sharding move_shard 1 my_group4
SEV Thr{1632} FabricCommand.doCommand: Errorcode 1 when running fabric script!
stdout: Fabric UUID: b2b964e1-b997-47dd-bc51-e6bc1c86d7d8
Time-To-Live: 1
IOError: [Errno 13] Permission denied: 'MySQL_nanna18_13006.sql'
Workaround: Use the --foreground option when running manage start
Suggested fix:
It is not acceptable to create files in the current directory, there
should be an option that points to a sandbox directory.