influxdata / influxdata/helm-charts
Influx started from helm does not show data of migrated database
- Dominant language
- Mustache
- Stars
- 257
- Forks
- 347
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
I recently upgraded my influx 1.8 to influx 2.2. I used the way described in the documentation:
- Mount the v1 data to `/var/lib/influxdb`
- Mount a empty v2 data directory to `/var/lib/influxdb2`
- Start the container with the env variable `DOCKER_INFLUXDB_INIT_MODE=upgrade`
The data is upgraded and when the migration is finished I can access the new data just fine. I then sopped the migration container and configured the helm chart to use the newly created v2 data pvc. The container did start and I can see the buckets, but I don't see any measurements. The error I received was:
```
error="panic: runtime error: invalid memory address or nil pointer dereference" stacktrace="goroutine 1605 [running]:\nruntime/debug.Stack()\n\t/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/influxdata/flux/execute.(*executionState).recover(0xc001886000)\n\t/go/pkg/mod/github.com/in
```
I checked everything and after I compared the configuration of the migration container to the container startet with helm, I saw that the setting `engine-path` differs. In the helm chart container it is set to `/var/lib/influxdb2` and in the migration container it is set to `/var/lib/influxdb2/engine`. After adding a new environment variable to my `values.yaml` likes this everything was working:
```
env:
- name: INFLUXD_ENGINE_PATH
value: /var/lib/influxdb2/engine
```
What makes me wonder: If the migration container from to official docker image creates the engine folder under `/var/lib/influxdb2/engine` it might be, that the configuration in this helm chart is wrong?
So in `statefulset.yaml` it is right now:
```
# Path to persistent storage engine files where InfluxDB stores all Time-Structure Merge Tree (TSM) data on disk.
- name: INFLUXD_ENGINE_PATH
value: {{ .Values.persistence.mountPath }}
```
but it should be:
```
# Path to persistent storage engine files where InfluxDB stores all Time-Structure Merge Tree (TSM) data on disk.
- name: INFLUXD_ENGINE_PATH
value: {{ .Values.persistence.mountPath }}/engine
```
What do you think?
Contributor guide
Research direction
Start with the chart's statefulset.yaml and inspect how .Values.persistence.mountPath is used for INFLUXD_ENGINE_PATH. Compare the rendered Helm manifest with the migration container's configuration and verify the chart uses the migrated engine location. Done means the Helm-started InfluxDB instance exposes the migrated measurements without requiring an extra environment override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100