Restart unicorn when redis server is restarted

Bug #1837258 reported by Benjamin Allot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Discourse Charm
New
Undecided
Unassigned

Bug Description

Hello,

Unicorn had been stopped on discourse unit due to the redis-server
being upgraded by the unattended-upgrade.

  The systemd unit of unicorn "requires" redis-server. Which means that
when redis-server is stopped, it stops unicorn as well.

However, when redis is restarted, unicorn is not.
One way to mitigate that would be to put a link into
/etc/systemd/system/redis-server.service.requires/unicorn.service as described in https://www.freedesktop.org/software/systemd/man/systemd.unit.html
"""
Along with a unit file foo.service, the directory foo.service.wants/ may exist. All unit files symlinked from such a directory are implicitly added as dependencies of type Wants= to the unit. This is useful to hook units into the start-up of other units, without having to modify their unit files. For details about the semantics of Wants=, see below. The preferred way to create symlinks in the .wants/ directory of a unit file is with the enable command of the systemctl(1) tool which reads information from the [Install] section of unit files (see below). A similar functionality exists for Requires= type dependencies as well, the directory suffix is .requires/ in this case.
"""

  This way when one is stopped, the other is as well, but that's also
true in case of start.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.