Skip to content

Modernize package scripts. #226

Open
@zsistla

Description

@zsistla

Our scripts are very backward compatible. We need to make them forward compatible as well.

A customer has provided the following feedback:

deploying newrelic-daemon (alongside newrelic-php5 and newrelic-php5-common) to Ubuntu 18.04 hosts running systemd, and are experiencing some issues with how your postinst script restarts the service after installation and upgrade. I'm filing this under PHP agent for lack of an appropriate category for newrelic-daemon or generic packaging issues.

These are first-party packages obtained from apt.newrelic.com/debian, and are not modified in any way.

Recent versions of Ubuntu (and upstream Debian) have switched to systemd for init and service management. Your packages do not include a systemd unit file, which is not a serious problem in and of itself - systemd does provide a backwards compatibility layer for these old-style scripts that works passably well, but can lose track of running processes under certain circumstances.

One of those circumstances is when services are started or restarted via direct invocation of `/etc/init.d/<service>` scripts rather than using the `service` or `systemctl` utilities. Unfortunately, the postinst script included in newrelic-daemon does exactly that.

We ask that you please modernize these package scripts to handle service management in a more compatible way. It's my understanding from looking at modern versions of debhelper that the recommended way of doing this is via the `start-stop-daemon` command provided by dpkg itself, which should retain backwards compatibility with distributions that predate or don't use systemd. It may also be necessary to provide a systemd service definition file, but that is of course up to y'all.

reproduction of this issue does require a virtual machine, given that ubunu docker images do not use systemd, but is easy enough to reproduce: installation, upgrade, or even reinstallation of newrelic-daemon itself should be sufficient to produce the failure mode in `systemctl status newrelic-daemon`, specifically a state of "Active (exited)" instead of "Active (running)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions