Bug 1329279

Summary: systemd-journal-remote should use remote/peer hostname in journal filename
Product: Red Hat Enterprise Linux 7 Reporter: Martin Stefany <martin>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: dani-rh, dtardon, martin, systemd-maint-list, tcarter
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-13 15:13:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Stefany 2016-04-21 13:53:46 UTC
Description of problem:
When split-mode=host is specified, remote host's hostname should be in filename of created .journal file, not the IP address (IPv4 or IPv6) of local interface which received the message.
This is also documented/fixed in upstream: https://github.com/systemd/systemd/pull/1531

Man page strip:
$ man systemd-journal-remote
...
       --split-mode
           One of none or host. For the first, only one output journal file is used. For the latter, a separate output file is used, based on the hostname of the other endpoint of a connection.

           In case of "active" sources, the output file name must always be given explicitly and only none is allowed.
...

Version-Release number of selected component (if applicable):
systemd-journal-gateway-219-19.el7_2.7.x86_64

How reproducible:
always

Steps to Reproduce:
1. configure systemd-journal-upload on one system to send journal to systemd-journal-remote on other system and use split-mode=host in configuration
2. observe that created .journal files under /var/log/journal/remote are not split by host since created files use local IP address of receiving interface, not peers hostname
3.

Actual results:
All .journal files under /var/log/journal/remote are named after local IP address of receiving interface instead of remote host's (peer's) hostname.

Expected results:
.journal files under /var/log/journal/remote should be name by remote host's (peer's) hostname.

Additional info:
Upstream fixes: https://github.com/systemd/systemd/pull/1531

Comment 3 David Tardon 2019-12-13 15:13:44 UTC

*** This bug has been marked as a duplicate of bug 1244691 ***