influxdata / influxdata/influxdb

Telegrafs - able to create telegraf config with same name

Open
#23,931 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. POST a new telegraf request
2. Using the telegraf config created in step 1 create a new request reusing the same name
3. POST the telegraf request with the duplicate name

__Expected behavior:__
Other resources throw HTTP 422 in response to a new request containing a name already in use. This applies to create and update methods POST and PUT.

__Actual behavior:__
The second telegraf config is created using the same name. HTTP response is 201.

__Environment info:__

Testing against K8S-IDPE remocal

```
commit b013fc31b31fabaf34e62b615ffaa0ebc088d3e2 (HEAD -> master, origin/master, origin/HEAD)
Author: influx-acs[bot] <107396960+influx-acs[bot]@users.noreply.github.com>
Date: Fri Nov 18 21:38:07 2022 +0000

```

__Logs:__
Include snippet of errors in log.

__Performance:__
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.

```sh
# Commands should be run when the bug is actively happening.
# Note: This command will run for ~30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=30s"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz` and `iostat.txt` output files.
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the POST sequence for Telegraf configuration creation described in the issue, then trace the API entry point that handles the request and compare it with other resource create and update methods. Done means a duplicate name is rejected with HTTP 422 and does not create a second configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.