Chasing MinIO Bug in Replication - cniackz/public GitHub Wiki
Objective:
To find out in which commit of MinIO replication deletion rules got broken.
Steps:
- Pick the commit:
commit d37e51473320f2ae603044f67977336e75f59c10 (HEAD -> master)
Author: Poorna <[email protected]>
Date: Wed Dec 14 03:24:06 2022 -0800
Cleanup remote targets automatically on replication config removal. (#16221)
- Set the version:
git reset --hard commit-id
- Compile
make
- Execute MinIO
MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 ./minio server /Volumes/data{1...4} --address :9000 --console-address :9001
- Create a Replication Rule:
- Delete the replication Rule:
- Refresh screen, rule deleted but api returned 500:
- mc trace on failure
$ mc admin trace -a --funcname admin* --funcname s3* myminio/
2022-12-15T12:00:19.470 [200 OK] s3.GetBucketLocation 127.0.0.1:9000/bucket-a/?location= 127.0.0.1 1.244ms โ 98 B โ 128 B
2022-12-15T12:00:19.472 [200 OK] s3.GetBucketReplicationConfig 127.0.0.1:9000/bucket-a/?replication= 127.0.0.1 402ยตs โ 98 B โ 637 B
2022-12-15T12:00:19.473 [200 OK] s3.DeleteBucketReplicationConfig 127.0.0.1:9000/bucket-a/?replication= 127.0.0.1 15.861ms โ 98 B โ 0 B
2022-12-15T12:00:19.490 [404 Not Found] admin.RemoveRemoteTarget 127.0.0.1:9000/minio/admin/v3/remove-remote-target?arn=arn%3Aminio%3Areplication%3A%3Ab482c48d-b797-4dac-9be4-be6289bd55d6%3Abucket-b&bucket=bucket-a 127.0.0.1 223ยตs โ 98 B โ 246 B
- mc trace when working
$ mc admin trace -a --funcname admin* --funcname s3* myminio/
2022-12-15T12:04:53.190 [200 OK] s3.GetBucketLocation 127.0.0.1:9000/bucket-a/?location= 127.0.0.1 682ยตs โ 98 B โ 128 B
2022-12-15T12:04:53.192 [200 OK] s3.GetBucketReplicationConfig 127.0.0.1:9000/bucket-a/?replication= 127.0.0.1 958ยตs โ 98 B โ 637 B
2022-12-15T12:04:53.193 [200 OK] s3.DeleteBucketReplicationConfig 127.0.0.1:9000/bucket-a/?replication= 127.0.0.1 23.448ms โ 98 B โ 0 B
2022-12-15T12:04:53.217 [204 No Content] admin.RemoveRemoteTarget 127.0.0.1:9000/minio/admin/v3/remove-remote-target?arn=arn%3Aminio%3Areplication%3A%3A542e079f-0b0c-4b61-b739-f37d631a427f%3Abucket-b&bucket=bucket-a 127.0.0.1 2.444ms โ 98 B โ 0 B
2022-12-15T12:04:53.230 [200 OK] s3.GetBucketLocation 127.0.0.1:9000/bucket-a/?location= 127.0.0.1 290ยตs โ 98 B โ 128 B
2022-12-15T12:04:53.231 [404 Not Found] s3.GetBucketReplicationConfig 127.0.0.1:9000/bucket-a/?replication= 127.0.0.1 252ยตs โ 98 B โ 322 B