Fix systemd-journal-remote socket dependency

After I426dc8c29987e7b034a656e7d81321655ed6dbe2, a new installation
of systemd-journal-remote would fail to start, entering a restart
loop because of:
systemd-journal-remote[5089]: Received fewer sockets than expected

This is because the commit introduced a regression where the service
unit no longer depended on the socket, so systemd was not starting
the journal listening socket.

  systemd-journal-remote.socket - Journal Remote Sink Socket
   Loaded: loaded (/lib/systemd/system/systemd-journal-remote.socket;
           disabled; vendor preset: disabled)
   Active: inactive (dead)
   Listen: [::]:19532 (Stream)

Fixing this bug causes the socket to activate as expected when the
systemd-journal-remote service starts:

  systemd-journal-remote.socket - Journal Remote Sink Socket
   Loaded: loaded (/lib/systemd/system/systemd-journal-remote.socket;
           disabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-05-16 00:17:29 EDT; 4min 45s ago
   Listen: [::]:19532 (Stream)
    Tasks: 0 (limit: 8192)
   CGroup: /system.slice/systemd-journal-remote.socket

May 16 00:17:29 infra1 systemd[1]: Listening on Journal Remote Sink Socket.

Change-Id: Ie0e2f376bd6a16f88801611b77fcfde5003d68e2
This commit is contained in:
Logan V 2019-05-15 23:19:45 -05:00
parent 96852cfcc9
commit 81578062a4

View File

@ -96,6 +96,9 @@
--compress
--seal
--output=/var/log/journal/remote/
config_overrides:
Unit:
Requires: "systemd-journal-remote.socket"
- service_name: "systemd-journal-upload"
enabled: "{{ (ansible_host == systemd_journal_remote_target) | ternary('no', 'yes') }}"