Page MenuHomePhabricator

haproxykafka service isn't restarted when upgraded
Closed, ResolvedPublic

Description

Upgrading haproxykafka debian package on any host doesn't restart automatically the systemd service (as we would expect). That's because the debian package for haproxykafka doesn't manage the systemd unit (as it's not in a standard path and it doesn't follow the dh_systemd convention) so debhelper generated postinst script won't know about the service.

The roadmap would be:

  • Patching the haproxykafka puppet module, to bring the relevant changes with an override to the systemd unit file
  • Patch haproxykafka package to actually install systemd unit file in /lib/systemd.
  • Deploying the new package version everywhere. The package should overwrite the configuration file brought by puppet (and incidentally, restart the service as soon as it gets upgraded).
  • Run puppet with the systemd unit overrides

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Added systemd unit for restarting when upgradedrepos/sre/haproxykafka!86fabfursystemd-unitbullseye-wikimedia
Customize query in GitLab

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1140194 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] haproxykafka: service unit brought by deb package

https://gerrit.wikimedia.org/r/1140194

Sorry that was a wrong MR that ended up here... Relevant changes are on the bullseye-wikimedia branch with https://gitlab.wikimedia.org/repos/sre/haproxykafka/-/commit/3093d9430e77f4ee66a7aa6f7c895e0c134047c7

Mentioned in SAL (#wikimedia-operations) [2025-05-05T13:18:55Z] <fabfur> depooling cp7001 to test new haproxykafka version (T393016)

Mentioned in SAL (#wikimedia-operations) [2025-05-05T13:20:06Z] <fabfur> disabled puppet on cp7001 to test haproxykafka version (T393016)

Mentioned in SAL (#wikimedia-operations) [2025-05-05T14:23:37Z] <fabfur> uploading haproxykafka 0.3.10 on apt repo (T393016)

Mentioned in SAL (#wikimedia-operations) [2025-05-05T14:27:39Z] <fabfur> enable puppet and repooled cp7001 (T393016)

Mentioned in SAL (#wikimedia-operations) [2025-05-05T14:38:42Z] <fabfur> upgrading haproxykafka to version 0.3.10 on A:cp (T393016)

Change #1140194 merged by Fabfur:

[operations/puppet@production] haproxykafka: service unit brought by deb package

https://gerrit.wikimedia.org/r/1140194

Fabfur triaged this task as Low priority.
Fabfur updated the task description. (Show Details)