influxdata / influxdata/influxdb

influxdb 2.x Linux package install does not restart on upgrade

Open
#24,926 1 comment 1 reaction 0 assignees View on GitHub
security security/misc
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. install influxdb2 2.7.5 via `apt-get install influxdb2=2.7.5-1`
2. install influxdb2 2.7.6 via `apt-get upgrade`
3. observe in logs that influxdb was not restarted. Must run `sudo systemctl restart influxdb`

__Expected behaviour:__
If influxdb is running when the upgrade starts, influxdb restarts on upgrade, running any migration scripts, etc.

__Actual behaviour:__
influxdb is not restarted, leaving the old binary running in place. This can have security implications if the old binary had a security issue and the user upgraded thinking that was enough to effect the change. The behavior is unexpected (certainly on Debian-based systems); users understand to defer upgrades to a maintenance window but may not understand influxdb's peculiar behavior to also require a manual restart.

`/var/lib/dpkg/info/influxdb.postint` lacks any restart (or start, if desiring to stop in `/var/lib/dpkg/info/influxdb.preinst`). Please also verify rpm installs too (I did not).

__Environment info:__

* Using official deb packages.
* System info: `Linux 4.15.0-223-generic x86_64`

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the Debian maintainer scripts at /var/lib/dpkg/info/influxdb.postint and /var/lib/dpkg/info/influxdb.preinst, then reproduce the 2.7.5-to-2.7.6 apt upgrade described in the issue. Verify that an already running InfluxDB service restarts during upgrade and also check whether the RPM package behavior needs the same change.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
devops, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.