Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1652832

Summary: augeas cannot parse rsyslog.conf on rhel8
Product: Red Hat Enterprise Linux 8 Reporter: YongkuiGuo <yoguo>
Component: augeasAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: YongkuiGuo <yoguo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: ptoscano, rjones, yoguo
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: augeas-1.10.1-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:07:12 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:
Embargoed:
Attachments:
Description Flags
rsyslog.conf from RHEL 8 none

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.