Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.6.14
-
None
Description
We have seen the following error couple of times on our mariadb galeracluster replications on the replication target host:
Slave SQL: Error 'Warning: Can't copy ownership for file './data/viewname.frm-' (Errcode: 1 "Operation not permitted")' on query. Default database: 'data'. Query: 'CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`username`@`%` SQL SECURITY INVOKER VIEW `viewname` AS SELECT someFields...
Everything else works fine, but sporadically we see these errors, and then replication stops and needs to be started from scratch.
The pod is running as non-root user 1001.
As a workaround I am thinking about simply not replicating any view specific modifications. But preferably, of course, the bug would be fixed in mariadb.
We are doing the same tasks on more than 30 different galeraclusters. We have seen this problem on only 3 of these. On these three databases the concerned table, for which the view should be update, is particularly large, it has more than a milion rows there.
(we have not tested it on more recent mariadb versions yet, but will do)
sorry, I think I just found the origin of this problem in my replication initialization script: The databases of the replication targets have initially been copied using mariabackup, and after the mariabackup --prepare step there was a chown -R 1001 /bitnami which left all files owned by 1001.root - and this ownership can certainly not be copied by the non-root user 1001.
Fixing it with a script change into chown -R 1001.1001 /bitnami
This issue can be closed.