influxdata / ui

UI for InfluxDB
92 stars 41 forks source link

Changing retention to "forever" in UI does not work #1607

Open lukasbrun opened 3 years ago

lukasbrun commented 3 years ago

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Open the InfluxDB Web GUI
  2. Create a bucket with limited retention time, e.g. 30 days
  3. Edit the bucket and set Delete Data to "Never"

Expected behavior: The retention of the bucket is changed to "forever"

Actual behavior: The retention of the bucket is unchanged

Environment info:

lukasbrun commented 3 years ago

Using the browser dev tools, i found that the HTTP PATCH request to update the bucket seems to be incorrect grafik

Workaround: Manually change the request to include the following: grafik

danxmoran commented 3 years ago

Transferring this to the UI repo since it looks like a bug there.

sgoll commented 1 year ago

I can confirm that this is still a problem in the latest release 2.6.1.

Basti2506 commented 1 year ago

I have the same problem with release 2.6.1. @sgoll: Could you solve the problem with the Workaround of lukasbrun? Unfortunately I have no experience with dev tools.

n0valis commented 1 year ago

Do you use iobroker or something similarly with an influxdb adapter?

Basti2506 commented 1 year ago

Hi yes I use ioBroker with influxdb.

n0valis commented 1 year ago

Check the standard settings of your influx instance. There is a setting for retention policy which overwrites the settings you apply in influxdb dataexplorer.

Basti2506 commented 1 year ago

Great it works. Thanks.

wiedld commented 1 year ago

Already fixed. Closing.

lukasbrun commented 1 year ago

The original issue still persists in InfluxDB v2.6.1, https://github.com/influxdata/ui/tree/5ba8e15 @wiedld Can you reopen the issue?

wiedld commented 1 year ago

@lukasbrun -- this may be due to the InfluxDB release not yet taking in the fix. Will check.

wiedld commented 1 year ago

Confirmed this is a difference in how the cloud2 platform versus oss treats a "never" policy. Cloud2 treats null == never, whereas oss is explicitly defining a never policy. The UI is sending a payload which matches expectations for cloud2.

Re-opening issue.

jeffreyssmith2nd commented 1 year ago

Cloud2 treats null == never

After thinking about this more, I don't think this is good behavior. This means if you update anything else on a bucket and don't set the retention, you get unexpected behavior. This is easily seen on a PAYG account by trying to update a bucket's description influx bucket update -i <id> -d newdescription will fail with a 403 due to the retention period "exceeding" the expected amount.

If OSS was updated with the same behavior, users would silently have their retention changed which could lead to disk out of space errors, etc. I think it makes more sense for the UI to explicitly send a retention rule with a seconds of 0 and shard group of the default.

wdoconnell commented 1 year ago

FYI @jeffreyssmith2nd - jumping in here for updates while Denise is out. I'll give the thread a review.

dzieciou commented 8 months ago

Wow, two years later and this is still not closed...

ahengst commented 5 months ago

I found this thread while experiencing the issue in OSS 2.7.4 : I can set bucket retention to any finite value, or a different value, or (custom) 100 years as a workaround, but I cannot (re) set the retention to Never. Issue is currently Open so I'll just carry on and leave this message. When attempting 'Never' retention: a green "...was successfully updated" appears at the top right corner. Not good!

ahengst commented 5 months ago

Same behavior (buggy) also in latest OSS 2.7.5 when attempting to set bucket retention to delete Never.

traceyflanders commented 4 months ago

open source open sad