minio / minio

MinIO is a high-performance, S3 compatible object store, open sourced under GNU AGPLv3 license.
https://min.io/download?license=agpl&platform=linux
GNU Affero General Public License v3.0
48.5k stars 5.54k forks source link

`initFederatorBackend` doesn't clean-up stale entries. #8051

Closed maihde closed 5 years ago

maihde commented 5 years ago

The initFederatorBackend adds new buckets to the global DNS on startup; but if a bucket is removed while MinIO is stopped it doesn't remove the bucket. This can leave stranded entries in etcd that show up but cannot be deleted using the S3 API. This is because handlers associated with removing the bucket.

Expected Behavior

In federated mode, MinIO cleans up DNS entries that are associated with it but no longer exist.

Current Behavior

Buckets that have been removed while the MinIO server is stopped remain in DNS and cannot be deleted via the S3 API.

Possible Solutions

Steps to Reproduce (for bugs)

  1. Start two MinIO servers in federated mode
  2. Create a bucket on one of the server
  3. Stop the MinIO server
  4. Remove the directory associated with the bucket
  5. The bucket will still show up in the web browser list on the left and via mc ls
  6. Attempting to delete the bucket in the web browser or via mc will throw an error that The specified bucket does not exist which is true; but the bucket remains in the list.
harshavardhana commented 5 years ago

Can you send the prototype solution?