influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

[2.x oss] Bucket retention policy doesn't change back to "never"

Open monsieurhannes opened this issue 3 years ago • 9 comments

Hi, when I want to change bucket with a set retention time to a bucket with no retention policy it won't change (that's for the UI). The documentation also doesn't show a solution for the CLI.

Steps to reproduce:

  1. Create a bucket with a retention time of e.g. 7 days in the UI
  2. Change the bucket's retention time to "Never" image
  3. Save Changes.

Expected behavior: The retention time changes to "Forever", like in the case of buckets that are created without a retention time.

Actual behavior: Nothing happens, the previous retention time remains active.

Environment info: InfluxDB 2.0.8 Server: e91d418 Frontend: cb0a87e

monsieurhannes avatar Jan 11 '22 13:01 monsieurhannes

You can use 0s as the duration in the CLI. I tested it with a test bucket. This problem should still be solved though. And the workaround documented.

LarsStegman avatar Apr 12 '22 13:04 LarsStegman

I see the same issue in UI when changing bucket's retention time. I fixed fixed my issue in CLI with: influx bucket update -id <ID> --retention 0 --token <TOKEN> to set the retention to infinite. Like @LarsStegman shared this needs to be fixed in the UI indeed.

Environment info: Influx CLI 2.2.1 (git: 31ac783) build_date: 2021-11-09T21:24:22Z

neptunus0001 avatar Apr 14 '22 18:04 neptunus0001

This is still a problem as of influxdb v 2.6.1. Changing it in the CLI does work as noted above. But failing to silently change the retention time caused me to lose data(I thought it was set to never delete). This UI bug should be fixed and it's been a year since it's been reported.

cheetahfox avatar Mar 04 '23 20:03 cheetahfox

This issue is being discussed/tracked here.

jeffreyssmith2nd avatar Mar 06 '23 14:03 jeffreyssmith2nd

another report of the same

  • https://github.com/influxdata/influxdb/issues/25467

philjb avatar Oct 16 '24 15:10 philjb

still there in 2.7.10-1

wolfgangr avatar Oct 16 '24 21:10 wolfgangr

For anyone who uses SSL, you need to add --host flag for the influx CLI, reference here

influx bucket update --id <ID> --retention 0 --token <TOKEN> --host https://localhost:8086 --skip-verify

Error Message: Error: failed to update bucket "": Patch "http://localhost:8086/api/v2/buckets/###"

liam-ng avatar Oct 24 '24 22:10 liam-ng