Restart unicorn when redis server is restarted
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/
"""
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.