Bug 1652832 - augeas cannot parse rsyslog.conf on rhel8
Summary: augeas cannot parse rsyslog.conf on rhel8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: augeas
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Libvirt Maintainers
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-23 08:32 UTC by YongkuiGuo
Modified: 2019-06-14 01:07 UTC (History)
3 users (show)

Fixed In Version: augeas-1.10.1-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:07:12 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
rsyslog.conf from RHEL 8 (3.11 KB, text/plain)
2018-11-23 09:13 UTC, Richard W.M. Jones
no flags Details

Description YongkuiGuo 2018-11-23 08:32:08 UTC
Description of problem:
augeas cannot parse /etc/rsyslog.conf file on up-to-date rhel8.

Version-Release number of selected component (if applicable):
augeas-1.10.1-4.el8.x86_64

How reproducible:
100%

Steps:

1. On rhel8 host with RHEL-8.0-20181120.0 compose
#augtool print /files/etc/rsyslog.conf

There is no output.

2.
#augtool print /augeas//error
...
/augeas/files/etc/rsyslog.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.conf/error/pos = "1404"
/augeas/files/etc/rsyslog.conf/error/line = "36"
/augeas/files/etc/rsyslog.conf/error/char = "0"
/augeas/files/etc/rsyslog.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:75.10-.57:"
/augeas/files/etc/rsyslog.conf/error/message = "Get did not match entire input"


The content of line 36 is 'include(file="/etc/rsyslog.d/*.conf" mode="optional")'.


Actual results:
The rsyslog.conf cannot be parsed.

Expected results:
The augeas tool should be able to parse rsyslog.conf file.

Additional info:

Comment 1 Richard W.M. Jones 2018-11-23 09:12:44 UTC
Can confirm:

$ cd /var/tmp
$ mkdir etc
$ cp /etc/rsyslog.conf etc/
$ augtool -r /var/tmp
augtool> print /augeas//error
/augeas/files/etc/rsyslog.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.conf/error/pos = "1404"
/augeas/files/etc/rsyslog.conf/error/line = "36"
/augeas/files/etc/rsyslog.conf/error/char = "0"
/augeas/files/etc/rsyslog.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:75.10-.57:"
/augeas/files/etc/rsyslog.conf/error/message = "Get did not match entire input"

Comment 2 Richard W.M. Jones 2018-11-23 09:13:15 UTC
Created attachment 1508234 [details]
rsyslog.conf from RHEL 8

Comment 3 Pino Toscano 2018-11-23 10:30:08 UTC
Fixed upstream with
https://github.com/hercules-team/augeas/commit/ce967883e9e81fecc819b0863049feea061fb2d5
which is in augeas >= 1.11.0.

Comment 5 YongkuiGuo 2018-11-26 02:50:43 UTC
Verified with package:
augeas-1.10.1-5.el8.x86_64

Steps:

1. 
$ augtool print /files/etc/rsyslog.conf
/files/etc/rsyslog.conf
/files/etc/rsyslog.conf/#comment[1] = "rsyslog configuration file"
/files/etc/rsyslog.conf/#comment[2] = "For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html"
/files/etc/rsyslog.conf/#comment[3] = "or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html"
/files/etc/rsyslog.conf/#comment[4] = "If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html"
/files/etc/rsyslog.conf/#comment[5] = "### MODULES ####"
/files/etc/rsyslog.conf/module[1]
/files/etc/rsyslog.conf/module[1]/load = "imuxsock"
/files/etc/rsyslog.conf/module[1]/SysSock.Use = "off"
/files/etc/rsyslog.conf/module[1]/#comment = "Turn off message reception via local log socket;"
/files/etc/rsyslog.conf/#comment[6] = "local messages are retrieved through imjournal now."
/files/etc/rsyslog.conf/module[2]
/files/etc/rsyslog.conf/module[2]/load = "imjournal"
/files/etc/rsyslog.conf/module[2]/StateFile = "imjournal.state"
/files/etc/rsyslog.conf/module[2]/#comment = "File to store the position in the journal"
/files/etc/rsyslog.conf/#comment[7] = "module(load=\"imklog\") # reads kernel messages (the same are read from journald)"
/files/etc/rsyslog.conf/#comment[8] = "module(load\"immark\") # provides --MARK-- message capability"
/files/etc/rsyslog.conf/#comment[9] = "Provides UDP syslog reception"
/files/etc/rsyslog.conf/#comment[10] = "for parameters see http://www.rsyslog.com/doc/imudp.html"
/files/etc/rsyslog.conf/#comment[11] = "module(load=\"imudp\") # needs to be done just once"
/files/etc/rsyslog.conf/#comment[12] = "input(type=\"imudp\" port=\"514\")"
/files/etc/rsyslog.conf/#comment[13] = "Provides TCP syslog reception"
/files/etc/rsyslog.conf/#comment[14] = "for parameters see http://www.rsyslog.com/doc/imtcp.html"
/files/etc/rsyslog.conf/#comment[15] = "module(load=\"imtcp\") # needs to be done just once"
/files/etc/rsyslog.conf/#comment[16] = "input(type=\"imtcp\" port=\"514\")"
/files/etc/rsyslog.conf/#comment[17] = "### GLOBAL DIRECTIVES ####"
/files/etc/rsyslog.conf/#comment[18] = "Where to place auxiliary files"
/files/etc/rsyslog.conf/global
/files/etc/rsyslog.conf/global/workDirectory = "/var/lib/rsyslog"
/files/etc/rsyslog.conf/#comment[19] = "Use default timestamp format"
/files/etc/rsyslog.conf/module[3]
/files/etc/rsyslog.conf/module[3]/load = "builtin:omfile"
/files/etc/rsyslog.conf/module[3]/Template = "RSYSLOG_TraditionalFileFormat"
/files/etc/rsyslog.conf/#comment[20] = "Include all config files in /etc/rsyslog.d/"
/files/etc/rsyslog.conf/include
/files/etc/rsyslog.conf/include/file = "/etc/rsyslog.d/*.conf"
/files/etc/rsyslog.conf/include/mode = "optional"
...

The rsyslog.conf can be parsed correctly. So verified it.


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