Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1184402 - imuxsock doesn't respect hostname parameter
imuxsock doesn't respect hostname parameter
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Tomas Heinrich
Stanislav Zidek
:
: 1237051 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-21 05:07 EST by Petr Lautrbach
Modified: 2016-08-09 09:48 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 09:30:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2173 normal SHIPPED_LIVE rsyslog bug fix update 2015-11-19 06:34:00 EST

  None (edit)
Description Petr Lautrbach 2015-01-21 05:07:23 EST
Description of problem:

    # find /mnt/chroot/
    /mnt/chroot/
    /mnt/chroot/dev
    /mnt/chroot/dev/log
    /mnt/chroot/lib64
    /mnt/chroot/lib64/libdl.so.2
    /mnt/chroot/lib64/libc.so.6
    /mnt/chroot/lib64/ld-linux-x86-64.so.2
    /mnt/chroot/lib64/libtinfo.so.5
    /mnt/chroot/lib64/libselinux.so.1
    /mnt/chroot/lib64/libcap.so.2
    /mnt/chroot/lib64/libacl.so.1
    /mnt/chroot/lib64/libpcre.so.1
    /mnt/chroot/lib64/liblzma.so.5
    /mnt/chroot/lib64/libattr.so.1
    /mnt/chroot/lib64/libpthread.so.0
    /mnt/chroot/bin
    /mnt/chroot/bin/bash
    /mnt/chroot/bin/logger
    /mnt/chroot/bin/ls
     
    # grep /mnt/chroot/dev/log /etc/rsyslog.conf
    input(type="imuxsock" HostName="chroot" Socket="/mnt/chroot/dev/log" CreatePath="on")
     
    # systemctl restart rsyslog
     
    # chroot /mnt/chroot/
    bash-4.2# /bin/logger this is a chroot log test
    bash-4.2# exit
     
    # grep "this is a chroot log test" /var/log/messages
    Jan 21 10:57:08 plautrba-rhel-7 logger: this is a chroot log test

I believe there should be "chroot" instead of "plautrba-rhel-7" in the log line.

Version-Release number of selected component (if applicable):
rsyslog-7.4.7-7.el7_0.x86_64

How reproducible:
always
Comment 2 Tomas Heinrich 2015-01-21 08:50:04 EST
Reproduced.

I've tried a variety of versions and the behavior is pretty inconsistent.
- rsyslog-5.8.10-10.el6_6
  old syntax - works as expected
- rsyslog7-7.4.10-3.el6_6
  old syntax - strange bug with mangled hostname
  new syntax - works as expected
- rsyslog-7.4.7-6.el7.x86_64
  old syntax - strange bug with mangled hostname
  new syntax - doesn't change hostname
- rsyslog-7.4.10-3.fc20.x86_64
  old syntax - doesn't change hostname
  new syntax - works as expected


@QE:
I guess it'd be good to test both syntaxes. Here are the respective configurations:

--- 8< ---
module(load="imuxsock" syssock.use="on" syssock.name="/tmp/rs.sock.sys")
input(type="imuxsock" hostname="chroot" socket="/tmp/rs.sock.chroot")
--- 8< ---
$Modload imuxsock
$SystemLogSocketName /tmp/rs.sock.sys
$InputUnixListenSocketHostName chroot
$AddUnixListenSocket /tmp/rs.sock.chroot
--- 8< ---

setenforce 0
systemctl restart rsyslog
logger -du /tmp/rs.sock.chroot harharhar
grep harharhar /var/log/messages
Comment 3 Tomas Heinrich 2015-04-12 04:28:03 EDT
- rsyslog-8.8.0-3.fc23.x86_64
  old syntax - strange bug with mangled hostname
  new syntax - works as expected

This version even crashes during shutdown with the old syntax.

We should fix this before it bites somebody.
Comment 8 errata-xmlrpc 2015-11-19 09:30:12 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2173.html
Comment 9 Tomas Heinrich 2016-08-09 09:48:28 EDT
*** Bug 1237051 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.