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 1660884 - augeas lens fails to parse rsyslog.conf when using ampersand selector
Summary: augeas lens fails to parse rsyslog.conf when using ampersand selector
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: augeas
Version: 8.0
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: 8.0
Assignee: Pino Toscano
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 14:06 UTC by Pino Toscano
Modified: 2020-04-28 16:49 UTC (History)
6 users (show)

Fixed In Version: augeas-1.12.0-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1350218
Environment:
Last Closed: 2020-04-28 16:49:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rsyslog file (1.88 KB, text/plain)
2019-11-08 13:09 UTC, Pino Toscano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github hercules-team augeas issues 652 0 'None' closed Rsyslog.lns does not support multiple actions 2021-01-05 11:02:49 UTC
Github hercules-team augeas pull 653 0 'None' closed Rsyslog: support multiple actions in filters and selectors 2021-01-05 11:02:49 UTC
Red Hat Product Errata RHBA-2020:1824 0 None None None 2020-04-28 16:49:37 UTC

Description Pino Toscano 2018-12-19 14:06:00 UTC
+++ This bug was initially created as a clone of Bug #1350218 +++

+++ This bug was initially created as a clone of Bug #1350217 +++

Cloning this bug for RHEL 8 (augeas-libs-1.10.1-8.el8)

Description of problem:
augeas lens fails to parse rsyslog.conf when using ampersand selector

Version-Release number of selected component (if applicable):
augeas-libs-1.0.0-10.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1] rsyslog.conf file with ampersand selector

$ vi /etc/rsyslog.conf(attached example file)
[...]
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
local3.err                                              /var/log/nfsen/nfsenlog
& /var/log/also.log


Actual results:
augeas lens fails to parse rsyslog.conf

Expected results:
augeas lens should parse rsyslog.conf

Additional info:
[root@localhost ~]# augtool 
augtool> ls /files/etc/rsyslog.conf
augtool> print /augeas//error
[..]
/augeas/files/etc/rsyslog.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.conf/error/pos = "25"
/augeas/files/etc/rsyslog.conf/error/line = "2"
/augeas/files/etc/rsyslog.conf/error/char = "0"
/augeas/files/etc/rsyslog.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:54.10-.57:"
/augeas/files/etc/rsyslog.conf/error/message = "Get did not match entire input"
augtool>

--- Additional comment from Xianghua Chen on 2016-10-28 10:05:43 CEST ---

Can reproduce it with :
augeas-libs-1.4.0-2.el7.x86_64

Steps:
1. rsyslog.conf file with ampersand selector
# vi /etc/rsyslog.conf
... ...
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
local3.err                                              /var/log/nfsen/nfsenlog
& /var/log/also.log

2. 
# augtool print /augeas/files/etc/rsyslog.conf
/augeas/files/etc/rsyslog.conf
/augeas/files/etc/rsyslog.conf/path = "/files/etc/rsyslog.conf"
/augeas/files/etc/rsyslog.conf/mtime = "1477639931"
/augeas/files/etc/rsyslog.conf/lens = "@Rsyslog"
/augeas/files/etc/rsyslog.conf/lens/info = "/usr/share/augeas/lenses/dist/rsyslog.aug:61.10-.57:"
/augeas/files/etc/rsyslog.conf/error = "parse_failed"
/augeas/files/etc/rsyslog.conf/error/pos = "3425"
/augeas/files/etc/rsyslog.conf/error/line = "96"
/augeas/files/etc/rsyslog.conf/error/char = "0"
/augeas/files/etc/rsyslog.conf/error/lens = "/usr/share/augeas/lenses/dist/rsyslog.aug:61.10-.57:"
/augeas/files/etc/rsyslog.conf/error/message = "Get did not match entire input"

Comment 1 Pino Toscano 2019-11-08 13:09:57 UTC
Created attachment 1634002 [details]
rsyslog file

Comment 2 Pino Toscano 2019-11-12 12:55:38 UTC
Fixed upstream with commit 5181105bae84dc7819a00886f068ad0bb4e6d05a.

Comment 4 YongkuiGuo 2019-11-15 09:53:08 UTC
Verified with package:
augeas-1.12.0-4.el8.x86_64

Steps:

1. /etc/rsyslog.conf file with ampersand selector
# vi /etc/rsyslog.conf
... 
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
local3.err                                              /var/log/nfsen/nfsenlog
& /var/log/also.log

2.
# augtool print /files/etc/rsyslog.conf
...
/files/etc/rsyslog.conf/entry[8]
/files/etc/rsyslog.conf/entry[8]/selector
/files/etc/rsyslog.conf/entry[8]/selector/facility = "local3"
/files/etc/rsyslog.conf/entry[8]/selector/level = "err"
/files/etc/rsyslog.conf/entry[8]/action[1]
/files/etc/rsyslog.conf/entry[8]/action[1]/file = "/var/log/nfsen/nfsenlog"
/files/etc/rsyslog.conf/entry[8]/action[2]
/files/etc/rsyslog.conf/entry[8]/action[2]/file = "/var/log/also.log"
...


The ampersand selector can be parsed in /etc/rsyslog.conf file. Verified it.

Comment 6 errata-xmlrpc 2020-04-28 16:49:27 UTC
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://access.redhat.com/errata/RHBA-2020:1824


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