Troubleshooting
Why a Kubernetes liveness probe interrupts the InfluxDB upgrade
Short answer
The upgrade was not killed by volume size: the log shows the disk check passing with 63 GB free against 45 GB required, and a debug run shows no application error. A Kubernetes liveness probe with a too-short failure window restarted the container mid-migration. Give the migration a startup probe or a probe-free Job, size the window from a timed run, and validate the data before writers reconnect.

On this page
Your InfluxDB 1.8 to 2.7 upgrade is not running out of disk, and the application itself is not failing. The log shows the capacity check passing, the 2.x target metadata store opening and the database-to-bucket mapping being created, and even the debug run ends with no critical entry. The container is being stopped from outside: under Kubernetes, a liveness probe whose failure window is shorter than the migration restarts the container on every attempt, and the upgrade wrapper then logs the bolt and engine cleanup warning you see. The 10 GB database succeeded only because its migration finished inside that window. The fix is a startup window sized to the migration, confirmed against the pod's termination record, plus a data check before any writer reconnects.
What the log sequence proves #
The output is the upgrade's own progress report, and it clears the volume. Read the entries as stages:
Config file upgraded.— the 1.x configuration at/etc/influxdb/influxdb.confwas converted to/etc/influxdb2/config.toml.Resources openedfor the bolt service at/var/lib/influxdb2/influxd.bolt— the 2.x target metadata store was created and opened.Bringing up metadata migrationswithmigration_count20 — the metadata schema steps ran against the new target.CLI config has been stored.at/etc/influxdb2/influx-configs— the CLI setup step completed.Computed disk spacewith 63 GB free against 45 GB required — the capacity check passed, with 18 GB of headroom.Upgrading databasesand thenCreating mapping— the run reached the database-to-bucket mapping, the last stage before the data copy.
A volume problem stops an upgrade at the capacity check with an explicit error, not after it. The required figure does grow with the dataset, because the 2.x engine writes its own copy of every point — what one Telegraf point really costs on InfluxDB disk shows the per-point arithmetic — but at the moment of this log the requirement was satisfied.
The cleanup warning is a receipt, not the fault #
cleaning bolt and engine files to prevent conflicts on retry is logged by the Docker upgrade wrapper, not by the database engine. When the upgrade process is interrupted, the wrapper removes the partially written target — the bolt file at /var/lib/influxdb2/influxd.bolt and the engine directory at /var/lib/influxdb2/engine — so the next attempt does not collide with half-finished files. The 1.x source, /var/lib/influxdb/volume/meta and /var/lib/influxdb/volume/data, is read-only input to the run, and the cleanup never touches it.
The debug run is the second piece of evidence. With INFLUXD_LOG_LEVEL set to debug, the output still ended at completed metadata events with no critical entry. A process that fails on its own logs the fault; a process that is told to stop leaves no application error at any logging level. Silence at debug is what an external termination looks like.
Confirm the kill in the pod's record #
Before changing any probe, read the workload's own account of the death:
- The container's restart count and its last terminated state: reason, exit code and termination time.
- The event stream in the minutes before that time: probe-failure entries and the restart they trigger.
- Every other terminator: a memory-limit kill, an eviction, a node drain or a rollout that replaced the pod.
A dashboard showing low CPU and RAM does not clear a memory-limit kill; the recorded termination reason does. Probe failures immediately before the restart time confirm this diagnosis. A memory-limit reason instead means the probe is innocent and the limit is the fix. If no termination record exists at all, the fault is back in the application.
Match the probe window to the kill time #
The log timestamps give the container's lifetime. The first entry carries ts 1708447564, a Unix time equal to 2024-02-20T16:46:04 UTC, and the cleanup warning is stamped 2024-02-20T16:47:33. The upgrade process therefore lived 89 seconds (16:47:33 - 16:46:04 = 1 min 29 s).
Now run the same arithmetic on your own probe. Example values, not platform defaults: an initial delay of 60 seconds, a check interval of 10 seconds and a failure threshold of 3 produce a kill about 60 + 3 x 10 = 90 seconds after container start, within a second of the lifetime above. When your probe's window lands on the kill time like that, the probe is the trigger.
Note what kind of failure this is: during the upgrade the process does not open the service port, so every check is refused instantly. A longer per-check timeout does nothing for a port that is not listening; the fix is to postpone liveness, not to stretch it.
Give the migration a startup window #
Kubernetes' probe contract, in plain words: a liveness probe that keeps failing past its threshold gets the container restarted, and it knows nothing about upgrade progress. Two clean fixes follow:
- Run the upgrade as a one-off Job with no liveness probe at all. Nothing restarts it; it either finishes or logs a real error.
- If it must stay in the serving workload, add a startup probe for the migration and let liveness begin only after startup succeeds. Liveness checks are deferred until the startup probe passes, which is exactly the semantics an upgrade needs.
Size the window from a measurement, not from the failed runs: they were killed early, so they only bound the duration from below. The one real datapoint is the successful 10 GB run. Time one uninterrupted attempt with the probe removed, then set the startup allowance — initial delay plus failure threshold times interval — to at least twice that measured duration; a dataset several times larger takes roughly proportionally longer.
Before the retry, take a recoverable copy of the 1.x data: stop writes and copy or snapshot both the meta and data directories, record a few baseline queries on known tags over old and recent ranges, and keep the source volume until acceptance passes. The wrapper's cleanup already removed the partial target, so the retry starts clean.
Accept the data before writers reconnect #
When the run completes and the service answers, do not point Telegraf or your historians at 2.7 yet. Query known tags across old and recent time ranges and compare against the recorded baseline; the latest reading alone can hide a partial historical migration. Compare query results rather than raw row counts, which depend on the retention mapping into buckets. If the in-place upgrade still fails after the probe fix, the annotated CSV migration between two Docker hosts moves the history without the upgrade path.
The decision by case #
- The log stops after
Creating mappingwith the cleanup warning, the debug output shows no application error and the events show liveness failures: the probe is the killer. Apply the startup window and retry, and leave the volume alone — the capacity check passed with headroom to spare. - The termination reason is a memory limit or an eviction: fix that resource first; no probe setting will save the run.
- The capacity check itself fails, with the requirement above the free space: the one case where the volume is the fault. Add space or shrink the dataset, since the requirement scales with the data.
- The migration completes: validate against the baseline, keep the 1.x volume until the data is accepted, then switch the writers over and retire the old instance.
Questions asked
Why did the same upgrade succeed on a 10 GB database?
The smaller dataset finished its copy before the failure threshold was reached, so the service came up in time. That success proves the command, mounts and permissions are correct; it says nothing about whether the window fits a larger migration. Time that good run and scale the allowance with the data volume: several times the data takes several times the time.
Does the cleanup warning mean migrated data was deleted?
Only the partial 2.x target: the new bolt database and the engine directory. The 1.x source directory is read-only input to the upgrade and is never cleaned, so nothing irreplaceable is lost and the retry rebuilds the target from scratch. Deleting the 1.x volume before the migrated data passes acceptance is the one irreversible mistake to avoid.
Why not simply raise the liveness probe timeout?
Because the checks are refused, not slow. The upgrade process never opens the service port, so each check fails immediately and a longer per-check timeout changes nothing. What helps is postponing liveness with a startup probe, or running the upgrade as a Job with no probe. Raise the per-check timeout only when the port is listening and answers too slowly.
Is it safe to retry after the cleanup warning?
Yes. The wrapper removed the partial target precisely so the next attempt starts clean, and the 1.x source was not modified. Take a recoverable copy of the 1.x data first, apply the startup window, then run again. If the second attempt is also interrupted, compare its kill time with the new window: a match means the allowance is still too short.


