Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI - Telegrafs] Create telegraf transaction fails to create special label #15730

Closed
karel-rehor opened this issue Nov 4, 2019 · 2 comments · Fixed by #16204
Closed

[UI - Telegrafs] Create telegraf transaction fails to create special label #15730

karel-rehor opened this issue Nov 4, 2019 · 2 comments · Fixed by #16204

Comments

@karel-rehor
Copy link
Contributor

Steps to reproduce:
From the Load Data > Telegrafs page

  1. Click Create Configuration
  2. Choose a bucket and a plugin (Have been using Docker but issue also appears with others)
  3. Click continue
  4. Configure the plugin
  5. Add a name and description
  6. Click Create and Verify

Expected behavior:
If all values are correct expect to see a notification that the Configuration was Successfully saved

Actual behavior:
An error notification appears. "Failed to save configurations"
The console log shows

 POST http://localhost:9999/api/v2/labels 422 (Unprocessable Entity)

Which is also shown in the network log

Request URL: http://localhost:9999/api/v2/labels
Request Method: POST
Status Code: 422 Unprocessable Entity
Remote Address: [::1]:9999
Referrer Policy: no-referrer-when-downgrade

Payload sent looked like

{"orgID":"72548c12d87a9727","name":"@influxdata.token","properties":{"color":"#FFFFFF","description":"token for telegraf config: asdf","tokenID":"04b9730246697000"}}

Note that when creating labels directly there is no tokenID in the properties.

Also can click to another area of the UI and then return to Load Data > Telegrafs and the configuration is present.

Screencast

TelegrafLabel01

Environment info:

  • System info: Run uname -srm and copy the output here
Linux 4.4.0-166-generic x86_64
  • InfluxDB version: Run influxd version and copy the output here
    Working with nightly build docker image. From docker log:
ts=2019-11-04T08:41:47.008799Z lvl=info msg="Welcome to InfluxDB" log_id=0IuP4e00000 version=nightly commit=2d6d38179 build_date=2019-11-04T07:21:10Z
  • Other relevant environment details: Container runtime, disk info, etc
    browser: Chrome 77

Config:
Copy any non-default config values here or attach the full config as a gist or file.
Started with e2e-testing enabled

--e2e-testing=true
@karel-rehor
Copy link
Contributor Author

Looking at this issue a second time. This seems to be occurring only after the initial telegraf is created. In other words it occurs when creating a second or third telegraf.

latest build

ts=2019-11-13T08:54:53.420486Z lvl=info msg="Welcome to InfluxDB" log_id=0J4~P_w0000 version=nightly commit=f0ecc0e89 build_date=2019-11-13T07:27:37Z

@russorat
Copy link
Contributor

To fix this, we need to remove the automatic token creation for telegraf configs in the ui, and add the ability for the user to select a token to use. We should show the list of tokens that have the right permissions. If no token exists, we should allow the user to create a new one (one click).

We should also run a migration to remove all the labels that "connect" the tokens to the telegraf configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants