chaos-mesh: Wrong permission for iochaos mountpoint

Bug Report

What version of Kubernetes are you using?

v1.15.7

What did you do?

In container, there is a process running as “clickhouse” user, when kubectl exec -it chi1-events-0-0-0 bash to container, it would be as root user. When I try to injest iochaos, it will create new files as root user instead of “clickhouse”, which lead to process in container can’t write and read file in mount point.

What did you expect to see?

“tmp_fetch_20201224_0_0_0” file should follow permission as file “format_version.txt”

What did you see instead?

root@chi1-events-0-0-0:/# ls -lah /var/lib/__chaosfs__clickhouse__/data/sherlockio/sherlock_test/

drwxr-x---  2 clickhouse clickhouse 4.0K Dec  4 06:02 detached

-rw-r-----  1 clickhouse clickhouse    1 Dec  4 06:02 format_version.txt

drwxr-x---  2 root       root       4.0K Dec 24 08:35 tmp_fetch_20201224_0_0_0

Output of chaosctl

Not necessary as iochaos injected successfully.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Hi @liwanxue, I think I had reproduced a similar issue:

I inject IOChaos before create database and table, the directory /var/lib/clickhouse/metadata/sherlockio has wrong permission.

root@clickhouse01:/var/lib/clickhouse/metadata# ls -alh
total 8.0K
drwxr-x---. 1 clickhouse clickhouse  96 Dec 30 06:02 .
drwxr-xr-x. 1 clickhouse clickhouse 204 Dec 30 05:59 ..
drwxr-x---. 1 clickhouse clickhouse   0 Dec 30 05:59 default
-rw-r-----. 1 clickhouse clickhouse  42 Dec 30 05:59 default.sql
drwxr-x---. 1 root       root         0 Dec 30 06:02 sherlockio
-rw-r-----. 1 clickhouse clickhouse  45 Dec 30 06:02 sherlockio.sql
drwxr-x---. 1 clickhouse clickhouse   0 Dec 30 05:59 system

I am working on this. 😁