elastic / elastic/beats

Why Filebeat did not restart after apt upgrade?

Open
#34,089 7 comments 0 reactions 0 assignees View on GitHub
Stalled Team:Elastic-Agent Team:Elastic-Agent-Data-Plane
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

## Issue ##

Why doesn't Filebeat restart after an upgrade (apt upgrade)?
It runs the previous version until a systemctl restart filebeat is executed after the upgrade.

I looked at the `postinst` in the debian package and there is no code to restart the service. Does it have a reason?

```
#!/usr/bin/env bash

systemctl daemon-reload 2> /dev/null
exit 0
```

This issue is not only happening on Filebeat but on every Beat.

## Definition of done ##

- [ ] Beats are correctly restarted after an upgrade
- [ ] Testing in place to validate that new version is running after an upgrade

Contributor guide

Open the contributing guide

Research direction

Start by examining the Debian package postinst shown in the issue and the systemctl daemon-reload step. Reproduce an apt upgrade followed by systemctl status for Filebeat or another Beat, then determine how the package upgrade should ensure the new version is running. Done means Beats restart correctly after upgrades and testing validates that the new version is active.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, debian
Domain
devops, operating-systems, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.