influxdata / influxdata/influxdb
influxd upgrade may unintentionally destroy data
- 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. Upgrade from 1.8.x to 2.x on Arch Linux
2. Observe that the upgrade did not actually occur properly
3. Attempt upgrade ` influxd upgrade -m 'pwd' -b primary --config-file /etc/influxdb/influxdb.conf.pacsave -o default --overwrite-existing-v2` from `/var/lib` (pwd is in backticks)
4. Observe that /var/lib is now empty
__Expected behavior:__
An error describing what is about to be wiped is not actually a boltdb
__Actual behavior:__
/var/lib is now empty
__Environment info:__
* System info: `Linux 5.11.4-arch1-1 x86_64`
* InfluxDB version: `InfluxDB 2.0.4 (git: 4e7a59b) build_date: 2021-03-12T20:26:21Z`
* Other relevant environment details: Arch Linux
__Config:__
N/A
Contributor guide
Research direction
Start at the `influxd upgrade` entry point and reproduce the Arch Linux upgrade from `/var/lib` using the command shown in the issue. Trace how the `-m`, `-b`, `--config-file`, and `--overwrite-existing-v2` options determine the target path. Done means an attempted upgrade cannot empty `/var/lib` and clearly reports what would be removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100