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 1350218

Summary: augeas lens fails to parse rsyslog.conf when using ampersand selector
Product: Red Hat Enterprise Linux 7 Reporter: Nilesh Parmar <nparmar>
Component: augeasAssignee: Pino Toscano <ptoscano>
Status: CLOSED WONTFIX QA Contact: YongkuiGuo <yoguo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: linl, mkalinin, ptoscano, virt-bugs, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1350217
: 1660884 (view as bug list) Environment:
Last Closed: 2019-06-25 10:51:55 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:
Bug Depends On: 1350217    
Bug Blocks: 1420851, 1473046, 1649160    
Attachments:
Description Flags
rsyslog file
none
rsyslog file none

Description Nilesh Parmar 2016-06-26 14:02:38 UTC
+++ This bug was initially created as a clone of Bug #1350217 +++

Cloning this bug for RHEL 7 (augeas-libs-1.4.0-2.el7)

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>

Comment 4 Xianghua Chen 2016-10-28 08:05:43 UTC
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 7 Pino Toscano 2018-12-19 13:44:05 UTC
Created attachment 1515594 [details]
rsyslog file

"Cleaned" file from bug 1350217.

Comment 8 Pino Toscano 2018-12-19 13:58:13 UTC
Created attachment 1515605 [details]
rsyslog file

"Cleaned" file from bug 1350217, now with proper Unix endlines.

Comment 11 Pino Toscano 2019-06-25 10:51:55 UTC
This bug requires non-trivial work in the Rsyslog lens.
Since there is no demand to fix it, and the development time for RHEL 7 is basically over, closing this bug.

For the RHEL 8 equivalent, see bug 1660884.