influxdata / influxdata/influx-cli

Failure during `influx setup` can leave system in an inconsistent state

Open
#180 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
75
Forks
22
PR merge metrics
No merged PRs in 30d

Description

`influx setup` isn't idempotent: if it fails after the CLI sends an onboarding request to the server, subsequent runs will fail with an "instance has already been set up" error.

The only thing the CLI does after the onboarding request is write a config file. We could potentially log/print the config contents on error (though it includes an auth token, so that could be a security risk).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the `influx setup` onboarding request and the subsequent config-file write, focusing on the error path between them. Determine a safe recovery or retry behavior that avoids exposing the auth token; done means a failed setup can be recovered from without an "instance has already been set up" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.