s3gw-tech / s3gw

Container able to run on a Kubernetes cluster, providing S3-compatible endpoints to applications.
https://s3gw.tech
Apache License 2.0
130 stars 20 forks source link

[BUG]: With administration enabled, duplicate buckets are listed when the same name is used after the delete operation #603

Open Ameenasuhani opened 1 year ago

Ameenasuhani commented 1 year ago

Describe the bug A clear and concise description of what the bug is. With administration enabled, duplicate buckets are listed when the same name is used after the delete operation

To Reproduce Steps to reproduce the behavior:

  1. Go to UI and enable administration
  2. Add bucket e2ebucket and delete bucket e2ebucket multiple times and reload/refresh the page
  3. Duplicate buckets are listed

Expected behavior A clear and concise description of what you expected to happen. Only one bucket should be listed

Screenshots If applicable, add screenshots to help explain your problem. Screencast from 2023-07-03 13-17-12.webm

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

votdev commented 1 year ago

Indeed, it seems the Admin Ops API returns the bucket several times, e.g.

[
   {
      "bucket":"test01",
      "num_shards":1,
      "tenant":"",
      "zonegroup":"",
      "placement_rule":"default",
      "explicit_placement":{
         "data_pool":"",
         "data_extra_pool":"",
         "index_pool":""
      },
      "id":"test01.1688375876621271065",
      "marker":"test01.1688375876621271065",
      "index_type":"Normal",
      "owner":"testid",
      "ver":"",
      "master_ver":"",
      "mtime":"0.000000",
      "creation_time":"2023-07-03T09:17:56.621271Z",
      "max_marker":"",
      "usage":{

      },
      "bucket_quota":{
         "enabled":false,
         "check_on_raw":false,
         "max_size":-1,
         "max_size_kb":0,
         "max_objects":-1
      }
   },
   {
      "bucket":"test01",
      "num_shards":1,
      "tenant":"",
      "zonegroup":"",
      "placement_rule":"default",
      "explicit_placement":{
         "data_pool":"",
         "data_extra_pool":"",
         "index_pool":""
      },
      "id":"test01.1688375876621271065",
      "marker":"test01.1688375876621271065",
      "index_type":"Normal",
      "owner":"testid",
      "ver":"",
      "master_ver":"",
      "mtime":"0.000000",
      "creation_time":"2023-07-03T09:17:56.621271Z",
      "max_marker":"",
      "usage":{

      },
      "bucket_quota":{
         "enabled":false,
         "check_on_raw":false,
         "max_size":-1,
         "max_size_kb":0,
         "max_objects":-1
      }
   }
]
jhmarina commented 1 year ago

We will review this once we've rebased

jecluis commented 7 months ago

likely related to #139